fluttercandies / flutter_image_compress

flutter image compress
MIT License
633 stars 214 forks source link

[Bug report] Error: MissingPluginException(No implementation found for method compressWithList on channel flutter_image_compress) #237

Closed arualana closed 1 year ago

arualana commented 1 year ago

Version

^1.0.0-nullsafety

Platforms

Web

Device Model

Computer

flutter info

[√] Flutter (Channel stable, 3.0.3, on Microsoft Windows [Version 10.0.19045.2604], locale en-CA)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0-rc1)
[√] Chrome - develop for the web

[√] Android Studio (version 2020.3)
[√] Connected device (4 available)
[√] HTTP Host Availability

How to reproduce?

Let file be a PlatformFile with non null bytes

final result = await FlutterImageCompress.compressWithList(
      file.bytes!,
      minWidth: 500,
      minHeight: 500,
      quality: 94,
      keepExif: true,
    );

Logs

Error: MissingPluginException(No implementation found for method compressWithList on channel flutter_image_compress)
    at Object.throw_ [as throw] (http://localhost:34039/dart_sdk.js:5080:11)
    at MethodChannel._invokeMethod (http://localhost:34039/packages/flutter/src/services/restoration.dart.lib.js:1567:21)
    at _invokeMethod.next (<anonymous>)
    at http://localhost:34039/dart_sdk.js:40641:33
    at _RootZone.runUnary (http://localhost:34039/dart_sdk.js:40511:59)
    at _FutureListener.thenAwait.handleValue (http://localhost:34039/dart_sdk.js:35438:29)
    at handleValueCallback (http://localhost:34039/dart_sdk.js:35999:49)
    at _Future._propagateToListeners (http://localhost:34039/dart_sdk.js:36037:17)
    at [_completeWithValue] (http://localhost:34039/dart_sdk.js:35872:23)
    at async._AsyncCallbackEntry.new.callback (http://localhost:34039/dart_sdk.js:35906:35)
    at Object._microtaskLoop (http://localhost:34039/dart_sdk.js:40778:13)
    at _startMicrotaskLoop (http://localhost:34039/dart_sdk.js:40784:13)
    at http://localhost:34039/dart_sdk.js:36261:9

Example code (optional)

Let `file` be a PlatformFile with non null bytes

    final result = await FlutterImageCompress.compressWithList(
          file.bytes!,
          minWidth: 500,
          minHeight: 500,
          quality: 94,
          keepExif: true,
        );

Contact

No response

towcar commented 1 year ago

I wouldn't call this a bug as the package isn't supported on web currently.

ILittleNiZi commented 1 year ago

I'm facing the same error when running on ios.

CaiJingLong commented 1 year ago

Use 2.0.1