bfanger / tvkit

Proxy to run a modern dev server in old browsers
MIT License
26 stars 5 forks source link

Tizen woes #11

Closed chipndahla closed 1 year ago

chipndahla commented 1 year ago

Been trying to get static builds to work with Tizen 5 but it still fails on both real device and emulator. Seems like the relative URL for loading CSS, JS etc isn't working with file:// schemas. The ./ seems to resolve to file:/// which breaks the links.

Notice how the following statements fail to load (see screen shot below):

        <link href="./_app/immutable/assets/_layout-341fe5bb.css" rel="stylesheet">
        <link href="./_app/immutable/assets/_layout-b212931c.css" rel="stylesheet">
        <link href="./_app/immutable/assets/Icon-34f4c87a.css" rel="stylesheet">
        <link href="./_app/immutable/assets/PopUp-8aa555b8.css" rel="stylesheet">
        <link href="./_app/immutable/assets/Field-7bd846c7.css" rel="stylesheet">

etc and also

<script data-sveltekit-hydrate="1vlrrss">System.register(["./_app/immutable/start-56c737df.js"], function (_export, _context) {

So the app never starts. The emulator logs:

[NPNQnpBgGn] _app/immutable/start-56c737df.js:1: TypeError: Illegal constructor
[NPNQnpBgGn] tvkit-babel-runtime/helpers/wrapNativeSuper.js:1: Uncaught (in promise) TypeError: Illegal constructor
[Run mode]
[NPNQnpBgGn] tvkit-babel-runtime/helpers/wrapNativeSuper.js:1: Uncaught (in promise) TypeError: Illegal constructor
[NPNQnpBgGn] _app/immutable/start-56c737df.js:1: TypeError: Illegal constructor
[NPNQnpBgGn] tvkit-babel-runtime/helpers/wrapNativeSuper.js:1: Uncaught (in promise) TypeError: Illegal constructor
[NPNQnpBgGn] tvkit-babel-runtime/helpers/wrapNativeSuper.js:1: Uncaught (in promise) TypeError: Illegal constructor

Screenshot from Logrocket (notice how the ./ relative URLs seem to have been translated to file system root dir): image

bfanger commented 1 year ago

Duplicate of #7

Having a Samsung partnership and be able to submit hosted apps is not for everyone:

It can be acceptable for some special cases only.

I'd like to support packaged apps, but don't know how to solve this yet, so any ideas are welcome.

chipndahla commented 1 year ago

Duplicate of #7

Having a Samsung partnership and be able to submit hosted apps is not for everyone:

It can be acceptable for some special cases only.

I'd like to support packaged apps, but don't know how to solve this yet, so any ideas are welcome.

Sorry if I made a duplicate. And yes, supporting packaged apps with legacy Tizen is a very important feature considering their market share. I've made some experiements on older Tizen webengines and problem so far is relative URL. Can do some additional experiments to see if we can manually correct the links to see if we have additional issues too.

bfanger commented 1 year ago

Duplicates are useful, its makes finding the issue using different wording 👍

Until SvelteKit becomes workable the vite + svelte + spa-router combo is an alternative.

Please share the findings, I'm curious to see what insights you might get from your experiments!