Skip to content
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

Web Worker breaking change between cordova-android 12 and 13 #1747

Open
mzealey opened this issue Nov 16, 2024 · 1 comment
Open

Web Worker breaking change between cordova-android 12 and 13 #1747

mzealey opened this issue Nov 16, 2024 · 1 comment

Comments

@mzealey
Copy link

mzealey commented Nov 16, 2024

I'm not sure if this is a bug report or more of a useful note to help others in the future...

I have an app which is using new Worker('file.worker.js) to load a webworker from the cordova build. This was working just fine in cordova-android 12, and seems to be working fine on some devices with cordova-android 13 (including, frustratingly, SDK 30/34 emulators). However on some end-user devices including my own this resource loading just gets blocked with no explanation. I have <preference name="AndroidInsecureFileModeEnabled" value="true" /> set etc and historically there have been no problems.

I cannot see any way to get this working still using the default file: cordova loading, however in my case the fix seems to be relatively simple - I just had to use the below to move from file: uri access to the inbuilt webserver:

      <content src="https://localhost/index.html" />

This obviously messes with localStorage etc settings that users already did, which is somewhat frustrating, but at least the user interface now works correctly.

I cannot see this documented anywhere; it may well be due to the targetSdk upgrade but it feels to me like a breaking change (as per above, only on some devices), which should be added to the release notes.

@mzealey mzealey changed the title Web Worker breaking change between android 12 and 13 Web Worker breaking change between cordova-android 12 and 13 Nov 16, 2024
@mzealey
Copy link
Author

mzealey commented Nov 16, 2024

Actually I'm a little unsure if it's between 12-13 or from an earlier version - based on user reports and rollout %ages it may have been broken earlier than this on some devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant