-
Notifications
You must be signed in to change notification settings - Fork 1k
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
bug: SharedArrayBuffer support #6182
Comments
This issue may need more information before it can be addressed. In particular, it will need a reliable Code Reproduction that demonstrates the issue. Please see the Contributing Guide for how to create a Code Reproduction. Thanks! |
@jcesarmobile thanks for your time, I've added the reproduction code here: |
Found this related discussion on the community: |
Ok, I did more investigations on this issue and here is my findings:
@jcesarmobile I'm closing this issue! |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out. |
Bug Report
Capacitor Version
Platform(s)
Current Behavior
I'm using the latest Cornerstone.js for scan/image viewing which heavily uses SharedArrayBuffer.
To enable
SharedArrayBuffer
I need to set the following Response headers at the top HTMLDocument
level, -capacitor://localhost
for iOS:After digging into the code, it seems
capacitor-ios
uses WebKit UrlSchemeHandler to load the local files viacapacitor://localhost
and it always set some Response headers as default. e.g."Cache-Control": "no-cache"
:However, these default headers (or even the
200
status code) are not included in the initial files loaded to launch the app:Since I cannot set custom Response headers at the top level, I cannot use
SharedArrayBuffer
in Ionic apps.Expected Behavior
All Reponse headers set on
WebViewAssetHandler
should be included on all files loaded during app initialisation.Code Reproduction
The code reproduction can be found here: https://github.com/marcelo-nagatomo/capacitor-issue-6182
Other Technical Details
npm --version
output: 8.19.2node --version
output: v16.18.1pod --version
output (iOS issues only): 1.11.2iOS version
: 15.2Additional Context
Similar issue was previously reported: #4520
I'm also investigating the same issue on Cordova, on that case the
WKWebView
initially loads with correct headers but the WebView is reloaded at some point and the Response headers information is lost. I'm not sure if the same happens inCapacitor
though.More info on COOP/COEP headers: https://web.dev/why-coop-coep/
The text was updated successfully, but these errors were encountered: