Error when Input is : C:\src\flutter>flutter doctor - flutter

On setting up Flutter:
error :CreateProcessW failed 193
CreateProcessW failed 193
Unhandled exception:
ProcessException: %1 is not a valid Win32 application.
i have Tried changing username

from the Command prompt run the flutter doctor inside the flutter installation directory:
C:\src\flutter> flutter doctor

Related

Oops; flutter has exited unexpectedly: errno = 32

Oops; flutter has exited unexpectedly: "FileSystemException: Deletion failed, path =
'D:\otp.android' (OS Error: The program cannot access the file because it is being used by another program.
, errno = 32)".
How to solve this problem ?
How to solve this problem ?

I used Carousel_Slider package in my flutter app and faced an issue?

I used Carousel_Slider package to build an image slider for my flutter app and I copied the parts of the code that I needed .SO after runnig the app I faced an issue that says ...
: Error: The value 'null' can't be assigned to a variable of type 'List' because 'List' is not nullable.
carousel_slider.dart:59
'List' is from 'dart:core'.
'Widget' is from 'package:flutter/src/widgets/framework.dart' ('../../Documents/flutter/packages/flutter/lib/src/widgets/framework.dart').
framework.dart:1
: items = null,
This is the whole DEBUG CONSOLE..
I used Carousel_Slider package to build an image slider for my flutter app and I copied the parts of the code that I needed .SO after runnig the app I faced an issue that says ...
: Error: The value 'null' can't be assigned to a variable of type 'List' because 'List' is not nullable.
carousel_slider.dart:59
'List' is from 'dart:core'.
'Widget' is from 'package:flutter/src/widgets/framework.dart' ('../../Documents/flutter/packages/flutter/lib/src/widgets/framework.dart').
framework.dart:1
: items = null,
Target kernel_snapshot failed: Exception
2
FAILURE: Build failed with an exception.
Where:
Script 'C:\Users\Islam\Documents\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1151
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'C:\Users\Islam\Documents\flutter\bin\flutter.bat'' 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 3s
Exception: Gradle task assembleDebug failed with exit code 1
based on error logs ,
the List that you are giving in CarouselSlider Widget is null,
print your list in build to check what is the value of List that used in CarouselSlider.

Why can't my flutter tests run on Codemagic?

