Unresolved reference: firebasemessaging - flutter

Getting this error i have try to fixed this ref:Application.kt: Unresolved reference: firebasemessaging but didnt work so i need to posted again i also tried to delete the application.kt file but didnt work. If anyone know the solution please let me know what i am doing wrong so i can learn to not repeat these again
ext.kotlin_version = '1.4.32'
dependencies {
classpath 'com.android.tools.build:gradle:3.6.4'
classpath 'com.google.gms:google-services:4.3.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
package com.godatu.dance
import io.flutter.app.FlutterApplication
import io.flutter.plugin.common.PluginRegistry
import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService
class Application : FlutterApplication(), PluginRegistry.PluginRegistrantCallback {
override fun onCreate() {
super.onCreate()
FlutterFirebaseMessagingService.setPluginRegistrant(this)
}
override fun registerWith(registry: PluginRegistry?) {
if (registry != null) {
FirebaseCloudMessagingPluginRegistrant.registerWith(registry)
FlutterLocalNotificationPluginRegistrant.registerWith(registry)
FlutterPathProviderPluginRegistrant.registerWith(registry)
}
}
}
enter code here
[ +2 ms] e: C:\Users\Admin\Desktop\Android\godatu-App\android\app\src\main\kotlin\com\godatu\dance\Application.kt: (6, 27): Unresolved reference: firebasemessaging
[ +3 ms] e: C:\Users\Admin\Desktop\Android\godatu-App\android\app\src\main\kotlin\com\godatu\dance\Application.kt: (7, 27): Unresolved reference: firebasemessaging
[ ] e: C:\Users\Admin\Desktop\Android\godatu-App\android\app\src\main\kotlin\com\godatu\dance\Application.kt: (12, 9): Unresolved reference: FlutterFirebaseMessagingService
[ ] e: C:\Users\Admin\Desktop\Android\godatu-App\android\app\src\main\kotlin\com\godatu\dance\Application.kt: (20, 7): Redeclaration: FirebaseCloudMessagingPluginRegistrant
[ ] e: C:\Users\Admin\Desktop\Android\godatu-App\android\app\src\main\kotlin\com\godatu\dance\Application.kt: (26, 13): Unresolved reference: FirebaseMessagingPlugin
[ ] e: C:\Users\Admin\Desktop\Android\godatu-App\android\app\src\main\kotlin\com\godatu\dance\FirebaseCloudMessagingPluginRegistrant.kt: (5, 27): Unresolved reference: firebasemessaging
[ ] e: C:\Users\Admin\Desktop\Android\godatu-App\android\app\src\main\kotlin\com\godatu\dance\FirebaseCloudMessagingPluginRegistrant.kt: (8, 7): Redeclaration: FirebaseCloudMessagingPluginRegistrant
[ ] e: C:\Users\Admin\Desktop\Android\godatu-App\android\app\src\main\kotlin\com\godatu\dance\FirebaseCloudMessagingPluginRegistrant.kt: (17, 17): Unresolved reference: FirebaseMessagingPlugin
[ +84 ms] FAILURE: Build failed with an exception.
[ ] * What went wrong:
[ ] Execution failed for task ':app:compileDebugKotlin'.
[ ] > Compilation error. See log for more details
[ ] * 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 27s
[ ] 399 actionable tasks: 5 executed, 394 up-to-date
[{"event":"app.progress","params":{"appId":"82f5465d-087d-4b13-8c4a-7ae1698e399b","id":"0","progressId":null,"finished":true}}]
[+5408 ms] Exception: Gradle task assembleDebug failed with exit code 1
[ +4 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:550:9)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1157:12)
<asynchronous suspension>
#3 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1009:27)
<asynchronous suspension>
#4 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#5 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
<asynchronous suspension>
#6 CommandRunner.runCommand (package:args/command_runner.dart:197:13)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:278:9)
<asynchronous suspension>
#8 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#9 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
<asynchronous suspension>
#10 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:234:5)
<asynchronous suspension>
#11 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:64:9)
<asynchronous suspension>
#12 run.<anonymous closure> (package:flutter_tools/runner.dart:62:12)
<asynchronous suspension>
#13 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#14 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
<asynchronous suspension>
#15 runInContext (package:flutter_tools/src/context_runner.dart:73:10)
<asynchronous suspension>
#16 main (package:flutter_tools/executable.dart:90:3)
<asynchronous suspension>
[{"event":"app.stop","params":{"appId":"82f5465d-087d-4b13-8c4a-7ae1698e399b"}}]
[ +18 ms] "flutter run" took 36,338ms.
[{"id":0,"error":"app '82f5465d-087d-4b13-8c4a-7ae1698e399b' not found","trace":"#0 AppDomain.stop (package:flutter_tools/src/commands/daemon.dart:698:7)\n#1 Domain.handleCommand.<anonymous closure> (package:flutter_tools/src/commands/daemon.dart:217:34)\n#2 new Future.sync (dart:async/future.dart:218:31)\n#3 Domain.handleCommand (package:flutter_tools/src/commands/daemon.dart:215:5)\n#4 Daemon._handleRequest (package:flutter_tools/src/commands/daemon.dart:141:28)\n#5 _rootRunUnary (dart:async/zone.dart:1362:47)\n#6 _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#7 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#8 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#9 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#10 _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11)\n#11 _MapStream._handleData (dart:async/stream_pipe.dart:218:10)\n#12 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)\n#13 _rootRunUnary (dart:async/zone.dart:1362:47)\n#14 _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#15 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#16 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#17 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#18 _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11)\n#19 _WhereStream._handleData (dart:async/stream_pipe.dart:195:12)\n#20 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)\n#21 _rootRunUnary (dart:async/zone.dart:1362:47)\n#22 _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#23 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#24 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#25 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#26 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)\n#27 _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)\n#28 _StringAdapterSink.add (dart:convert/string_conversion.dart:238:11)\n#29 _LineSplitterSink._addLines (dart:convert/line_splitter.dart:155:13)\n#30 _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:130:5)\n#31 StringConversionSinkMixin.add (dart:convert/string_conversion.dart:163:5)\n#32 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)\n#33 _rootRunUnary (dart:async/zone.dart:1362:47)\n#34 _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#35 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#36 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#37 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#38 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)\n#39 _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)\n#40 _StringAdapterSink.add (dart:convert/string_conversion.dart:238:11)\n#41 _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:243:7)\n#42 _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:317:20)\n#43 _Utf8ConversionSink.add (dart:convert/string_conversion.dart:310:5)\n#44 _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:72:18)\n#45 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)\n#46 _rootRunUnary (dart:async/zone.dart:1362:47)\n#47 _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#48 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#49 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#50 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#51 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)\n#52 _StreamController._add (dart:async/stream_controller.dart:607:7)\n#53 _StreamController.add (dart:async/stream_controller.dart:554:5)\n#54 _Socket._onData (dart:io-patch/socket_patch.dart:2144:41)\n#55 _rootRunUnary (dart:async/zone.dart:1370:13)\n#56 _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#57 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#58 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#59 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#60 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)\n#61 _StreamController._add (dart:async/stream_controller.dart:607:7)\n#62 _StreamController.add (dart:async/stream_controller.dart:554:5)\n#63 new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1680:33)\n#64 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1192:14)\n#65 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)\n#66 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)\n#67 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:120:13)\n#68 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:185:5)\n"}]

