-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add support for packaged SvelteKit apps #7
Comments
Continuing Tizen investigation here. Took some time due to buggy/broken debugging tools. Findings:
Conclusion: Tizen web app's relative URLs works as if they were accessed through a web server using http://. So the errors I've seen must come from something else. That's up next (in paralell I'm trying to get the Chrome devtools working with the older Tizen web engines - would significantly speed up debugging since LogRocket doesn't work for packaged apps) |
A new round of investigations: to get clearer results I decided to use the Sveltekit skelteton app (but removed sverdle since it didn't like static prerendering). Got good and bad news: Building it for Tizen 3 I could run the first page (with the counter) on Tizen 3, 4, 5 and 7 emulators. But when I built for Tizen 5 it didn't work in Tizen 5 emulator (which I hoped for) and got the following error messages: I could however run in on Tizen 7. In addition I tried our own, quite complex app built for Tizen 3 and 5. Got different errors like: Conclusion: the current tvkit version seem to support basic packaged Tizen web app in some build targets (like Tizen 3), but struggles with more advanced code and/or mix of build targets. Happy to assist more! |
I've managed to setup Chrome remote debugging now for Tizen 5 (and likely older) so we can get proper error messages and debugging tools. One of the stacktraces looks like this: Not sure if that tells you anything, but now we can continue with proper debugging. Also tried a Tizen 5 build using the "serve" command and tested in Chrome 63 (ie Tizen 5 web engine). Got other errors but the site didn't work here either. |
tvkit 0.12+ has
|
Interesting. Will try and report results. |
Tried the new switch but don't think I noticed any differences. I did however dig into the "Illegal constructor" exception. It occurs at super(...args);: This is using: npx tvkit@latest serve --browser "Tizen 5" --add es6-module --no-minify Essentially the same error occurs if I use --browser "Tizen 3". The class VyouScreen is defined as: Stack trace: Any ideas? |
According to this stackoverflow answer from 2014. https://www.npmjs.com/package/event-target-polyfill might help |
Yeah, think you are right. The EventTarget constructor was introduced in Chrome 64: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/EventTarget Will investigate! |
Sooo, after a lot of rounds and redesigns of our software I've reached a major milestone: running our sveltekit app on Tizen 5! Since the full app is quite complex with code for both web, mobile and TVs. Removed the none TV parts and got it working well with some modifications. I also tried on Tizen 3 and 4 which so far failed but I'm hopeful at least Tizen 4 will work too. Will continue to try and report back. And after Tizen I'll try WebOS |
Fixed some incompatible Tizen WebAPIs and managed to run on Tizen 4 too. The Samsung webapi docs seems incorrect, but not very suprised at all. Now let's see if we can get Tizen 3 working too. |
Tizen 3 reports the error: Only found this when Googleing: So if a recent version of the proxy polyfill is being used, at least that issues should have been solved? Any ideas what otherwise can cause this? Anyhow, we're making a lot of progress. |
Were you able to solve this? I believe GoogleChrome/proxy-polyfill#49 was closed without a solution. |
No, we decided to abandon support for Tizen 3. But if anyone managed to solve it I'm still interested :-) |
One workaround we found was to disable the use of Proxies altogether by downgrading Immer (that shipped with Redux ToolKit) to 9.x and doing a That said, there is another Proxy polyfill that does a little more than Google's: https://github.com/ambit-tsai/es6-proxy-polyfill |
Currently SvelteKit assumes the website is hosted at a preconfigured base, but that won't work for packaged apps as the url folder is unknown at built time, the file:// urls are also problematic as these probably want the .html suffix.
If hash based routing sveltejs/kit#7443 becomes available that would be a solution
The text was updated successfully, but these errors were encountered: