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

[Bug]: Strings are not mapped to locale versions on local PWA using librewolf #300

Open
4 of 5 tasks
ghost opened this issue Feb 27, 2024 · 6 comments
Open
4 of 5 tasks

Comments

@ghost
Copy link

ghost commented Feb 27, 2024

Guidelines

  • I have encountered this bug in the latest release of FreeTube.
  • I have searched the issue tracker for open and closed issues that are similar to the bug report I want to file, without success.
  • I have searched the documentation for information that matches the description of the bug I want to file, without success.
  • This issue contains only one bug.

Describe the bug

  1. install librewolf (firefox fork)
  2. downloaded latest pwa (0.19.2.110)
  3. all strings will be non-localised (i think thats correct language meows ?)

have a screenshot for reference:
image

i have tried turning all my adblocker, fingerprinting, etc firefox addons off and it hasnt changed, im unsure if this is a librewolf baked-in thing or an error on firefox-based browsers or what XP
(also the issue template links are to the freetube upstream repo, is this intended behavior?)

Expected Behavior

all strings should be correctly localised and display non-debug values (if that makes sense)

Issue Labels

accessibility issue, text/string issue, usability issue, visual bug

FreeTube Version

0.19.2.110

Operating System Version

Arch Linux (6.7.5-zen1-1zen)

Installation Method

PWA (Progressive Web App)

Primary API used

Invidious API

Last Known Working FreeTube Version (If Any)

No response

Additional Information

No response

Nightly Build

@MarmadileManteater
Copy link
Owner

Can u open the browser console and show if there are any errors?

@ghost
Copy link
Author

ghost commented Feb 27, 2024

okay it seems to be a CORS issue, as in the console these errors occur:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///home/USER/freetube-0.19.2.110-pwa/null/home/USER/freetube-0.19.2.110-pwa/static/locales/en-US.json. (Reason: CORS request not http).

Uncaught (in promise) TypeError: NetworkError when attempting to fetch resource.
    _o file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    <anonymous> file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    <anonymous> file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    <anonymous> file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
web.js:2:1076650
    _o file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    AsyncFunctionThrow self-hosted:856
    (Async: async)
    <anonymous> file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    <anonymous> file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    <anonymous> file:///home/USER/freetube-0.19.2.110-pwa/web.js:2

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///home/USER/freetube-0.19.2.110-pwa/null/home/USER/freetube-0.19.2.110-pwa/static/locales/en-US.json. (Reason: CORS request not http).

Uncaught (in promise) TypeError: NetworkError when attempting to fetch resource.
    _o file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    sideEffectsHandler file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    _a file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    dispatch file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    dispatch file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    grabUserSettings file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    _a file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    dispatch file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    dispatch file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    i file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    mounted file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    Te file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    tn file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    insert file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    x file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    Br file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    _update file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    i file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    get file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    t file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    mount file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    $mount file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    _init file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    Wn file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    <anonymous> file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    <anonymous> file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
    <anonymous> file:///home/USER/freetube-0.19.2.110-pwa/web.js:2
web.js:2:1076650

(exact folder path redacted obv)

as well as this warning:

VIDEOJS: WARN: using Vhs.BANDWIDTH_VARIANCE is UNSAFE be sure you know what you are doing web.js:2:186509

(also i was writing this comment out as u asked for it hehe XP)

@MarmadileManteater
Copy link
Owner

The pwa needs to be hosted on a local server. I typically use like npx http-server, but u might have another preferred way of doing that.

@ghost
Copy link
Author

ghost commented Feb 27, 2024

oh :< is there no way of using it from the local file-system ?

@MarmadileManteater
Copy link
Owner

Not at the moment, 😞no. Technically, it wouldn't be impossible to bundle all the locales, but it would make the bundle bigger which is undesirable for the version which is meant to be able to be published on a website.

Likely, there would have to be a seperate build for a version which could support file:// uris.

@ghost
Copy link
Author

ghost commented Feb 27, 2024

ah yes thats probably not ideal meowza

my issues seems to be due to firefox not allowing files to access other files due to an obvious security risk (https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#file_origins, https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSRequestNotHttp)

adding privacy.file_unique_origin to about:config would fix it, but is not suitable for newbie users, so can't really be bundled with the application

my only idea that would fix this is to add a single fallback locale and disable changing the language, but i don't know if this fits ur vision for this project, or would be acceptable from a technical standpoint meow.

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

No branches or pull requests

1 participant