You don't need to take care of registrant in flutter v2. It will automatically handles it by itself. Hence you don't need to include Application class.

I'm guessing you're on an older version of Firebase core and messaging and any other firebase plugins you have. I just went through a bunch of similar headaches, tried all those solutions, went through a bunch of github threads, nothing worked.
What did work, was forcing myself to upgrade to null safety just so I could use all the up to date firebase plugins. After that, FCM works like a charm and you don't have to touch your Kotlin/Java file.
When I first tried to implement FCM, I had ended up with a chain of firebase dependency conflicts with firebase storage/analytics etc...that wasn't resolved until I was down to versions 1-2 years old on some of those plugins.
Now with all these current versions
firebase_analytics: ^8.0.0
firebase_core: ^1.0.3
firebase_messaging: ^9.1.1
firebase_storage: ^8.0.3
My Kotlin file is untouched and background notifications don't crash my app.
So it may not be the answer you're looking for, and perhaps not all your dependencies have upgraded to null safety and you can't upgrade anyway, but it's something to consider.
Because if you do upgrade to all the current versions (and Android Embedding if your app is still on V1), then you just follow the FlutterFire FCM Guide and it all just works with very minimal setup.
It appears the Google team did a lot of work to make it a smoother process because people were justifiably pissed off that it was such a messy process getting 2 Google products to play nicely together.

Related

How to Fix: failed to upload the package. flutter

