SvelteKit Page Disappears/Flashes on iOS Safari with SSR #13833
Unanswered
artttimiron
asked this question in
Q&A
Replies: 1 comment
-
Seems the problem in Hydration, but I don't understand how to fix it. Thank you in advance, this question is so crucial for us, cause app is ready for prod deployment, but still don't work. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When using SvelteKit with server-side rendering (SSR), pages flash/appear briefly and then disappear completely on iOS Safari (only background color stay, but not components). The same code works perfectly when moved to client-side rendering (CSR). This issue is specific to iOS devices and doesn't occur on Android or desktop browsers.
Environment
Expected Behavior
Page should render and remain visible on iOS Safari, same as on other platforms.
Actual Behavior
Reproduction Steps
Minimal Reproduction Case
1.
src/routes/test/+page.server.ts
:2.
src/routes/test/+page.svelte
:Workaround that fixes the issue:
set export const ssr = false;
Additional Context
Unhandled Promise Rejection: TypeError: Gr is not a function. (In 'Gr()', 'Gr' is undefined
(I don't have such function) orTypeError: root is not a function. (In ‘root()’, ‘root’ is undefined)
(if turn off minificationssr = false
) fixes the issue but loses SSR benefitsBeta Was this translation helpful? Give feedback.
All reactions