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

On Beta Channel, Crashes with SecurityError #986

Open
michaelheider opened this issue Nov 4, 2024 · 2 comments
Open

On Beta Channel, Crashes with SecurityError #986

michaelheider opened this issue Nov 4, 2024 · 2 comments

Comments

@michaelheider
Copy link

🔙 Regression

On Flutter beta channel, the below crashes the application. The stable branch is fine.

Possibly related to this issue with Flutter's Image.network widget.

Old (and correct) behavior

Show the image.

Current behavior

App crashes.

Reproduction steps

  1. build sample app
  2. open sample app
  3. monitor browser console for crash logs
`main.dart`
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/widgets.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return CachedNetworkImage(
      imageUrl:
          'https://fastly.picsum.photos/id/505/40/40.jpg?hmac=egB4BZLkmlPCkk32_xTVvQg2I8QZH2w369evjD3Q1Pk',
    );
  }
}

Logs

First, a whole bunch of these:

main.dart.js:3193 Uncaught Error: SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The image element contains cross-origin data, and may not be loaded.

Then, a whole bunch of these:

main.dart.js:3193 Uncaught Error: RuntimeError: memory access out of bounds
    at canvaskit.wasm:0xd89f
    at canvaskit.wasm:0x83f5
    at canvaskit.wasm:0x44a9e5
    at canvaskit.wasm:0x723cd
    at Tb.<anonymous> (canvaskit.js:116:52)
    at Tb.<anonymous> (canvaskit.js:156:256)
    at new PictureRecorder (canvaskit.js:105:189)
    at cS.iG (main.dart.js:11501:13)
    at xJ.$0 (main.dart.js:11178:7)
    at Object.Oa (main.dart.js:1109:17)

The complete stack traces are very long and unreadable. See an export here: browser-console.log

Depending on the surrounding app, the errors are also different, but go into a similar direction.

Uncaught : Null check operator used on a null value in here browser-console_2.log.

I have also seen something along the lines of (reciting from memory) Function Argument Missmatch Error, but cannot reproduce that case at the moment.

Configuration

  • Flutter version: Channel beta, 3.27.0-0.1.pre
  • cached_network_image Version: 3.4.1
  • Platform: web
@Reprevise
Copy link

Now that Flutter 3.27 has hit stable as of today, this issue will be way more prevalent.

@hanswimtj
Copy link

Same error

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

3 participants