Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't see any chart #411

Closed
Deses opened this issue Nov 24, 2023 · 5 comments
Closed

I can't see any chart #411

Deses opened this issue Nov 24, 2023 · 5 comments
Assignees
Labels
🐜 bug Something isn't working ➕ todo

Comments

@Deses
Copy link

Deses commented Nov 24, 2023

Describe the bug

I installed your app on my unraid server using docker. Edited the conf file to enable the WebUI:

twitch_miner.analytics(host="0.0.0.0", port=5000, refresh=5, days_ago=7) # Start the Analytics web-server

Then I set up Nginx-Reverse-Proxy to connect through http://tpm.unraid.nas/ rather than http://192.168.1.130:5000/.

I can access the WebUI just fine and I can see the logs and how the points increase, but the graph is stuck at loading.

Chrome's Dev Console shows this:

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'replace')
    at changeStreamer (script.js:225:38)
    at script.js:299:9
pagedata-script.js:1 CaptureThumbnail error TypeError: a.getContext(...).drawWindow is not a function
    at pagedata-script.js:1:12510
    at pagedata-script.js:1:12723
    at pagedata-script.js:1:13055
    at pagedata-script.js:1:13059
(anonymous) @ pagedata-script.js:1

Firefox' Dev Console shows this:

Uncaught (in promise) TypeError: streamer is null
    changeStreamer http://tpm.unraid.nas/assets/script.js:225
    renderStreamers http://tpm.unraid.nas/assets/script.js:299

Basically, streamer is null. But here's the kicker:

If I click on any of the streamer names, the chart loads and any page refresh works OK because the browser remembers my selection.

The bug, apparently, is that there's no streamer selected on first page load and that's why the chart crashes.

Steps to reproduce

  • Open the WebUI on a fresh incognito browser.
  • Chart doesn't work.
  • Click a streamer's name.
  • Chart loads.

Expected behavior

The graphs load.

Operating system

Unraid 6.12.4

Python version

Python 3.12.0

Miner version

v2-1.9.0

Other relevant software versions

No response

Logs

It's not an error of the backend.

Additional context

No response

@rdavydov
Copy link
Owner

First of all, does it work fine on http://192.168.1.130:5000 ?

And only then you should proceed with http://tpm.unraid.nas

@Deses
Copy link
Author

Deses commented Nov 24, 2023

I've updated the issue with my findings. Please take a look at it.

The reverse proxy is not an issue btw.

@rdavydov rdavydov self-assigned this Nov 24, 2023
@rdavydov
Copy link
Owner

I see now. I made some changes recently so it can remember which streamer was selected.
Yep, incognito is the reason, need to fix the code to select the first streamer if it is the first opening ever.

@rdavydov rdavydov added 🐜 bug Something isn't working ➕ todo and removed 🤷‍♂️ user issue labels Nov 24, 2023
@Deses
Copy link
Author

Deses commented Nov 24, 2023

incognito is the reason

Any first run of the app will encounter this issue until a name of a streamer is clicked. Then the error will never happen again.
I just used incognito to reproduce the issue. :P

@rdavydov
Copy link
Owner

Yes, gotcha. Incognito = clean browser localStorage, same as on the first opening. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐜 bug Something isn't working ➕ todo
Projects
None yet
Development

No branches or pull requests

2 participants