Skip to content

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

Closed
@rednikisfun

Description

@rednikisfun

🐛 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 causes Additional 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

  1. Create a project with flutter version 3.27.0
  2. Use CachedNetworkImage
  3. Run project in web

Configuration

Version: 3.4.1

Platform:

  • :web

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions