-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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] Load image error on Ubuntu. #4496
Comments
Can you share how you're loading the asset? Is it a |
This is a CORS issue - we set the headers on macOS and Windows (that's why it works on those platforms) but webkit2gtk only added support for this recently, so we can't update yet :/ |
Is that mean webkit2gtk already supports this? Can tauri update for that? |
We're working to update it - but it's complicated, see #3961 |
In your specific case it works if you remove |
It wouldn't work if you were using |
I remember that if I remove |
ok |
@lucasfernog If I remove |
Ahh that's also a CORS issue. If the images are small (and you're not loading several images) you could read the files directly and parse them for the image element but that's.. hard and suboptimal. |
@wusyong do you know if there's a way to disable CORS checks for custom protocols on Linux? |
I need to operate many images and they are large usually. |
Reference discussions: #2327 (comment) |
I tried to use https://webkitgtk.org/reference/webkit2gtk/stable/WebKitSecurityManager.html#webkit-security-manager-register-uri-scheme-as-cors-enabled but it didn't help :/ |
@lucasfernog Hi, any progress on this problem? |
@LuoXin-s Not really :/ I'll need to implement asset protocol functionality inside the tauri protocol. |
Sorry I think I missed this mention. There's the updated webkit2gtk but I haven't added because some data race issues. |
Describe the bug
I got this error when I load image on Ubuntu, everything works on Mac and Windows.
Reproduction
No response
Expected behavior
No response
Platform and versions
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: