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

Tribler 8 won't load in any browser #8279

Closed
Lotechus opened this issue Nov 28, 2024 · 13 comments · Fixed by #8316
Closed

Tribler 8 won't load in any browser #8279

Lotechus opened this issue Nov 28, 2024 · 13 comments · Fixed by #8316
Assignees
Milestone

Comments

@Lotechus
Copy link

Upgraded to Tribler 8, launches a completely blank browser window. First, I don't want to run this in a browser, and secondly it doesn't see to be working properly. I use other localhost/127 programs without issue, however tribler loads an empty window.

Frustrating as the previous version isn't listed for download on the website.

@synctext
Copy link
Member

We will surely help to fix this!

https://github.com/tribler/tribler/releases
Are all prior releases.
Could you give us a bit more info on what OS and browser you are running? Plus please let us know the exact URL the browser is showing?
This sadly will be a wider issue if it fails for you. We liked the old GUI also more, but unfortunately Python QT GUI is very difficult. Everything should be faster and anonymous streaming looks possible now in the browser. That's our 8.1 release aim.

@InSimpleTermsJordan
Copy link

Same issue here.
http://127.0.0.1:65081/ui/#/downloads/all?key=<redacted because idk if this is supposed to be private>
Windows 10 Home 22H2 build 19045.5131
Firefox Developer Edition 134.0b2 (64-bit)

@Lotechus
Copy link
Author

I've already downgraded from a backup, but thank you for the releases link.
Windows 10 Pro, tried in Firefox and Chrome. Disabled my firewall temporarily to test. Browsers and Windows up to date. The URL is similar to the version "InSimpleTermsJordan" posted, starting with 127.0.0.1:65081/ui/# etc.
I use local webservers to test development sites, as well as local AI all which work either with localhost or 127.0.0.1 addresses. They were not running at the time of testing Tribler.
Thanks!

@Lotechus
Copy link
Author

Also if this is running in a browser in future releases, could it look at PWA, so we can do something like this;
https://www.howtogeek.com/turn-websites-into-desktop-apps-on-windows-11/
to utilize Chrome or Edge to launch this in a separate window with their own icon. :)

@egbertbouman
Copy link
Member

Is the window really empty, or is there some kind of error somewhere?
This could be an issue with the server itself, or a specific endpoint. To test this, could someone please try accessing http://127.0.0.1:<yourport>/api/downloads?key=<yourkey>, and let us know if there is any output.

@qstokkink qstokkink added this to the 8.1.0 milestone Nov 29, 2024
@Lotechus
Copy link
Author

Was blank for me.

@davidgordiienko
Copy link

For me after a while some program called xmessage opens up and it says "Database is locked" so I think there's some sort of error

@qstokkink
Copy link
Contributor

We've made some fixes that touched on database locking. The newest bleeding-edge release can be found here: https://github.com/Tribler/tribler/actions/runs/12182098649 Would someone be willing to check if these recent fixes have resolved this issue?

@kotlinbuddy
Copy link

kotlinbuddy commented Dec 5, 2024

Blank screen in browsers (Windows 11 latest)

Mozilla
Loading module from “http://127.0.0.1:64869/ui/assets/index.9ee516a5.js” was blocked because of a disallowed MIME type (“text/plain”).

Chrome
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec. http://127.0.0.1:64869/ui/assets/index.9ee516a5.js

Console message in the release version 8.0.5
I'll try the new build

@kotlinbuddy
Copy link

kotlinbuddy commented Dec 5, 2024

Tried the latest build shared https://github.com/Tribler/tribler/actions/runs/12182098649, same issues as above.

Tried both Windows x64 and x32 builds. Both have same issue.
(x32 build has an additional issue, Tribler won't close after selecting Quit, not sure why?)

@qstokkink
Copy link
Contributor

Thanks for testing! blocked because of a disallowed MIME type (“text/plain”) seems to be the core issue for you then (and not database locking). We were looking in the wrong place and now that we know where to look, we may be able to fix this.

@qstokkink
Copy link
Contributor

[dev stuff] After reading up on this error, I think the following is going on:

  • To serve page content we use Python's mimetypes.guess_type, here:

elif (guessed_type := mimetypes.guess_type(path)[0]) is not None:
response.content_type = guessed_type

  • Inside the Python interpreter, this is implemented by checking the Windows registry.

  • I've seen various user reports online that the registry value HKEY_CLASSES_ROOT\.js Content Type was not set to application/javascript. In turn, this causes javascript files to not be served as javascript.

I think the fix for this might be as easy as adding a custom check for .js postfixes to our own webui_endpoint.py.

@qstokkink qstokkink self-assigned this Dec 6, 2024
@qstokkink
Copy link
Contributor

[dev stuff] Reproduced! Steps:

  1. I set my registry value for .js to text/plain.
  2. I ran using npm run build (npm run dev works correctly - this does not reproduce the issue!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

7 participants