-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
SvelteKit not working on mobile phone default browser (non chrome) but Svelte only is working. #2776
Comments
I see the device is a Vivo 1807 using the device's default browser. Is it possible that the browser is blocking Javascript somehow? Because that's exactly what I'd expect to see if Javascript is disabled (and, in fact, I can reproduce those results in Firefox on Linux by just turning off Javascript and reloading the page). The server-side rendering will produce "Welcome to hello", and once the client has loaded it, the Javascript code will change "hello" to "world". But if Javascript is disabled, then none of the client-side code runs. Could you check whether Javascript is somehow disabled by default on the device? If turning Javascript on makes the site run correctly, then this isn't a Svelte-Kit bug. Svelte-Kit is designed so that you can server pages to browsers that have Javascript disabled (see the "todos" example in the Svelte-Kit demo project), but you do have to design your pages around the fact that you expect browsers to turn off Javascript. It's not a bug when client-side code fails to run in a browser with Javascript disabled. |
If that's not what the problem is, then this sounds like a duplicate of #12. |
Will check immediately is the browser blocking javascript. But if the browser is blocking the javascript, svelte-only repo should display hello world, since name is set from src/main.js, isn't it? |
I'm changing src/app.html
It display the alert, and then it display "Welcome to hello", so the javascript should be running right? If you need any things need to clarify, feel free to tell me. |
I can report a similar experience. I currently have a SvelteKit app that's running on both the dev server using Everything works as expected on desktop browsers. However on every mobile browser I've tried, some props are updated when data is fetched (and the view re-renders) while others are not. |
I'm willing to bet this is a duplicate of #12, so I'll close this |
Describe the bug
SvelteKit not working property on mobile default browser (non chrome), and working as expected on chrome. Svelte still working on same device & browser. So I think the problem is in svelte-kit, but I still don't know the exact issue. Any guidance?
Is there any way to make it work since my user mostly using their default browser without installing chrome? Perhaps install some polyfills needed?
This is a real blocker to use svelte kit since I can't force all users to use chrome and not using their default browser.
Reproduction
https://github.com/niwasmala/sveltekit-bug-mobile-default-browser
This is the steps i take to create sveltekit reproduction
https://github.com/niwasmala/svelte-working-on-mobile-default-browser
And this is step I take to create svelte repro
Logs
No response
System Info
Severity
blocking all usage of SvelteKit
Additional Information
Svelte Kit Repro
Source code: src/routes/index.svelte
Expected: After mounting, display "Welcome to world", browser true, and isBrowser = true
Actual: display "Welcome to hello", browser false, and isBrowser = false
Svelte
Source code: src/App.svelte
Working as expected. After mounting, display "Hello hello"
The text was updated successfully, but these errors were encountered: