Jump to content

Statistics Plugin


Recommended Posts

Posted

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
Happy2Play
Posted

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?

 

Posted (edited)
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
Happy2Play
Posted

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.

Posted
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

Happy2Play
Posted
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

Posted

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.

Happy2Play
Posted
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?

Posted (edited)
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
Posted
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.

hackthis02
Posted

@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. 

Posted
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

Posted
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.

Posted

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.

  • 8 months later...
Posted

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?

  • 1 year later...
Posted

Hello,  my scheduled task for calculating statistics is limited to running for 2 hours because it maxed out one of my 4 cores to 100% for the whole time it runs and it is not able to finish in the 2 hour timeframe.  Is it normal for it to take this long to run or is something wrong?

image.png.7da5d657ed413101696ded9fc6a3cd1b.png

  • 2 months later...
Posted

For the last 2 weeks been getting this:  (not causing any grief just FYI).

 

Value cannot be null. (Parameter 'key') at System.Collections.Generic.Dictionary`2.FindValue(TKey key) at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value) at Statistics.Helpers.Calculator.CalculateMovieQualityList() at Statistics.ScheduledTasks.CalculateStatsTask.MediaBrowser.Model.Tasks.IScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)

Posted
5 hours ago, bdowns83 said:

For the last 2 weeks been getting this:  (not causing any grief just FYI).

 

Value cannot be null. (Parameter 'key') at System.Collections.Generic.Dictionary`2.FindValue(TKey key) at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value) at Statistics.Helpers.Calculator.CalculateMovieQualityList() at Statistics.ScheduledTasks.CalculateStatsTask.MediaBrowser.Model.Tasks.IScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)

Hi, I think it will be easier for the plugin developer if you can provide the complete emby server log rather than just a snippet. Thanks.

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...