Open bbohlender opened 11 months ago
As propose to Bela, you can ping me on the Lynx Discord if you need a Lynx R1 to make test on the topic: https://discord.gg/mRkY22SMtv Ping tag: @EloiStree
In hope to help.
Looks like it's caused by the User-Agent string, switching to Desktop mode fixes this issue, although I get a slow script warning and it actually takes a lot of time to get everything loaded.
PR #1012 allows setting desktop mode as the default and it can help mitigate the issue a little bit.
If it's an UA issue then the fix is just to add another UA override for that page.
The problem gets more interesting here. Looks like it's not because of the purely UA issue, as I added a new entry to https://github.com/Igalia/wolvic/blob/main/app/src/main/assets/desktopModeOverrides.json:
"642595a3b6ae3bfc06de1c8b88f8ced91c5f4b60b48282bbce7d433d03eaf512715f17c5e1e592e283bca0437ff5ba441275c735ae49cbe26c8565e63d36f6be": "CodeSandbox.io"
Then it's still the same cors error although I can see the website starts loading with desktop mode by default.
So looks like it's fixable only after the user manually switches the UA mode, unrelated to what kind of UA the user is currently in.
Upgrade to the latest gecko version still doesn't fix this issue, and I can't reproduce the issue on Firefox Android as well...
Now finally I find out what's going on here. It's caused by the cache again, just like #353 ... Maybe we should really introduce some mechanism to bypass cache for some specific website, just like what we have for UA. (update: Looks like we can't control the geckoview behavior if we want to bypass some specific pages)
Upgrade to the latest gecko version still doesn't fix this issue, and I can't reproduce the issue on Firefox Android as well...
Now finally I find out what's going on here. It's caused by the cache again, just like #353 ... Maybe we should really introduce some mechanism to bypass cache for some specific website, just like what we have for UA. (update: Looks like we can't control the geckoview behavior if we want to bypass some specific pages)
Hmm how can the http cache cause this? I don't get that. Also how is it different to what FF android does? there should be none...
Hmm how can the http cache cause this? I don't get that. Also how is it different to what FF android does? there should be none...
I don't know ... It's weird enough that we have #353 already and it's not reproducible in Firefox Android either ... I guess something nasty must have happened in our code base that abuses the cache somehow, although I still can't find that out. Anyway, I think a temporary workaround is that we can create a list of websites just like what we do for UA override, and reload the page with the no-cache flag when we try to load the page.
Cannot reproduce it anymore using 1.5.1. Could you confirm?
Cannot reproduce it anymore using 1.5.1. Could you confirm?
It's still reproducible at least on my side. I guess it's because it's your first load and the cache already expired, you can reload the page (remember to disable "bypass cache on reload" in settings) when you find the page works, and then you can reproduce it again.
Trying with Wolvic 1.6 on Quest2; the CORS errors I'm getting are different to the ones originally reported:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://cdn.jsdelivr.net/npm/react@18.2.0/jsx-runtime.js. (Reason: CORS request did not succeed). Status code: (null).
Trying with Wolvic 1.6 on Quest2; the CORS errors I'm getting are different to the ones originally reported:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://cdn.jsdelivr.net/npm/react@18.2.0/jsx-runtime.js. (Reason: CORS request did not succeed). Status code: (null).
Subsequent trials lead to the CORS report originally reported:
W [JavaScript Warning: " Githubissues.
Githubissues is a development platform for aggregating issues.
Configuration
Wolvic version: 1.5.1 Wolvic build ID: 220
Hardware: Quest 3 (1.5.1), Lynx R1 (1.4.1)
Steps to Reproduce
Current Behavior
CORS errors cause the sandbox to not load required dependencies making the code in the sandbox not execute.
Expected Behavior
The CORS errors shouldn't occur because all failing requests are going to the same origin as the website the user is currently on "codesandbox.io".
Error Logs and Stack Traces
Error trace in the developer console: