Closed jimmyff closed 2 years ago
Hi @jimmyff Could you try creating a new Flutter project and retry to see if the issue persist or not? (only empty project without dependencies)
Hey @huycozy thanks for the response, I can confirm a new flutter project works correctly.
I have included my pubspec in case that is of use:
My packages are as up to date as they can be:
This is also affecting another of my apps that I have.
@jimmyff
Hey @huycozy thanks for the response, I can confirm a new flutter project works correctly.
I have included my pubspec in case that is of use:
pubspec.yaml
Please try to create a completely new project to make sure your Flutter setup is still fine.
[ +83 ms] [+1471 ms] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_redux_navigation-0.7.1/lib/src/navigation_middleware.dart:32:39: Error: Expected ';' after this.
[ ] [ ] 'name: ${navigationAction.name}')
[ ] [ ] ^
[ ] [ ] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_redux_navigation-0.7.1/lib/src/navigation_middleware.dart:33:48: Error: Expected ';' after this.
[ ] [ ] 'predicate: ${navigationAction.predicate}')
[ ] [ ] ^
[ ] [ ] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_redux_navigation-0.7.1/lib/src/navigation_middleware.dart:33:49: Error: Expected an identifier, but got ')'.
[ ] [ ] Try inserting an identifier before ')'.
[ ] [ ] 'predicate: ${navigationAction.predicate}')
[ ] [ ] ^
[ ] [ +1 ms] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_redux_navigation-0.7.1/lib/src/navigation_middleware.dart:33:49: Error: Unexpected token ')'.
[ ] [ ] 'predicate: ${navigationAction.predicate}')
[ ] [ ] ^
[ ] [ ] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_redux_navigation-0.7.1/lib/src/navigation_middleware.dart:34:48: Error: Expected ';' after this.
[ ] [ ] 'arguments: ${navigationAction.arguments}');
And from your above flutter run
output, I see there are errors of flutter_redux_navigation
that could lead to the failed run.
Could you remove flutter_redux_navigation
and retry running?
Thank you @huycozy my issue seems to be with the flutter_redux_navigation package
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
Hi, my app was building and running fine yesterday. This morning it's giving me the non-zero exit value error that seems to keep cropping up.
I've tried upgraded flutter, running flutter clean but I can no longer get it to run. I've included (hopefully) all the necessary details below.
Logs
flutter run error
``` jimmyff@jimmys-mbp os_app % flutter run --debug -v > ../flutter-build-error.txt [ +498 ms] [+2580 ms] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_redux-0.9.0/lib/flutter_redux.dart:474:22: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null. [ ] [ ] - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../sdks/flutter/packages/flutter/lib/src/widgets/binding.dart'). [ ] [ ] WidgetsBinding.instance?.addPostFrameCallback((_) { [ ] [ ] ^ [ ] [ +2 ms] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_redux-0.9.0/lib/flutter_redux.dart:577:22: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null. [ ] [ ] - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../sdks/flutter/packages/flutter/lib/src/widgets/binding.dart'). [ ] [ ] WidgetsBinding.instance?.addPostFrameCallback((_) { [ ] [ ] ^ [ +83 ms] [+1471 ms] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_redux_navigation-0.7.1/lib/src/navigation_middleware.dart:32:39: Error: Expected ';' after this. [ ] [ ] 'name: ${navigationAction.name}') [ ] [ ] ^ [ ] [ ] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_redux_navigation-0.7.1/lib/src/navigation_middleware.dart:33:48: Error: Expected ';' after this. [ ] [ ] 'predicate: ${navigationAction.predicate}') [ ] [ ] ^ [ ] [ ] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_redux_navigation-0.7.1/lib/src/navigation_middleware.dart:33:49: Error: Expected an identifier, but got ')'. [ ] [ ] Try inserting an identifier before ')'. [ ] [ ] 'predicate: ${navigationAction.predicate}') [ ] [ ] ^ [ ] [ +1 ms] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_redux_navigation-0.7.1/lib/src/navigation_middleware.dart:33:49: Error: Unexpected token ')'. [ ] [ ] 'predicate: ${navigationAction.predicate}') [ ] [ ] ^ [ ] [ ] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_redux_navigation-0.7.1/lib/src/navigation_middleware.dart:34:48: Error: Expected ';' after this. [ ] [ ] 'arguments: ${navigationAction.arguments}'); [ ] [ ] ^ [ ] [ ] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_redux_navigation-0.7.1/lib/src/navigation_middleware.dart:34:49: Error: Expected an identifier, but got ')'. [ ] [ ] Try inserting an identifier before ')'. [ ] [ ] 'arguments: ${navigationAction.arguments}'); [ ] [ ] ^ [ ] [ ] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_redux_navigation-0.7.1/lib/src/navigation_middleware.dart:34:49: Error: Unexpected token ')'. [ ] [ ] 'arguments: ${navigationAction.arguments}'); [ ] [ ] ^ [ +899 ms] [ +910 ms] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/intl_phone_number_input-0.7.0+2/lib/src/widgets/input_widget.dart:321:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. [ ] [ ] - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../sdks/flutter/packages/flutter/lib/src/widgets/binding.dart'). [ ] [ ] WidgetsBinding.instance!.addPostFrameCallback((timeStamp) { [ ] [ ] ^ [ ] [ +5 ms] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/pinput-2.2.4/lib/src/pinput_state.dart:81:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. [ ] [ ] - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../sdks/flutter/packages/flutter/lib/src/widgets/binding.dart'). [ ] [ ] WidgetsBinding.instance!.addObserver(this); [ ] [ ] ^ [ ] [ ] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/pinput-2.2.4/lib/src/pinput_state.dart:190:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. [ ] [ ] - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../sdks/flutter/packages/flutter/lib/src/widgets/binding.dart'). [ ] [ ] WidgetsBinding.instance!.removeObserver(this); [ ] [ ] ^ [ ] [ +20 ms] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_placeholder_textlines-1.1.2/lib/placeholder_lines.dart:113:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. [ ] [ ] - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../sdks/flutter/packages/flutter/lib/src/widgets/binding.dart'). [ ] [ ] WidgetsBinding.instance!.addPostFrameCallback(_setupAnimation); [ ] [ ] ^ [ ] [ +12 ms] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/confetti-0.6.0/lib/src/confetti.dart:229:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. [ ] [ ] - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../sdks/flutter/packages/flutter/lib/src/widgets/binding.dart'). [ ] [ ] WidgetsBinding.instance!.addPostFrameCallback((_) { [ ] [ ] ^ [ ] [ +7 ms] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-3.2.0/lib/src/image_provider/cached_network_image_provider.dart:109:29: Warning: Operand of null-aware operation '?.' has type 'PaintingBinding' which excludes null. [ ] [ ] - 'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('../../../sdks/flutter/packages/flutter/lib/src/painting/binding.dart'). [ ] [ ] () => PaintingBinding.instance?.imageCache?.evict(key), [ ] [ ] ^ [ ] [ ] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-3.2.0/lib/src/image_provider/multi_image_stream_completer.dart:152:22: Warning: Operand of null-aware operation '?.' has type 'SchedulerBinding' which excludes null. [ ] [ ] - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../../sdks/flutter/packages/flutter/lib/src/scheduler/binding.dart'). [ ] [ ] SchedulerBinding.instance?.scheduleFrameCallback(_handleAppFrame); [ ] [ ] ^ [ +494 ms] [ +508 ms] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/reorderables-0.4.3/lib/src/widgets/passthrough_overlay.dart:133:26: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null. [ ] [ ] - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../../sdks/flutter/packages/flutter/lib/src/scheduler/binding.dart'). [ ] [ ] if (SchedulerBinding.instance!.schedulerPhase == [ ] [ ] ^ [ ] [ ] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/reorderables-0.4.3/lib/src/widgets/passthrough_overlay.dart:135:24: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null. [ ] [ ] - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../../sdks/flutter/packages/flutter/lib/src/scheduler/binding.dart'). [ ] [ ] SchedulerBinding.instance!.addPostFrameCallback((Duration duration) { [ ] [ ] ^ [ +304 ms] [ +289 ms] ../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/ink_page_indicator-0.2.1/lib/src/base/page_indicator.dart:123:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. [ ] [ ] - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../sdks/flutter/packages/flutter/lib/src/widgets/binding.dart'). [ ] [ ] WidgetsBinding.instance!.addPostFrameCallback( [ ] [ ] ^ [ ] [ +1 ms] Target kernel_snapshot failed: Exception [ ] #0 KernelSnapshot.build (package:flutter_tools/src/build_system/targets/common.dart:241:7) [ ]flutter doctor -v
``` jimmyff@jimmys-mbp os_app % flutter doctor -v [✓] Flutter (Channel stable, 3.0.2, on macOS 12.4 21F79 darwin-arm, locale en-GB) • Flutter version 3.0.2 at /Users/jimmyff/sdks/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision cd41fdd495 (6 days ago), 2022-06-08 09:52:13 -0700 • Engine revision f15f824b57 • Dart version 2.17.3 • DevTools version 2.12.2 [✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) • Android SDK at /Users/jimmyff/Library/Android/sdk • Platform android-32, build-tools 32.1.0-rc1 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 13.4.1) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.11.3 [✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [✓] Android Studio (version 2021.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) [✓] VS Code (version 1.68.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.42.0 [✓] Connected device (2 available) • Pixel 5 (mobile) • 09021FDD40027X • android-arm64 • Android 12 (API 31) • macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79 darwin-arm [✓] HTTP Host Availability • All required HTTP hosts are available ! Doctor found issues in 1 category. ```flutter.gradle line 1156
```gradle project.exec { logging.captureStandardError LogLevel.ERROR executable flutterExecutable.absolutePath workingDir sourceDir if (localEngine != null) { args "--local-engine", localEngine args "--local-engine-src-path", localEngineSrcPath } if (verbose) { args "--verbose" } else { args "--quiet" } args "assemble" args "--no-version-check" args "--depfile", "${intermediateDir}/flutter_build.d" args "--output", "${intermediateDir}" if (performanceMeasurementFile != null) { args "--performance-measurement-file=${performanceMeasurementFile}" } if (!fastStart || buildMode != "debug") { args "-dTargetFile=${targetPath}" } else { args "-dTargetFile=${Paths.get(flutterRoot.absolutePath, "examples", "splash", "lib", "main.dart")}" } args "-dTargetPlatform=android" args "-dBuildMode=${buildMode}" if (trackWidgetCreation != null) { args "-dTrackWidgetCreation=${trackWidgetCreation}" } if (splitDebugInfo != null) { args "-dSplitDebugInfo=${splitDebugInfo}" } if (treeShakeIcons == true) { args "-dTreeShakeIcons=true" } if (dartObfuscation == true) { args "-dDartObfuscation=true" } if (dartDefines != null) { args "--DartDefines=${dartDefines}" } if (bundleSkSLPath != null) { args "-dBundleSkSLPath=${bundleSkSLPath}" } if (codeSizeDirectory != null) { args "-dCodeSizeDirectory=${codeSizeDirectory}" } if (extraGenSnapshotOptions != null) { args "--ExtraGenSnapshotOptions=${extraGenSnapshotOptions}" } if (extraFrontEndOptions != null) { args "--ExtraFrontEndOptions=${extraFrontEndOptions}" } args ruleNames } ```Output of
flutter run --debug -v
flutter-build-error.txtThanks, Jimmy