fluttercandies / flutter_image_compress

flutter image compress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug report] call FlutterImageCompress.compressWithList on web get Unimplemented error

MayaBloodsAI opened this issue · comments

Version

2.1.0

Platforms

Web

Device Model

Chrome

flutter info

[√] Flutter (Channel stable, 3.16.2, on Microsoft Windows [Version 10.0.19045.4046], locale en-IL)
    • Flutter version 3.16.2 on channel stable at C:\Users\Maya\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9e1c857886 (3 months ago), 2023-11-30 11:51:18 -0600
    • Engine revision cf7a9d0800
    • Dart version 3.2.2
    • DevTools version 2.28.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Maya\AppData\Local\Android\Sdk
    • Platform android-33, build-tools 30.0.3
    • ANDROID_SDK_ROOT = C:\Users\Maya\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop Windows apps
    X Visual Studio not installed; this is necessary to develop Windows apps.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2021.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version openjdk version "11.0.13" 2021-10-19

[√] VS Code (version 1.86.1)
    • VS Code at C:\Users\Maya\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.84.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19045.4046]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 122.0.6261.112
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 122.0.2365.80

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

How to reproduce?

Jest call :

            capturedImage = await FlutterImageCompress.compressWithList(
              capturedImage,
              minWidth: 300,
            );

on flutter web

Logs

UnimplementedError

Example code (optional)

capturedImage = await FlutterImageCompress.compressWithList(
                  capturedImage,
                  minWidth: 300,
                );

Contact

No response

commented

I have this issue too, It only occurred when I deploy to it eg with firebase hosting

Yes this is correct!! BUT with regular internet i get:

Expected a value of type 'Function', but got one of type 'Null'
(I will open a new issue for that)
I think they need to provide a better error messages (:

I guess it can be closed.. the error msg is not correct but this is very minor problem..

Works fine on release mode and debug mode in localhost, only stops working after hosted.(Firebase hosting)
image

@MayaBloodsAI how did you solve the unimplemented error I keep getting it only on release mode in firebase hosting

I don't get why was this closed?
I am having the same error (firebase hosting) and there was no solution offered...

@orikurt i found out how to solve this problem, you have to upgrade the web package in the pubspec.yaml to the newest version.

web: ^0.5.1