I am trying to publish my first package for the first time and when I use flutter packages pub publish, it give me in the end.
Uploading...
Failed to upload the package.
pub finished with exit code 1
The log for flutter packages pub publish -v is:
ERR : Failed to upload the package.
FINE: Exception type: ApplicationException
FINE: package:pub/src/utils.dart 512:5 fail
| package:pub/src/command/lish.dart 109:9 LishCommand._publish
| ===== asynchronous gap ===========================
| dart:async Future.catchError
| package:pub/src/utils.dart 113:52 captureErrors.wrappedCallback
| package:stack_trace Chain.capture
| package:pub/src/utils.dart 126:11 captureErrors
| package:pub/src/command.dart 164:13 PubCommand.run
| package:args/command_runner.dart 196:27 CommandRunner.runCommand
| package:pub/src/command_runner.dart 150:26 PubCommandRunner.runCommand
| package:pub/src/command_runner.dart 138:18 PubCommandRunner.run
| C:\b\s\w\ir\cache\builder\src\third_party\dart\third_party\pkg\pub\bin\pub.dart 9:48 main
[+15501 ms] "flutter pub" took 15,607ms.
[ +6 ms] pub finished with exit code 1
[ +2 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 _DefaultPub.interactively (package:flutter_tools/src/dart/pub.dart:366:7)
<asynchronous suspension>
#2 PackagesPassthroughCommand.runCommand (package:flutter_tools/src/commands/packages.dart:267:5)
<asynchronous suspension>
#3 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1043:27)
<asynchronous suspension>
#4 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#5 CommandRunner.runCommand (package:args/command_runner.dart:196:13)
<asynchronous suspension>
#6 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)
<asynchronous suspension>
#7 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#8 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)
<asynchronous suspension>
#9 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#10 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#11 main (package:flutter_tools/executable.dart:91:3)
<asynchronous suspension>
[ +6 ms] ensureAnalyticsSent: 4ms
[ +3 ms] Running shutdown hooks
[ ] Shutdown hooks complete
[ ] exiting with code 1
I tried to delete credentials.json file and the auth process gave me success but it still the same problem.
I found it.
delete .pub-cache folder inside src/flutter and invalid cach
invalid cache and restart your IDE
in terminal flutter packages pub publish
done.

flutter build apk error with gradle exit code 1

When I run flutter build apk -v, I see the following output:
[ +1 ms] *********************************************************
[ ] WARNING: This version of shared_preferences will break your Android build if it or its
dependencies aren't compatible with AndroidX.
[ +1 ms] See ---(google url)--- for more information on the problem and how to fix it.[ +1 ms] This warning prints for all Android build failures. The real root cause of the
error may be unrelated.
[ +5 ms] *********************************************************
[ +7 ms] 197 actionable tasks: 7 executed, 190 up-to-date
[ +370 ms] Running Gradle task 'assembleRelease'... (completed in 46.8s)
[ +5 ms] "flutter apk" took 53,500ms.
[ ] "flutter apk" took 53,500ms.
Gradle task assembleRelease failed with exit code 1
#0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1 _buildGradleProjectV2 (package:flutter_tools/src/android/gradle.dart:507:5)
<asynchronous suspension>
#2 buildGradleProject (package:flutter_tools/src/android/gradle.dart:346:14)
<asynchronous suspension>
#3 buildApk (package:flutter_tools/src/android/apk.dart:34:9)
<asynchronous suspension>
#4 BuildApkCommand.runCommand (package:flutter_tools/src/commands/build_apk.dart:79:11)
<asynchronous suspension>
#5 FlutterCommand.verifyThenRunCommand
(package:flutter_tools/src/runner/flutter_command.dart:478:18)
<asynchronous suspension>
#6 FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:383:33)
<asynchronous suspension>
#7 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:29)
<asynchronous suspension>
#8 _rootRun (dart:async/zone.dart:1124:13)
#9 _CustomZone.run (dart:async/zone.dart:1021:19)
#10 _runZoned (dart:async/zone.dart:1516:10)
#11 runZoned (dart:async/zone.dart:1463:12)
#12 AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
<asynchronous suspension>
#13 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:375:20)
#14 CommandRunner.runCommand (package:args/command_runner.dart:197:27)
<asynchronous suspension>
#15 FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:396:21)
<asynchronous suspension>
#16 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:29)
<asynchronous suspension>
#17 _rootRun (dart:async/zone.dart:1124:13)
#18 _CustomZone.run (dart:async/zone.dart:1021:19)
#19 _runZoned (dart:async/zone.dart:1516:10)
#20 runZoned (dart:async/zone.dart:1463:12)
#21 AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
<asynchronous suspension>
#22 FlutterCommandRunner.runCommand
(package:flutter_tools/src/runner/flutter_command_runner.dart:356:19)
<asynchronous suspension>
#23 CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#24 new Future.sync (dart:async/future.dart:224:31)
#25 CommandRunner.run (package:args/command_runner.dart:112:14)
#26 FlutterCommandRunner.run
(package:flutter_tools/src/runner/flutter_command_runner.dart:242:18)
#27 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:22)
<asynchronous suspension>
#28 _rootRun (dart:async/zone.dart:1124:13)
#29 _CustomZone.run (dart:async/zone.dart:1021:19)
#30 _runZoned (dart:async/zone.dart:1516:10)
#31 runZoned (dart:async/zone.dart:1500:12)
#32 run.<anonymous closure> (package:flutter_tools/runner.dart:60:18)
<asynchronous suspension>
#33 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:29)
<asynchronous suspension>
#34 _rootRun (dart:async/zone.dart:1124:13)
#35 _CustomZone.run (dart:async/zone.dart:1021:19)
#36 _runZoned (dart:async/zone.dart:1516:10)
#37 runZoned (dart:async/zone.dart:1463:12)
#38 AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
<asynchronous suspension>
#39 runInContext (package:flutter_tools/src/context_runner.dart:56:24)
<asynchronous suspension>
#40 run (package:flutter_tools/runner.dart:51:10)
#41 main (package:flutter_tools/executable.dart:62:9)
<asynchronous suspension>
#42 main (file:///C:/src/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#43 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
#44 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
When I change (android\app)build.gradle like this, the same output is shown.
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
I think androidx has a problem but I don't know what to do. I tried to migrate androidx, the first time I succeeded but when I tried once again they said No Usages Found in the Project, so I am not able to do it one more time
Additional Information :
I used android studio, and I upgraded everything. gradle, sdkversion(to 29) distrubuturl(to 5.4.1) and also added android.useAndroidx = true

flutter desktop build fails with `com.apple.xcode.tools.swift.compiler`

I try to build and run flutter for desktop and I get the bellow error when I use ~/dev/flutter/bin/flutter run -v
Objects-normal/x86_64/GeneratedPluginRegistrant~partial.swiftmodule -emit-dependencies-path
/Users/myuser/tmp/flutter-desktop-embedding/example/build/macos/Build/Intermediates.noindex/Runner.build/Debug/Runner.build/
Objects-normal/x86_64/GeneratedPluginRegistrant.d -emit-reference-dependencies-path
/Users/myuser/tmp/flutter-desktop-embedding/example/build/macos/Build/Intermediates.noindex/Runner.build/Debug/Runner.build/
Objects-normal/x86_64/GeneratedPluginRegistrant.swiftdeps -o
/Users/myuser/tmp/flutter-desktop-embedding/example/build/macos/Build/Intermediates.noindex/Runner.build/Debug/Runner.build/
Objects-normal/x86_64/GeneratedPluginRegistrant.o
[ +27 ms] ** BUILD FAILED **
[ +3 ms] The following build commands failed:
[ ] CompileSwift normal x86_64 /Users/myuser/tmp/flutter-desktop-embedding/example/macos/ExampleWindow.swift
[ ] CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
[ ] (2 failures)
[ +16 ms] Building macOS application... (completed in 10.1s)
[ +10 ms] "flutter run" took 11,052ms.
Build process failed
#0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1 buildMacOS (package:flutter_tools/src/macos/build_macos.dart:85:5)
<asynchronous suspension>
#2 MacOSDevice.startApp (package:flutter_tools/src/macos/macos_device.dart:86:13)
<asynchronous suspension>
#3 FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:378:54)
<asynchronous suspension>
#4 HotRunner.run (package:flutter_tools/src/run_hot.dart:254:39)
<asynchronous suspension>
#5 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:472:37)
<asynchronous suspension>
#6 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:490:18)
#7 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#8 _rootRunUnary (dart:async/zone.dart:1132:38)
#9 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#10 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#11 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#12 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#13 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#14 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
#15 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
#16 RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#17 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#18 _rootRunUnary (dart:async/zone.dart:1132:38)
#19 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#20 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#21 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#22 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#23 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#24 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:552:7)
#25 _rootRun (dart:async/zone.dart:1124:13)
#26 _CustomZone.run (dart:async/zone.dart:1021:19)
#27 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#28 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#29 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#30 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#31 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#32 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)
This is how i setup the desktop:
~/dev/flutter/bin/flutter channel master
~/dev/flutter/bin/flutter upgrade
~/dev/flutter/bin/flutter doctor
export ENABLE_FLUTTER_DESKTOP=true
~/dev/flutter/bin/flutter devices
~/dev/flutter/bin/flutter packages get
~/dev/flutter/bin/flutter precache --macos
The example i'm trying to run:
https://github.com/google/flutter-desktop-embedding.git

How should use flutter_web_test package to run unit test on flutter_web project?

I have been exploring the flutter web for a while, everything is fine.
But I have problems in creating unit test (StatelessWidget test for example) for flutter_web components.
I have discover that there is a packages called flutter_web_test but it seems didn't work well.
test code as follow:
I have install test packages used by flutter_web demo projects: flutter_web_test
// import fluter
import 'package:flutter_web_test/flutter_web_test.dart';
// a stateless widget is imported
import 'package:ies2.pms/views/main.dart';
void main() {
testWidgets(
'test whether ',
(WidgetTester tester) async {
// very simple code, create widget in test
await tester.pumpWidget(CYFCustomView(name: 'aaa'));
print('aaa');
},
);
}
Then I start running with flutter test
Then I have received following errors:
Failed to load test harness. Are you missing a dependency on flutter_test?
00:05 +0: loading /Users/yifan.chen/ByteDanceIES/pms/test/main_test.dart Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:package%3Aflutter_test%2Fflutter_test.dart; message=StandardFileSystem only supports file:* and
data:* URIs)
#0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:33:7)
#1 asFileUri (package:vm/kernel_front_end.dart:601:37)
<asynchronous suspension>
#2 FrontendCompiler._outputDependenciesDelta (package:vm/frontend_server.dart:401:39)
<asynchronous suspension>
#3 FrontendCompiler.compile (package:vm/frontend_server.dart:375:13)
<asynchronous suspension>
#4 _FlutterFrontendCompiler.compile (package:frontend_server/server.dart:31:22)
<asynchronous suspension>
#5 listenAndCompile.<anonymous closure> (package:vm/frontend_server.dart:736:26)
<asynchronous suspension>
#6 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#7 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#8 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#9 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
#10 _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
#11 _StringAdapterSink.add (dart:convert/string_conversion.dart:236:11)
#12 _LineSplitterSink._addLines (dart:convert/line_splitter.dart:150:13)
#13 _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:125:5)
#14 StringConversionSinkMixin.add (dart:convert/string_conversion.dart:163:5)
#15 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#16 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#17 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#18 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#19 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
#20 _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
#21 _StringAdapterSink.add (dart:convert/string_conversion.dart:236:11)
#22 _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:241:7)
#23 _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:312:20)
#24 _Utf8ConversionSink.add (dart:convert/string_conversion.dart:305:5)
#25 _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:72:18)
#26 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#27 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#28 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#29 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#30 _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)
#31 _StreamController._add (dart:async/stream_controller.dart:640:7)
#32 _StreamController.add (dart:async/stream_controller.dart:586:5)
#33 _Socket._onData (dart:io-patch/socket_patch.dart:1786:41)
#34 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#35 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#36 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#37 _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)
#38 _StreamController._add (dart:async/stream_controller.dart:640:7)
#39 _StreamController.add (dart:async/stream_controller.dart:586:5)
#40 new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1335:33)
#41 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:856:14)
#42 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#43 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#44 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#45 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)
00:05 +0 -1: loading /Users/yifan.chen/ByteDanceIES/pms/test/main_test.dart [E]
I can't find any solutions in Stackoverflow. And flutter_web currently haven't open issues yet. I have only discovered an issue in flutter, saying that flutter test is not supported for flutter_web project.
How should I run unit test on flutter_web project ? They have built flutter_web_test package, so it is supposed to be functional.
you shoukd move to flutter 1.9, flutter_web is deprecrated https://flutter.dev/web, the shorter way is update flutter to 1.9, create a new fresh project and activate web on it: flutter run -d chrome now you can build with flutter build web. I hope it solves your problems.