I have written three simple integration tests that are located in a test directory. I run work on Windows and I use an Android emulator. They always fail on Codemagic (macOS Standard VM, 2.3GHz Quad Core / 8GB). I don't know why but it uses this flag to run the tests:
flutter test --machine
And even with the
--machine flag the tests run perfectly on my machine.
Now here are the logs when running on my machine:
{"protocolVersion":"0.1.1","runnerVersion":null,"pid":17888,"type":"start","time":0}
{"suite":{"id":0,"platform":"vm","path":"D:\\delivery\\organia-app\\test\\app_test.dart"},"type":"suite","time":0}
{"test":{"id":1,"name":"loading D:\\delivery\\organia-app\\test\\app_test.dart","suiteID":0,"groupIDs":[],"metadata":{"skip":false,"skipReason":null},"line":null,"column":null,"url":null},"type":"testStart","time":1}
{"count":1,"time":11,"type":"allSuites"}
[{"event":"test.startedProcess","params":{"observatoryUri":null}}]
{"testID":1,"result":"success","skipped":false,"hidden":true,"type":"testDone","time":2818}
{"group":{"id":2,"suiteID":0,"parentID":null,"name":"","metadata":{"skip":false,"skipReason":null},"testCount":3,"line":null,"column":null,"url":null},"type":"group","time":2824}
{"group":{"id":3,"suiteID":0,"parentID":2,"name":"Tests","metadata":{"skip":false,"skipReason":null},"testCount":3,"line":11,"column":3,"url":"file:///D:/delivery/organia-app/test/app_test.dart"},"type":"group","time":2825}
{"test":{"id":4,"name":"Tests Bottom Tab bar navigation","suiteID":0,"groupIDs":[2,3],"metadata":{"skip":false,"skipReason":null},"line":153,"column":5,"url":"package:flutter_test/src/widget_tester.dart","root_line":12,"root_column":5,"root_url":"file:///D:/delivery/organia-app/test/app_test.dart"},"type":"testStart","time":2826}
{"testID":4,"messageType":"print","message":"Error loading AssetManifest.json, e: Unable to load asset: AssetManifest.json","type":"print","time":3843}
{"testID":4,"result":"success","skipped":false,"hidden":false,"type":"testDone","time":4769}
{"test":{"id":5,"name":"Tests Register Test","suiteID":0,"groupIDs":[2,3],"metadata":{"skip":false,"skipReason":null},"line":153,"column":5,"url":"package:flutter_test/src/widget_tester.dart","root_line":25,"root_column":5,"root_url":"file:///D:/delivery/organia-app/test/app_test.dart"},"type":"testStart","time":4770}
{"testID":5,"result":"success","skipped":false,"hidden":false,"type":"testDone","time":7083}
{"test":{"id":6,"name":"Tests Login Test","suiteID":0,"groupIDs":[2,3],"metadata":{"skip":false,"skipReason":null},"line":153,"column":5,"url":"package:flutter_test/src/widget_tester.dart","root_line":53,"root_column":5,"root_url":"file:///D:/delivery/organia-app/test/app_test.dart"},"type":"testStart","time":7084}
{"testID":6,"result":"success","skipped":false,"hidden":false,"type":"testDone","time":9332}
{"test":{"id":7,"name":"(tearDownAll)","suiteID":0,"groupIDs":[2],"metadata":{"skip":false,"skipReason":null},"line":42,"column":5,"url":"package:integration_test/integration_test.dart","root_line":8,"root_column":40,"root_url":"file:///D:/delivery/organia-app/test/app_test.dart"},"type":"testStart","time":9332}
{"testID":7,"messageType":"print","message":"Warning: integration_test plugin was not detected.","type":"print","time":9338}
{"testID":7,"messageType":"print","message":"","type":"print","time":9339}
{"testID":7,"messageType":"print","message":"If you're running the tests with `flutter drive`, please make sure your tests","type":"print","time":9339}
{"testID":7,"messageType":"print","message":"are in the `integration_test/` directory of your package and use","type":"print","time":9339}
{"testID":7,"messageType":"print","message":"`flutter test $path_to_test` to run it instead.","type":"print","time":9340}
{"testID":7,"messageType":"print","message":"","type":"print","time":9340}
{"testID":7,"messageType":"print","message":"If you're running the tests with Android instrumentation or XCTest, this means","type":"print","time":9340}
{"testID":7,"messageType":"print","message":"that you are not capturing test results properly! See the following link for","type":"print","time":9340}
{"testID":7,"messageType":"print","message":"how to set up the integration_test plugin:","type":"print","time":9341}
{"testID":7,"messageType":"print","message":"","type":"print","time":9341}
{"testID":7,"messageType":"print","message":"https://flutter.dev/docs/testing/integration-tests#testing-on-firebase-test-lab","type":"print","time":9341}
{"testID":7,"messageType":"print","message":"","type":"print","time":9342}
{"testID":7,"result":"success","skipped":false,"hidden":true,"type":"testDone","time":9342}
{"success":true,"type":"done","time":9384}
And here is the Codemagic log:
== QA ==
> flutter analyze
Running "flutter pub get" in clone... 1,971ms
Analyzing clone...
No issues found! (ran in 25.4s)
> flutter test --machine
{"protocolVersion":"0.1.1","runnerVersion":null,"pid":2616,"type":"start","time":0}
{"suite":{"id":0,"platform":"vm","path":"/Users/builder/clone/test/app_test.dart"},"type":"suite","time":1}
{"test":{"id":1,"name":"loading /Users/builder/clone/test/app_test.dart","suiteID":0,"groupIDs":[],"metadata":{"skip":false,"skipReason":null},"line":null,"column":null,"url":null},"type":"testStart","time":3}
{"count":1,"time":16,"type":"allSuites"}
[{"event":"test.startedProcess","params":{"observatoryUri":null}}]
{"testID":1,"result":"success","skipped":false,"hidden":true,"type":"testDone","time":25585}
{"group":{"id":2,"suiteID":0,"parentID":null,"name":"","metadata":{"skip":false,"skipReason":null},"testCount":3,"line":null,"column":null,"url":null},"type":"group","time":25595}
{"group":{"id":3,"suiteID":0,"parentID":2,"name":"Navigation Tests","metadata":{"skip":false,"skipReason":null},"testCount":3,"line":11,"column":3,"url":"file:///Users/builder/clone/test/app_test.dart"},"type":"group","time":25596}
{"test":{"id":4,"name":"Navigation Tests Bottom Tab bar navigation","suiteID":0,"groupIDs":[2,3],"metadata":{"skip":false,"skipReason":null},"line":153,"column":5,"url":"package:flutter_test/src/widget_tester.dart","root_line":12,"root_column":5,"root_url":"file:///Users/builder/clone/test/app_test.dart"},"type":"testStart","time":25596}
{"testID":4,"messageType":"print","message":"══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════","type":"print","time":26162}
{"testID":4,"messageType":"print","message":"The following MissingPluginException was thrown running a test:","type":"print","time":26163}
{"testID":4,"messageType":"print","message":"MissingPluginException(No implementation found for method getApplicationDocumentsDirectory on","type":"print","time":26163}
{"testID":4,"messageType":"print","message":"channel plugins.flutter.io/path_provider_macos)","type":"print","time":26163}
{"testID":4,"messageType":"print","message":"","type":"print","time":26163}
{"testID":4,"messageType":"print","message":"When the exception was thrown, this was the stack:","type":"print","time":26163}
{"testID":4,"messageType":"print","message":"#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:175:7)","type":"print","time":26163}
{"testID":4,"messageType":"print","message":"<asynchronous suspension>","type":"print","time":26163}
{"testID":4,"messageType":"print","message":"<asynchronous suspension>","type":"print","time":26164}
{"testID":4,"messageType":"print","message":"(elided one frame from package:stack_trace)","type":"print","time":26164}
{"testID":4,"messageType":"print","message":"","type":"print","time":26165}
{"testID":4,"messageType":"print","message":"The test description was:","type":"print","time":26165}
{"testID":4,"messageType":"print","message":" Bottom Tab bar navigation","type":"print","time":26165}
{"testID":4,"messageType":"print","message":"════════════════════════════════════════════════════════════════════════════════════════════════════","type":"print","time":26165}
{"testID":4,"error":"Test failed. See exception logs above.\nThe test description was: Bottom Tab bar navigation","stackTrace":"","isFailure":false,"type":"error","time":26175}
{"testID":4,"error":"'package:flutter_test/src/binding.dart': Failed assertion: line 1649 pos 12: '_pendingFrame == null': is not true.","stackTrace":"dart:core _AssertionError._throwNew\npackage:flutter_test/src/binding.dart 1649:12 LiveTestWidgetsFlutterBinding.postTest\n","isFailure":false,"type":"error","time":26207}
{"testID":4,"result":"error","skipped":false,"hidden":false,"type":"testDone","time":26207}
{"test":{"id":5,"name":"Navigation Tests Register Test","suiteID":0,"groupIDs":[2,3],"metadata":{"skip":false,"skipReason":null},"line":153,"column":5,"url":"package:flutter_test/src/widget_tester.dart","root_line":25,"root_column":5,"root_url":"file:///Users/builder/clone/test/app_test.dart"},"type":"testStart","time":26208}
{"testID":5,"error":"'package:flutter_test/src/binding.dart': Failed assertion: line 1624 pos 12: '!inTest': is not true.","stackTrace":"dart:core _AssertionError._throwNew\npackage:flutter_test/src/binding.dart 1624:12 LiveTestWidgetsFlutterBinding.runTest\npackage:integration_test/integration_test.dart 223:17 IntegrationTestWidgetsFlutterBinding.runTest\npackage:flutter_test/src/widget_tester.dart 163:24 testWidgets.<fn>\n","isFailure":false,"type":"error","time":26216}
{"testID":5,"error":"'package:flutter_test/src/binding.dart': Failed assertion: line 1648 pos 12: '!_expectingFrame': is not true.","stackTrace":"dart:core _AssertionError._throwNew\npackage:flutter_test/src/binding.dart 1648:12 LiveTestWidgetsFlutterBinding.postTest\n","isFailure":false,"type":"error","time":26220}
{"testID":5,"result":"error","skipped":false,"hidden":false,"type":"testDone","time":26220}
{"test":{"id":6,"name":"Navigation Tests Login Test","suiteID":0,"groupIDs":[2,3],"metadata":{"skip":false,"skipReason":null},"line":153,"column":5,"url":"package:flutter_test/src/widget_tester.dart","root_line":53,"root_column":5,"root_url":"file:///Users/builder/clone/test/app_test.dart"},"type":"testStart","time":26221}
{"testID":4,"messageType":"print","message":"══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════","type":"print","time":26247}
{"testID":4,"messageType":"print","message":"The following TestFailure was thrown running a test (but after the test had completed):","type":"print","time":26247}
{"testID":4,"messageType":"print","message":"Expected: exactly one matching node in the widget tree","type":"print","time":26247}
{"testID":4,"messageType":"print","message":" Actual: _WidgetIconFinder:<zero widgets with icon \"IconData(U+0F8BD)\" (ignoring offstage widgets)>","type":"print","time":26248}
{"testID":4,"messageType":"print","message":" Which: means none were found but one was expected","type":"print","time":26248}
{"testID":4,"messageType":"print","message":"","type":"print","time":26248}
{"testID":4,"messageType":"print","message":"When the exception was thrown, this was the stack:","type":"print","time":26248}
{"testID":4,"messageType":"print","message":"#0 fail (package:test_api/src/expect/expect.dart:137:31)","type":"print","time":26249}
{"testID":4,"messageType":"print","message":"#1 _expect (package:test_api/src/expect/expect.dart:132:3)","type":"print","time":26249}
{"testID":4,"messageType":"print","message":"#2 expect (package:test_api/src/expect/expect.dart:46:3)","type":"print","time":26249}
{"testID":4,"messageType":"print","message":"#3 expect (package:flutter_test/src/widget_tester.dart:455:16)","type":"print","time":26250}
{"testID":4,"messageType":"print","message":"#4 main.<anonymous closure>.<anonymous closure> (file:///Users/builder/clone/test/app_test.dart:15:7)","type":"print","time":26250}
{"testID":4,"messageType":"print","message":"<asynchronous suspension>","type":"print","time":26250}
{"testID":4,"messageType":"print","message":"<asynchronous suspension>","type":"print","time":26251}
{"testID":4,"messageType":"print","message":"(elided one frame from package:stack_trace)","type":"print","time":26251}
{"testID":4,"messageType":"print","message":"════════════════════════════════════════════════════════════════════════════════════════════════════","type":"print","time":26251}
{"testID":6,"error":"'package:flutter_test/src/binding.dart': Failed assertion: line 1624 pos 12: '!inTest': is not true.","stackTrace":"dart:core _AssertionError._throwNew\npackage:flutter_test/src/binding.dart 1624:12 LiveTestWidgetsFlutterBinding.runTest\npackage:integration_test/integration_test.dart 223:17 IntegrationTestWidgetsFlutterBinding.runTest\npackage:flutter_test/src/widget_tester.dart 163:24 testWidgets.<fn>\n","isFailure":false,"type":"error","time":26264}
{"testID":6,"result":"error","skipped":false,"hidden":false,"type":"testDone","time":26265}
{"test":{"id":7,"name":"(tearDownAll)","suiteID":0,"groupIDs":[2],"metadata":{"skip":false,"skipReason":null},"line":42,"column":5,"url":"package:integration_test/integration_test.dart","root_line":8,"root_column":40,"root_url":"file:///Users/builder/clone/test/app_test.dart"},"type":"testStart","time":26266}
{"testID":7,"messageType":"print","message":"Warning: integration_test plugin was not detected.","type":"print","time":26321}
{"testID":7,"messageType":"print","message":"","type":"print","time":26321}
{"testID":7,"messageType":"print","message":"If you're running the tests with `flutter drive`, please make sure your tests","type":"print","time":26322}
{"testID":7,"messageType":"print","message":"are in the `integration_test/` directory of your package and use","type":"print","time":26322}
{"testID":7,"messageType":"print","message":"`flutter test $path_to_test` to run it instead.","type":"print","time":26323}
{"testID":7,"messageType":"print","message":"","type":"print","time":26323}
{"testID":7,"messageType":"print","message":"If you're running the tests with Android instrumentation or XCTest, this means","type":"print","time":26323}
{"testID":7,"messageType":"print","message":"that you are not capturing test results properly! See the following link for","type":"print","time":26323}
{"testID":7,"messageType":"print","message":"how to set up the integration_test plugin:","type":"print","time":26324}
{"testID":7,"messageType":"print","message":"","type":"print","time":26324}
{"testID":7,"messageType":"print","message":"https://flutter.dev/docs/testing/integration-tests#testing-on-firebase-test-lab","type":"print","time":26324}
{"testID":7,"messageType":"print","message":"","type":"print","time":26324}
{"testID":7,"result":"success","skipped":false,"hidden":true,"type":"testDone","time":26326}
{"success":false,"type":"done","time":26368}
QA failed :|
Flutter test run failed.
== QA failed, ending build ==
Build failed :|
Test run failed: Flutter test run failed.
from the log your error is this one (you can find it in Codemagic UI too)
MissingPluginException(No implementation found for method getApplicationDocumentsDirectory on channel plugins.flutter.io/path_provider_macos)
Seems you need to fix your unit tests that using path_provider package since they can't be run on macOS. Maybe this link https://pub.dev/packages/path_provider#testing will be helpful

