-
-
Notifications
You must be signed in to change notification settings - Fork 670
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
After upgrading to Flutter 3.27.0, the usage of CachedNetworkImage causes error: SecurityError: Failed to execute 'texImage2D' on 'WebGL2RenderingContext': The image element contains cross-origin data, and may not be loaded. #995
Comments
Changing from:
to
seems to solve the problem provisionally |
I am not able to import "ImageRenderMethodForWeb". It says undefined name. Can you share the import path? |
Right, forgot to mention, you need to use I've also forked the I've also created a PR, if they accept it, the |
same problem after upgrade flutter to 3.27.0 |
Hey; how did you add this fork to your pubspec.yaml exactly? @lordarcadius |
cached_network_image: |
While @rednikisfun's fix works, it ? seems to cause a new error under Safari (v18.2) (works fine with Chrome). When an image isn't found, the errorWidget does not seem to be used / in my case the placeholder widget (I'm using a CircularProgressIndicator()) instead persists. Prior to the 3.27.0 bug, this worked fine across all browsers. |
I think there is a hotfix on the way directly to stable for this issue.
|
Do we have an ETA For that fix? @ZiyadF296 |
so i created a new file called cross_origin.dart in it
and then I replaced all my images that were using CachedImageNetworks with
the only change i made is the imageBuilder attribute it should fix it but I honestly don't know how it fixed it. |
@tfozo, the fix is in Flutter, and it should be included in the next stable release. I saw a cherry-pick. |
@AndreiMisiukevich now what do I do? Edit: Ahh, I'll keep an eye out for the update. Thanks again! |
I'd propose to stick to the previous stable version until it's resolved - as we did 👍 |
It's a weird behavior, my web page broke in production without even notice. Meanwhile had to switch to Image.network. |
same issue |
The issue is related to the CanvasKit Web Renderer (3.27.1) |
The html renderer will be removed though |
Flutter 3.27.2 has fixed this issue. |
I've upgraded to 3.27.2, and the latest |
🐛 Bug Report
I've upgraded my project's Flutter version to 3.27.0, and now, when I run the web version, I get a lot of errors like this:
canvaskit.js:21 Uncaught (in promise) SecurityError: Failed to execute 'texImage2D' on 'WebGL2RenderingContext': The image element contains cross-origin data, and may not be loaded.
UPD: Since in my project, CachedNetworkImage is heavily used, and there are quite a lot of images, too much
Failed to execute 'texImage2D' on 'WebGL2RenderingContext
causesAdditional error: RuntimeError: memory access out of bounds
and overall crash of the app.Expected behavior
It should load an image normally, like it used to in the previous Flutter versions
Reproduction steps
Configuration
Version: 3.4.1
Platform:
The text was updated successfully, but these errors were encountered: