Jump to content

Statistics Plugin


zer0ish

Recommended Posts

zer0ish

Hello,

I've been using the plugin since day one of buying Emby premiere and noticed this issue a while ago, but since I'm seeing allot of new updates to the plugin this week I figured I'd bring it up.
When going to Emby using a browser, and using the external link such as https://myemby.com (example not actual website) it doesn't show the stats.
The Statistic tab is there in the dashboard but it doesn't show anything but the titles as seen here:image.thumb.png.23fe2fa6767f9fe6fd3f5baa271dc9ed.png

BUT, if I connect to my Emby server using a browser and Local IP such as https://12.1.1.1:portnumber it shows me everything as intended.

Is this on purpose or is it a bug?

Thanks.

  • Like 1
Link to comment
Share on other sites

Happy2Play

So you are saying connecting connecting with port works while connection without port does not?

Dev will probably need a server log.

Also are there any browser console errors?

 

Link to comment
Share on other sites

zer0ish
50 minutes ago, Happy2Play said:

So you are saying connecting connecting with port works while connection without port does not?

Dev will probably need a server log.

Also are there any browser console errors?

 

It's more of a Remote access versus local access I think.
Remote, I get the screenshot above. 
Local IP I get full stats.

Same server just connecting to it either remotely from work or locally with remote address doesn't show stats
Connecting to it via the local IP does show stats.

The port would be the same for both remote and local for SSL.
example:
https://nameofserver.com:1111   remote address Doesn't show stats.
https://10.10.10.10:1111  local address Does show stats.

No console errors I can see when i'm on the statistic tab using the remote link.
What server log? embyserver.txt?

Edited by zer0ish
Link to comment
Share on other sites

Happy2Play

I can say I do not have an issue with https://mydomainname.com:8920.

1 hour ago, zer0ish said:

What server log? embyserver.txt?

Yes the Embyserver.txt.

Link to comment
Share on other sites

zer0ish
8 minutes ago, Happy2Play said:

I can say I do not have an issue with https://mydomainname.com:8920.

Yes the Embyserver.txt.

I do use pfsense and reverse proxy (HAProxy) to have less ports open. With Cloudflare issuing certs to my domain.
But the issue I'm describing has been long before I did any networking stuff at home.
Log attached. I am planning my new server with Unraid and the docker container of Emby as well. 
Maybe it's just me having this and it will be resolved on fresh install?

embyserver.txt

Link to comment
Share on other sites

Happy2Play
20 minutes ago, zer0ish said:

I do use pfsense and reverse proxy (HAProxy) to have less ports open. With Cloudflare issuing certs to my domain.
But the issue I'm describing has been long before I did any networking stuff at home.
Log attached. I am planning my new server with Unraid and the docker container of Emby as well. 
Maybe it's just me having this and it will be resolved on fresh install?

embyserver.txt 112.97 kB · 0 downloads

Sorry the logging looks to be only in debug logging.

Don't know anything about pfsense/reverse proxy but would suspect the issue would be there.

No issue with SSL connection.

image.thumb.png.2d0fa003cecea4045ac71be784da25e0.png

Link to comment
Share on other sites

Just a guess but if the html has inline javascript then it could be due to the CSP being applied by the reverse proxy.  The plugin code should be reworked to not use inline script but a quick fix for you would be to loosen up the CSP.

Link to comment
Share on other sites

Happy2Play
6 minutes ago, Luke said:

Just a guess but if the html has inline javascript then it could be due to the CSP being applied by the reverse proxy.  The plugin code should be reworked to not use inline script but a quick fix for you would be to loosen up the CSP.

Debug console should be showing errors for this correct?

Link to comment
Share on other sites

zer0ish
9 minutes ago, Luke said:

Just a guess but if the html has inline javascript then it could be due to the CSP being applied by the reverse proxy.  The plugin code should be reworked to not use inline script but a quick fix for you would be to loosen up the CSP.

CSP? (Content Security Policy?)

I'll try anything, but as mentioned, this issue was before I did any networking upgrades.
I've had pfsense for a while but the reverse proxy is a recent addition. So the issue was prior to that.

Maybe I could get a clearer picture of how the statistic plugin works and troubleshoot from there.

My understandings(and I'm not a coder or anything so my understanding is very limited) is that Emby has movies and tv shows, all the metadata, user info of what they watched in the database on my server.
The Statistics plugin grab its info from the database and puts it in a nice user viewable table.

I'm having trouble figuring out why networking would change the way it's displayed weather it's remote or local for me.

I'll start looking at my pfsense stuff to see if there is anything causing this.

Edited by zer0ish
Link to comment
Share on other sites

11 minutes ago, Happy2Play said:

Debug console should be showing errors for this correct?

Yea but the scripts will just never execute, so it might not look the same as normal errors. I don't remember exactly but I'm sure the console will say something about it.

Link to comment
Share on other sites

hackthis02

@Luke is correct. The plugin does have inline JavaScript. That's how it was build when I inherited it. Now that Emby has a more robust API documentation, I plan in the near future to rework/write it.

I have never seen this issue before; I would be interested to hear if loosening the CSP resolves it for you. 

Link to comment
Share on other sites

2 minutes ago, hackthis02 said:

@Luke is correct. The plugin does have inline JavaScript. That's how it was build when I inherited it. Now that Emby has a more robust API documentation, I plan in the near future to rework/write it.

Excellent. When you get to it, I would suggest using auto-organize as a reference:

https://github.com/MediaBrowser/Emby.AutoOrganize

Link to comment
Share on other sites

zer0ish
12 hours ago, hackthis02 said:

@Luke is correct. The plugin does have inline JavaScript. That's how it was build when I inherited it. Now that Emby has a more robust API documentation, I plan in the near future to rework/write it.

I have never seen this issue before; I would be interested to hear if loosening the CSP resolves it for you. 

I'll do some testing over the weekend. I just need to make sure I don't break anything on my network since the other services have a higher priority then my ability to see stats remotely. I can always use the local ip if I really need to see the stats. I'll keep you posted.

Link to comment
Share on other sites

zer0ish

I did some testing and stopped firewall and blocker settings and nothing changed.
Cleared browser cache and cloudflare cache as well.

I'm fine with using the local IP to see the stats. Not much more I can do shy of removing pfsense as my firewall/router, and that isn't really an option for me.

This can be closed I suppose since it seems to be a "me" only issue.

Link to comment
Share on other sites

  • 8 months later...
zer0ish

This has since been resolved with no changes to my networking.
It just works now. So possible one of the emby updates fixed the issue?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...