Flutter Pub Get command failed

I'm getting this error message on running the command : flutter pub get
Failed to decode data using encoding 'utf-8', path = 'C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_tts-1.2.6\pubspec.yaml'
Running "flutter pub get" in dhiyo-app...
pub get failed (66; Failed to decode data using encoding 'utf-8', path = 'C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_tts-1.2.6\pubspec.yaml')

Library 'uuid' from dart doesn't work with flutter?

I tried flutter run after adding the dependencies of the Dart Library Uuid.
My changed dependencies
dependencies:
uuid: 0.5.0 // or also - uuid: "^0.5.3"
Errors from Flutter
Error: 'package:convert/src/hex/encoder.dart': malformed type: line 20 pos 13: cannot resolve class 'ChunkedConverter' from 'HexEncoder'
extends ChunkedConverter<List<int>, String, List<int>, String> {
^
Failed to run the Flutter compiler. Exit code: 254
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\xxxx\Flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 329
* What went wrong:
Execution failed for task ':app:flutterBuildDebug'.
> Process 'command 'C:\Users\xxxx\Flutter\flutter\bin\flutter.bat'' finished with non-zero exit value 254
Why does this not work with flutter?
After reading https://github.com/dart-lang/sdk/issues/29543#issuecomment-298888237 I think you might want to try adding a pubspec dependency on convert: "^2.0.1". Does that help?