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

Library is incompatible with latest Flutter master #261

Closed
tadejkan opened this issue Oct 15, 2019 · 15 comments
Closed

Library is incompatible with latest Flutter master #261

tadejkan opened this issue Oct 15, 2019 · 15 comments

Comments

@tadejkan
Copy link

Running newest library (1.1.1) and newest Flutter, it produces error:
Error: The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'

It seems to be related to changes from PR flutter/flutter#41415

@TomLiu-GitHub
Copy link

I also have this problem.

@provokateurin
Copy link

Got the same error, but running flutter version 1.10.14 is a temporary fix for that problem.

@prasant10050
Copy link

I am also facing this issue on production and development app

@prasant10050
Copy link

../../.pub-cache/hosted/pub.dartlang.org/cached_network_image-1.1.1/lib/src/cached_network_image_provider.dart:42:24: Error: The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'.
[ ] ImageStreamCompleter load(CachedNetworkImageProvider key) {
[ ] ^
[ ] ../../Library/flutter/packages/flutter/lib/src/painting/image_provider.dart:403:24: Context: This is the overridden method ('load').
[ ] ImageStreamCompleter load(T key, DecoderCallback decode);
[ ] ^
[+8201 ms] Exception: Errors during snapshot creation: null
[ ] #0 KernelSnapshot.build (package:flutter_tools/src/build_system/targets/dart.dart:225:7)
[ ]
[ ] #1 _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:526:25)
[ ]
[ ] #2 _BuildInstance.invokeTarget. (package:flutter_tools/src/build_system/build_system.dart:481:35)
[ ] #3 new Future.sync (dart:async/future.dart:224:31)
[ ] #4 AsyncMemoizer.runOnce (package:async/src/async_memoizer.dart:43:45)
[ ] #5 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:481:21)
[ ]
[ ]
[ ] #6 BuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:419:36)
[ ] #7 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6)
[ ] #8 BuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:400:28)
[ ] #9 buildWithAssemble (package:flutter_tools/src/bundle.dart:172:48)
[ ] #10 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6)
[ ] #11 buildWithAssemble (package:flutter_tools/src/bundle.dart:148:31)
[ ] #12 BundleBuilder.build (package:flutter_tools/src/bundle.dart:85:13)
[ ] #13 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6)
[ ] #14 BundleBuilder.build (package:flutter_tools/src/bundle.dart:58:21)
[ ] #15 BuildBundleCommand.runCommand (package:flutter_tools/src/commands/build_bundle.dart:126:25)
[ ] #16 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6)
[ ] #17 BuildBundleCommand.runCommand (package:flutter_tools/src/commands/build_bundle.dart:97:42)
[ ] #18 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:557:18)
[ ] #19 _asyncThenWrapperHelper. (dart:async-patch/async_patch.dart:71:64)
[ ] #20 _rootRunUnary (dart:async/zone.dart:1132:38)
[ ] #21 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
[ ] #22 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
[ ] #23 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
[ ] #24 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
[ ] #25 Future._completeWithValue (dart:async/future_impl.dart:522:5)
[ ] #26 Future._asyncComplete. (dart:async/future_impl.dart:552:7)
[ ] #27 _rootRun (dart:async/zone.dart:1124:13)
[ ] #28 _CustomZone.run (dart:async/zone.dart:1021:19)
[ ] #29 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
[ ] #30 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:963:23)
[ ] #31 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
[ ] #32 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
[ ] #33 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
[ ] #34 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)
[ ] Failed to build bundle.

@calvinmuller
Copy link

Same issue

calvinmuller added a commit to calvinmuller/flutter_cached_network_image that referenced this issue Oct 15, 2019
@provokateurin
Copy link

The problematic commit got reverted and the new PR which relands the changes doesn't change the API so this can be closed I think.

@masewo
Copy link

masewo commented Oct 16, 2019

Relanding seems to change the API:
flutter/flutter@3bbf54d

@virskor
Copy link

virskor commented Oct 17, 2019

same

@virskor
Copy link

virskor commented Oct 17, 2019

Flutter (Channel master, v1.10.15-pre.148, on Mac OS X 10.14.6 18G103, locale zh-Hans-CN) same

@renefloor
Copy link
Collaborator

I published a quick fix for this as 2.0.0-rc. Wil remove the -rc tag when this flutter version reaches stable. I added a minimum SDK version of 1.10.15-pre.148 as @virskor mentioned that version and I have .151. I couldn't really find the version where this change was introduced.

@lifenautjoe
Copy link

Thanks for the quick fix @renefloor ! Do you have a buymeacoffee page? Would be happy to send you some coffee your way :-)

@renefloor
Copy link
Collaborator

@lifenautjoe I just see your message now, but you are free to buy me a coffee through https://www.paypal.me/renefloor

I'll have a look at more user friendly donate pages :)

@ShaktiSubhraPSwain
Copy link

I published a quick fix for this as 2.0.0-rc. Wil remove the -rc tag when this flutter version reaches stable. I added a minimum SDK version of 1.10.15-pre.148 as @virskor mentioned that version and I have .151. I couldn't really find the version where this change was introduced.

@renefloor I am not getting what needs to do here? I just switched dev channel to master channel got The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method 'ImageProvider.load' this error. Thanks

@deisold
Copy link

deisold commented Nov 19, 2019

I get "flutter_map 0.7.3 depends on cached_network_image ^1.1.0". So using 2.0.0-rc is not an option for me. In 1.1.3 the error persists.

Since cached_network_image is not the only dependency I'm using, would it be an option to release a 1.1.4-rc @renefloor ?

@fmatuszewski
Copy link

you can switch to stable flutter channel and it should help for now.

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