Error when running code on master channel.
Closed this issue · 3 comments
I get the following errors when I run the latest code base on the latest Master Channel.
/Users/jeremywhiteley/flutter/bin/flutter doctor --verbose
[✓] Flutter (Channel master, v1.10.15-pre.199, on Mac OS X 10.15 19A602, locale en-US)
• Flutter version 1.10.15-pre.199 at /Users/jeremywhiteley/flutter
• Framework revision 22f0bf87e4 (68 minutes ago), 2019-10-21 16:54:02 -0700
• Engine revision 8882bf3c73
• Dart version 2.6.0 (build 2.6.0-dev.8.0 a61c775db8)
Running Gradle task 'assembleDebug'...
Compiler message:
../../../flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-1.1.2+1/lib/src/cached_network_image_provider.dart:53:24: Error: The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'.
ImageStreamCompleter load(CachedNetworkImageProvider key) {
^
../../../flutter/packages/flutter/lib/src/painting/image_provider.dart:403:24: Context: This is the overridden method ('load').
ImageStreamCompleter load(T key, DecoderCallback decode);
^
../../../flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-1.1.2+1/lib/src/scaled_file_image.dart:45:24: Error: The method 'ScaledFileImage.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'.
ImageStreamCompleter load(ScaledFileImage key) {
^
../../../flutter/packages/flutter/lib/src/painting/image_provider.dart:403:24: Context: This is the overridden method ('load').
ImageStreamCompleter load(T key, DecoderCallback decode);
^
Exception: Errors during snapshot creation: null
#0 KernelSnapshot.build (package:flutter_tools/src/build_system/targets/dart.dart:230: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:125:48)
#10 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6)
#11 buildWithAssemble (package:flutter_tools/src/bundle.dart:99:31)
#12 BundleBuilder.build (package:flutter_tools/src/bundle.dart:75:11)
#13 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6)
#14 BundleBuilder.build (package:flutter_tools/src/bundle.dart:52: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.
FAILURE: Build failed with an exception.
-
Where:
Script '/Users/jeremywhiteley/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 794 -
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebugX86'.
Process 'command '/Users/jeremywhiteley/flutter/bin/flutter'' finished with non-zero exit value 1
-
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. -
Get more help at https://help.gradle.org
BUILD FAILED in 42s
Finished with error: Gradle task assembleDebug failed with exit code 1
he method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'
Looks like a compatibility issue with the latest release of Flutter. Check this.
You can upgrade flutter_cached_network_image
to 2.0.0-rc
to fix this.
I upgraded the flutter_cached_network_image and the other plugins as well, I still get errors. They must have changed something in the master channel that is causing breaks.
dependencies:
flutter:
sdk: flutter
intl: ^0.16.0
cupertino_icons: ^0.1.2
infinite_listview: ^1.0.0
firebase_auth: ^0.14.0+5 #to auth with firebase
google_sign_in: ^4.0.7 #to auth with google account
flutter_bloc: ^0.21.0 #heedelps in implementing blocs
equatable: ^0.5.0 #helps in comparing class using their values
cloud_firestore: ^0.12.9+5 #Firebase Database
image_picker: ^0.6.1+4 #image picker used for picking images from gallery
firebase_storage: ^3.0.6 #storage for storing image files
flutter_launcher_icons: ^0.7.2+1
shared_preferences: ^0.5.4
file_picker: ^1.4.2
emoji_picker: ^0.0.2
video_player: ^0.10.2+5
flutter_downloader: ^1.3.1
downloads_path_provider: ^0.1.0
flushbar: ^1.9.1
path_provider: ^1.4.0
cached_network_image: ^2.0.0-rc
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Note: /Users/jeremywhiteley/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.9+5/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/jeremywhiteley/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.9+5/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/jeremywhiteley/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_downloader-1.3.1/android/src/main/java/vn/hunghd/flutterdownloader/DownloadWorker.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/Users/jeremywhiteley/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.4/android/src/main/java/io/flutter/plugins/sharedpreferences/MethodCallHandlerImpl.java:137: warning: [unchecked] unchecked cast
return (List) stream.readObject();
^
required: List
found: Object
/Users/jeremywhiteley/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.4/android/src/main/java/io/flutter/plugins/sharedpreferences/MethodCallHandlerImpl.java:182: warning: [unchecked] unchecked method invocation: constructor in class ArrayList is applied to given types
List listValue = new ArrayList<>((Set) value);
^
required: Collection<? extends E>
found: Set
where E is a type-variable:
E extends Object declared in class ArrayList
/Users/jeremywhiteley/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.4/android/src/main/java/io/flutter/plugins/sharedpreferences/MethodCallHandlerImpl.java:182: warning: [unchecked] unchecked conversion
List listValue = new ArrayList<>((Set) value);
^
required: Collection<? extends E>
found: Set
where E is a type-variable:
E extends Object declared in class ArrayList
/Users/jeremywhiteley/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.4/android/src/main/java/io/flutter/plugins/sharedpreferences/MethodCallHandlerImpl.java:182: warning: [unchecked] unchecked conversion
List listValue = new ArrayList<>((Set) value);
^
required: List
found: ArrayList
4 warnings
Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk...
Flutter is taking longer than expected to report its views. Still trying...
I/FA ( 6914): Tag Manager is not found and thus will not be used
Syncing files to device Android SDK built for x86...
W/exter.medtexte( 6914): Accessing hidden method Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J (light greylist, reflection)
W/exter.medtexte( 6914): Accessing hidden method Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J (light greylist, reflection)
W/exter.medtexte( 6914): Accessing hidden field Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArray; (light greylist, reflection)
W/exter.medtexte( 6914): Accessing hidden method Landroid/util/LongArray;->get(I)J (light greylist, reflection)
I/OpenGLRenderer( 6914): Initialized EGL, version 1.4
D/OpenGLRenderer( 6914): Swap behavior 1
D/ ( 6914): HostConnection::get() New Host Connection established 0xe3191b80, tid 6960
W/OpenGLRenderer( 6914): Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
D/OpenGLRenderer( 6914): Swap behavior 0
D/EGL_emulation( 6914): eglCreateContext: 0xe367eca0: maj 3 min 0 rcv 3
D/EGL_emulation( 6914): eglMakeCurrent: 0xe367eca0: ver 3 0 (tinfo 0xe3621d10)
D/ ( 6914): HostConnection::get() New Host Connection established 0xe3191400, tid 6948
D/EGL_emulation( 6914): eglCreateContext: 0xd24711e0: maj 3 min 0 rcv 3
D/EGL_emulation( 6914): eglMakeCurrent: 0xd24711e0: ver 3 0 (tinfo 0xe36217e0)
E/flutter ( 6914): [ERROR:flutter/lib/ui/ui_dart_state.cc(144)] Unhandled Exception: ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized.
E/flutter ( 6914): If you're running an application and need to access the binary messenger before runApp()
has been called (for example, during plugin initialization), then you need to explicitly call the WidgetsFlutterBinding.ensureInitialized()
first.
E/flutter ( 6914): If you're running a test, you can call the TestWidgetsFlutterBinding.ensureInitialized()
as the first line in your test's main()
method to initialize the binding.
E/flutter ( 6914): #0 defaultBinaryMessenger. (package:flutter/src/services/binary_messenger.dart:73:7)
E/flutter ( 6914): #1 defaultBinaryMessenger (package:flutter/src/services/binary_messenger.dart:86:4)
E/flutter ( 6914): #2 MethodChannel.binaryMessenger (package:flutter/src/services/platform_channel.dart:140:62)
E/flutter ( 6914): #3 MethodChannel.setMethodCallHandler (package:flutter/src/services/platform_channel.dart:368:5)
E/flutter ( 6914): #4 new FirebaseAuth._ (package:firebase_auth/src/firebase_auth.dart:15:13)
E/flutter ( 6914): #5 FirebaseAuth.instance (package:firebase_auth/src/firebase_auth.dart:25:53)
E/flutter ( 6914): #6 FirebaseAuth.instance (package:firebase_auth/src/firebase_auth.dart:25:29)
E/flutter ( 6914): #7 new AuthenticationProvider (package:messio/providers/AuthenticationProvider.dart:13:52)
E/flutter ( 6914): #8 new AuthenticationRepository (package:messio/repositories/AuthenticationRepository.dart:8:55)
E/flutter ( 6914): #9 main (package:messio/main.dart:22:51)
E/flutter ( 6914):
E/flutter ( 6914): #10 _runMainZoned.. (dart:ui/hooks.dart:239:25)
E/flutter ( 6914): #11 _rootRun (dart:async/zone.dart:1124:13)
E/flutter ( 6914): #12 _CustomZone.run (dart:async/zone.dart:1021:19)
E/flutter ( 6914): #13 _runZoned (dart:async/zone.dart:1516:10)
E/flutter ( 6914): #14 runZoned (dart:async/zone.dart:1500:12)
E/flutter ( 6914): #15 _runMainZoned. (dart:ui/hooks.dart:231:5)
E/flutter ( 6914): #16 _startIsolate. (dart:isolate-patch/isolate_patch.dart:305:19)
E/flutter ( 6914): #17 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
E/flutter ( 6914):
D/EGL_emulation( 6914): eglMakeCurrent: 0xe367eca0: ver 3 0 (tinfo 0xe3621d10)
I upgraded the flutter_cached_network_image and the other plugins as well, I still get errors. They must have changed something in the master channel that is causing breaks.
dependencies:
flutter:
sdk: flutter
intl: ^0.16.0
cupertino_icons: ^0.1.2
infinite_listview: ^1.0.0
firebase_auth: ^0.14.0+5 #to auth with firebase
google_sign_in: ^4.0.7 #to auth with google account
flutter_bloc: ^0.21.0 #heedelps in implementing blocs
equatable: ^0.5.0 #helps in comparing class using their values
cloud_firestore: ^0.12.9+5 #Firebase Database
image_picker: ^0.6.1+4 #image picker used for picking images from gallery
firebase_storage: ^3.0.6 #storage for storing image files
flutter_launcher_icons: ^0.7.2+1
shared_preferences: ^0.5.4
file_picker: ^1.4.2
emoji_picker: ^0.0.2
video_player: ^0.10.2+5
flutter_downloader: ^1.3.1
downloads_path_provider: ^0.1.0
flushbar: ^1.9.1
path_provider: ^1.4.0
cached_network_image: ^2.0.0-rcLaunching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Note: /Users/jeremywhiteley/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.9+5/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/jeremywhiteley/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.9+5/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/jeremywhiteley/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_downloader-1.3.1/android/src/main/java/vn/hunghd/flutterdownloader/DownloadWorker.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/Users/jeremywhiteley/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.4/android/src/main/java/io/flutter/plugins/sharedpreferences/MethodCallHandlerImpl.java:137: warning: [unchecked] unchecked cast
return (List) stream.readObject();
^
required: List
found: Object
/Users/jeremywhiteley/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.4/android/src/main/java/io/flutter/plugins/sharedpreferences/MethodCallHandlerImpl.java:182: warning: [unchecked] unchecked method invocation: constructor in class ArrayList is applied to given types
List listValue = new ArrayList<>((Set) value);
^
required: Collection<? extends E>
found: Set
where E is a type-variable:
E extends Object declared in class ArrayList
/Users/jeremywhiteley/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.4/android/src/main/java/io/flutter/plugins/sharedpreferences/MethodCallHandlerImpl.java:182: warning: [unchecked] unchecked conversion
List listValue = new ArrayList<>((Set) value);
^
required: Collection<? extends E>
found: Set
where E is a type-variable:
E extends Object declared in class ArrayList
/Users/jeremywhiteley/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.4/android/src/main/java/io/flutter/plugins/sharedpreferences/MethodCallHandlerImpl.java:182: warning: [unchecked] unchecked conversion
List listValue = new ArrayList<>((Set) value);
^
required: List
found: ArrayList
4 warnings
Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk...
Flutter is taking longer than expected to report its views. Still trying...
I/FA ( 6914): Tag Manager is not found and thus will not be used
Syncing files to device Android SDK built for x86...
W/exter.medtexte( 6914): Accessing hidden method Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J (light greylist, reflection)
W/exter.medtexte( 6914): Accessing hidden method Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J (light greylist, reflection)
W/exter.medtexte( 6914): Accessing hidden field Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArray; (light greylist, reflection)
W/exter.medtexte( 6914): Accessing hidden method Landroid/util/LongArray;->get(I)J (light greylist, reflection)
I/OpenGLRenderer( 6914): Initialized EGL, version 1.4
D/OpenGLRenderer( 6914): Swap behavior 1
D/ ( 6914): HostConnection::get() New Host Connection established 0xe3191b80, tid 6960
W/OpenGLRenderer( 6914): Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
D/OpenGLRenderer( 6914): Swap behavior 0
D/EGL_emulation( 6914): eglCreateContext: 0xe367eca0: maj 3 min 0 rcv 3
D/EGL_emulation( 6914): eglMakeCurrent: 0xe367eca0: ver 3 0 (tinfo 0xe3621d10)
D/ ( 6914): HostConnection::get() New Host Connection established 0xe3191400, tid 6948
D/EGL_emulation( 6914): eglCreateContext: 0xd24711e0: maj 3 min 0 rcv 3
D/EGL_emulation( 6914): eglMakeCurrent: 0xd24711e0: ver 3 0 (tinfo 0xe36217e0)
E/flutter ( 6914): [ERROR:flutter/lib/ui/ui_dart_state.cc(144)] Unhandled Exception: ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized.
E/flutter ( 6914): If you're running an application and need to access the binary messenger beforerunApp()
has been called (for example, during plugin initialization), then you need to explicitly call theWidgetsFlutterBinding.ensureInitialized()
first.
E/flutter ( 6914): If you're running a test, you can call theTestWidgetsFlutterBinding.ensureInitialized()
as the first line in your test'smain()
method to initialize the binding.
E/flutter ( 6914): #0 defaultBinaryMessenger. (package:flutter/src/services/binary_messenger.dart:73:7)
E/flutter ( 6914): #1 defaultBinaryMessenger (package:flutter/src/services/binary_messenger.dart:86:4)
E/flutter ( 6914): #2 MethodChannel.binaryMessenger (package:flutter/src/services/platform_channel.dart:140:62)
E/flutter ( 6914): #3 MethodChannel.setMethodCallHandler (package:flutter/src/services/platform_channel.dart:368:5)
E/flutter ( 6914): #4 new FirebaseAuth._ (package:firebase_auth/src/firebase_auth.dart:15:13)
E/flutter ( 6914): #5 FirebaseAuth.instance (package:firebase_auth/src/firebase_auth.dart:25:53)
E/flutter ( 6914): #6 FirebaseAuth.instance (package:firebase_auth/src/firebase_auth.dart:25:29)
E/flutter ( 6914): #7 new AuthenticationProvider (package:messio/providers/AuthenticationProvider.dart:13:52)
E/flutter ( 6914): #8 new AuthenticationRepository (package:messio/repositories/AuthenticationRepository.dart:8:55)
E/flutter ( 6914): #9 main (package:messio/main.dart:22:51)
E/flutter ( 6914):
E/flutter ( 6914): #10 _runMainZoned.. (dart:ui/hooks.dart:239:25)
E/flutter ( 6914): #11 _rootRun (dart:async/zone.dart:1124:13)
E/flutter ( 6914): #12 _CustomZone.run (dart:async/zone.dart:1021:19)
E/flutter ( 6914): #13 _runZoned (dart:async/zone.dart:1516:10)
E/flutter ( 6914): #14 runZoned (dart:async/zone.dart:1500:12)
E/flutter ( 6914): #15 _runMainZoned. (dart:ui/hooks.dart:231:5)
E/flutter ( 6914): #16 _startIsolate. (dart:isolate-patch/isolate_patch.dart:305:19)
E/flutter ( 6914): #17 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
E/flutter ( 6914):
D/EGL_emulation( 6914): eglMakeCurrent: 0xe367eca0: ver 3 0 (tinfo 0xe3621d10)
Yes. I think it's a compatibility issue with the cached_network_image
and latest version of Flutter. For now you can downgrade it to cached_network_image: ^1.1.1