error when depoloy flutter project with CodeMagic

i have an flutter project and it is run good on emulator and my android device, but when i upload it to Github and make (commit) show me this error to review:
i cannot do anything about this error, and it is not affect my project when run it?
and when i ignore it and deploy to GitHub and try to build and deploy project with CodeMagic, i faced this error in (Running Test) step :
== Testing ==
== flutter test --machine ==
{"protocolVersion":"0.1.1","runnerVersion":null,"pid":2836,"type":"start","time":0}
{"suite":{"id":0,"platform":"vm","path":"/Users/greenhouse/clone/test/widget_test.dart"},"type":"suite","time":1}
{"test":{"id":1,"name":"loading /Users/greenhouse/clone/test/widget_test.dart","suiteID":0,"groupIDs":[],"metadata":{"skip":false,"skipReason":null},"line":null,"column":null,"url":null},"type":"testStart","time":2}
{"count":1,"type":"allSuites","time":10}
{"group":{"id":2,"suiteID":0,"parentID":null,"name":null,"metadata":{"skip":false,"skipReason":null},"testCount":1,"line":null,"column":null,"url":null},"type":"group","time":9907}
{"test":{"id":3,"name":"Counter increments smoke test","suiteID":0,"groupIDs":[2],"metadata":{"skip":false,"skipReason":null},"line":76,"column":3,"url":"package:flutter_test/src/widget_tester.dart","root_line":14,"root_column":3,"root_url":"file:///Users/greenhouse/clone/test/widget_test.dart"},"type":"testStart","time":9909}
{"testID":1,"result":"success","skipped":false,"hidden":true,"type":"testDone","time":9916}
{"testID":3,"messageType":"print","message":"══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════","type":"print","time":10433}
{"testID":3,"messageType":"print","message":"The following assertion was thrown building MisSplash(state: _OneState#0408f(ticker active)):\nMediaQuery.of() called with a context that does not contain a MediaQuery.\nNo MediaQuery ancestor could be found starting from the context that was passed to MediaQuery.of().\nThis can happen because you do not have a WidgetsApp or MaterialApp widget (those widgets introduce\na MediaQuery), or it can happen if the context you use comes from a widget above those widgets.\nThe context used was:\n Scaffold(dirty, state: ScaffoldState#1ae2e(lifecycle state: initialized, tickers: tracking 1\n ticker))","type":"print","time":10438}
{"testID":3,"messageType":"print","message":"\nWhen the exception was thrown, this was the stack:","type":"print","time":10439}
{"testID":3,"messageType":"print","message":"#0 MediaQuery.of (package:flutter/src/widgets/media_query.dart:528:5)","type":"print","time":10450}
{"testID":3,"messageType":"print","message":"#1 ScaffoldState.didChangeDependencies (package:flutter/src/material/scaffold.dart:1529:50)","type":"print","time":10451}
{"testID":3,"messageType":"print","message":"#2 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3862:12)","type":"print","time":10451}
{"testID":3,"messageType":"print","message":"#3 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3711:5)","type":"print","time":10452}
{"testID":3,"messageType":"print","message":"#4 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2956:14)","type":"print","time":10453}
{"testID":3,"messageType":"print","message":"#5 Element.updateChild (package:flutter/src/widgets/framework.dart:2759:12)","type":"print","time":10453}
{"testID":3,"messageType":"print","message":"#6 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3747:16)","type":"print","time":10453}
{"testID":3,"messageType":"print","message":"#7 Element.rebuild (package:flutter/src/widgets/framework.dart:3559:5)","type":"print","time":10453}
{"testID":3,"messageType":"print","message":"#8 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3716:5)","type":"print","time":10454}
{"testID":3,"messageType":"print","message":"#9 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3864:11)","type":"print","time":10454}
{"testID":3,"messageType":"print","message":"#10 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3711:5)","type":"print","time":10455}
{"testID":3,"messageType":"print","message":"#11 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2956:14)","type":"print","time":10455}
{"testID":3,"messageType":"print","message":"#12 Element.updateChild (package:flutter/src/widgets/framework.dart:2759:12)","type":"print","time":10456}
{"testID":3,"messageType":"print","message":"#13 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:933:16)","type":"print","time":10456}
{"testID":3,"messageType":"print","message":"#14 RenderObjectToWidgetElement.update (package:flutter/src/widgets/binding.dart:911:5)","type":"print","time":10457}
{"testID":3,"messageType":"print","message":"#15 RenderObjectToWidgetElement.performRebuild (package:flutter/src/widgets/binding.dart:925:7)","type":"print","time":10458}
{"testID":3,"messageType":"print","message":"#16 Element.rebuild (package:flutter/src/widgets/framework.dart:3559:5)","type":"print","time":10458}
{"testID":3,"messageType":"print","message":"#17 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2273:33)","type":"print","time":10459}
{"testID":3,"messageType":"print","message":"#18 AutomatedTestWidgetsFlutterBinding.drawFrame (package:flutter_test/src/binding.dart:805:18)","type":"print","time":10460}
{"testID":3,"messageType":"print","message":"#19 _TestWidgetsFlutterBinding&BindingBase&ServicesBinding&SchedulerBinding&GestureBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:268:5)","type":"print","time":10461}
{"testID":3,"messageType":"print","message":"#20 _TestWidgetsFlutterBinding&BindingBase&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:988:15)","type":"print","time":10462}
{"testID":3,"messageType":"print","message":"#21 _TestWidgetsFlutterBinding&BindingBase&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:928:9)","type":"print","time":10462}
{"testID":3,"messageType":"print","message":"#22 AutomatedTestWidgetsFlutterBinding.pump.<anonymous closure> (package:flutter_test/src/binding.dart:719:9)","type":"print","time":10463}
{"testID":3,"messageType":"print","message":"#25 TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:69:41)","type":"print","time":10465}
{"testID":3,"messageType":"print","message":"#26 AutomatedTestWidgetsFlutterBinding.pump (package:flutter_test/src/binding.dart:706:27)","type":"print","time":10465}
{"testID":3,"messageType":"print","message":"#27 WidgetTester.pumpWidget.<anonymous closure> (package:flutter_test/src/widget_tester.dart:250:22)","type":"print","time":10465}
{"testID":3,"messageType":"print","message":"#30 TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:69:41)","type":"print","time":10466}
{"testID":3,"messageType":"print","message":"#31 WidgetTester.pumpWidget (package:flutter_test/src/widget_tester.dart:247:27)","type":"print","time":10466}
{"testID":3,"messageType":"print","message":"#32 main.<anonymous closure> (file:///Users/greenhouse/clone/test/widget_test.dart:16:18)","type":"print","time":10467}
{"testID":3,"messageType":"print","message":"<asynchronous suspension>","type":"print","time":10467}
{"testID":3,"messageType":"print","message":"#33 testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:82:23)","type":"print","time":10468}
{"testID":3,"messageType":"print","message":"#34 TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:571:19)","type":"print","time":10469}
{"testID":3,"messageType":"print","message":"<asynchronous suspension>","type":"print","time":10469}
{"testID":3,"messageType":"print","message":"#37 TestWidgetsFlutterBinding._runTest (package:flutter_test/src/binding.dart:555:14)","type":"print","time":10470}
{"testID":3,"messageType":"print","message":"#38 AutomatedTestWidgetsFlutterBinding.runTest.<anonymous closure> (package:flutter_test/src/binding.dart:898:24)","type":"print","time":10472}
{"testID":3,"messageType":"print","message":"#44 AutomatedTestWidgetsFlutterBinding.runTest (package:flutter_test/src/binding.dart:895:15)","type":"print","time":10473}
{"testID":3,"messageType":"print","message":"#45 testWidgets.<anonymous closure> (package:flutter_test/src/widget_tester.dart:81:22)","type":"print","time":10473}
{"testID":3,"messageType":"print","message":"#46 Declarer.test.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart:168:27)","type":"print","time":10474}
{"testID":3,"messageType":"print","message":"<asynchronous suspension>","type":"print","time":10474}
{"testID":3,"messageType":"print","message":"#47 Invoker.waitForOutstandingCallbacks.<anonymous closure> (package:test_api/src/backend/invoker.dart:250:15)","type":"print","time":10475}
{"testID":3,"messageType":"print","message":"<asynchronous suspension>","type":"print","time":10479}
{"testID":3,"messageType":"print","message":"#52 Invoker.waitForOutstandingCallbacks (package:test_api/src/backend/invoker.dart:247:5)","type":"print","time":10479}
{"testID":3,"messageType":"print","message":"#53 Declarer.test.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart:166:33)","type":"print","time":10479}
{"testID":3,"messageType":"print","message":"#58 Declarer.test.<anonymous closure> (package:test_api/src/backend/declarer.dart:165:13)","type":"print","time":10480}
{"testID":3,"messageType":"print","message":"<asynchronous suspension>","type":"print","time":10480}
{"testID":3,"messageType":"print","message":"#59 Invoker._onRun.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/invoker.dart:400:25)","type":"print","time":10482}
{"testID":3,"messageType":"print","message":"<asynchronous suspension>","type":"print","time":10482}
{"testID":3,"messageType":"print","message":"#73 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)","type":"print","time":10483}
{"testID":3,"messageType":"print","message":"#74 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)","type":"print","time":10483}
{"testID":3,"messageType":"print","message":"#75 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)","type":"print","time":10484}
{"testID":3,"messageType":"print","message":"(elided 32 frames from class _FakeAsync, package dart:async, and package stack_trace)","type":"print","time":10485}
{"testID":3,"messageType":"print","message":"════════════════════════════════════════════════════════════════════════════════════════════════════","type":"print","time":10485}
{"testID":3,"messageType":"print","message":"══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════","type":"print","time":10486}
{"testID":3,"messageType":"print","message":"The following TestFailure object was thrown running a test:\n Expected: exactly one matching node in the widget tree\n Actual: ?:<zero widgets with text \"0\" (ignoring offstage widgets)>\n Which: means none were found but one was expected","type":"print","time":10487}
{"testID":3,"messageType":"print","message":"\nWhen the exception was thrown, this was the stack:","type":"print","time":10489}
{"testID":3,"messageType":"print","message":"#4 main.<anonymous closure> (file:///Users/greenhouse/clone/test/widget_test.dart:19:5)","type":"print","time":10490}
{"testID":3,"messageType":"print","message":"<asynchronous suspension>","type":"print","time":10493}
{"testID":3,"messageType":"print","message":"#5 testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:82:23)","type":"print","time":10493}
{"testID":3,"messageType":"print","message":"#6 TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:571:19)","type":"print","time":10493}
{"testID":3,"messageType":"print","message":"<asynchronous suspension>","type":"print","time":10498}
{"testID":3,"messageType":"print","message":"#9 TestWidgetsFlutterBinding._runTest (package:flutter_test/src/binding.dart:555:14)","type":"print","time":10498}
{"testID":3,"messageType":"print","message":"#10 AutomatedTestWidgetsFlutterBinding.runTest.<anonymous closure> (package:flutter_test/src/binding.dart:898:24)","type":"print","time":10498}
{"testID":3,"messageType":"print","message":"#16 AutomatedTestWidgetsFlutterBinding.runTest (package:flutter_test/src/binding.dart:895:15)","type":"print","time":10498}
{"testID":3,"messageType":"print","message":"#17 testWidgets.<anonymous closure> (package:flutter_test/src/widget_tester.dart:81:22)","type":"print","time":10498}
{"testID":3,"messageType":"print","message":"#18 Declarer.test.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart:168:27)","type":"print","time":10499}
{"testID":3,"messageType":"print","message":"<asynchronous suspension>","type":"print","time":10499}
{"testID":3,"messageType":"print","message":"#19 Invoker.waitForOutstandingCallbacks.<anonymous closure> (package:test_api/src/backend/invoker.dart:250:15)","type":"print","time":10499}
{"testID":3,"messageType":"print","message":"<asynchronous suspension>","type":"print","time":10499}
{"testID":3,"messageType":"print","message":"#24 Invoker.waitForOutstandingCallbacks (package:test_api/src/backend/invoker.dart:247:5)","type":"print","time":10499}
{"testID":3,"messageType":"print","message":"#25 Declarer.test.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart:166:33)","type":"print","time":10500}
{"testID":3,"messageType":"print","message":"#30 Declarer.test.<anonymous closure> (package:test_api/src/backend/declarer.dart:165:13)","type":"print","time":10500}
{"testID":3,"messageType":"print","message":"<asynchronous suspension>","type":"print","time":10500}
{"testID":3,"messageType":"print","message":"#31 Invoker._onRun.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/invoker.dart:400:25)","type":"print","time":10501}
{"testID":3,"messageType":"print","message":"<asynchronous suspension>","type":"print","time":10501}
{"testID":3,"messageType":"print","message":"#45 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)","type":"print","time":10501}
{"testID":3,"messageType":"print","message":"#46 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)","type":"print","time":10501}
{"testID":3,"messageType":"print","message":"#47 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)","type":"print","time":10502}
{"testID":3,"messageType":"print","message":"(elided 28 frames from class _FakeAsync, package dart:async, and package stack_trace)","type":"print","time":10502}
{"testID":3,"messageType":"print","message":"\nThis was caught by the test expectation on the following line:\n file:///Users/greenhouse/clone/test/widget_test.dart line 19\n\nThe test description was:\nCounter increments smoke test","type":"print","time":10504}
{"testID":3,"messageType":"print","message":"════════════════════════════════════════════════════════════════════════════════════════════════════","type":"print","time":10505}
{"testID":3,"messageType":"print","message":"══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════","type":"print","time":10505}
{"testID":3,"messageType":"print","message":"The following message was thrown:\nMultiple exceptions (2) were detected during the running of the current test, and at least one was\nunexpected.","type":"print","time":10506}
{"testID":3,"messageType":"print","message":"════════════════════════════════════════════════════════════════════════════════════════════════════","type":"print","time":10507}
{"testID":3,"error":"Test failed. See exception logs above.\nThe test description was: Counter increments smoke test","stackTrace":"","isFailure":false,"type":"error","time":10518}
{"testID":3,"result":"error","skipped":false,"hidden":false,"type":"testDone","time":10521}
{"success":false,"type":"done","time":10560}
Tests failed :|
Flutter test run failed
== Tests failed, skip build ==
there is no error when i run the project? how can find the bugs?, and i try to read this log above, but i cannot understand the error?
Just Disable the test phase, this might work.
Go to the workflow settings then to Test
then uncheck both option for Run "Flutter test" and Stop the "Build if test Fails"
Save it and try again.
Hope it'll solve but you cannot test your app that's the drawback.