Closed Decodeuprefo closed 1 week ago
Looks like a CFE crash. /cc @johnniwinther
Hi there, I'm getting the same after running flutter pub upgrade.
Hi @Decodeuprefo and @alistair-riskmemo, I see there was a similar issue at Dart SDK repository https://github.com/dart-lang/sdk/issues/54267 which has been fixed. I'm unsure if it's been landed on Flutter stable 3.19.6 with Dart 3.3.4 yet or maybe this is a regression. So could you switch to the latest Flutter master channel and retry?
Getting same error:
Unhandled exception: Crash when compiling: Null check operator used on a null value
It's working for me on the master channel.
[✓] Flutter (Channel master, 3.22.0-18.0.pre.53, on macOS 14.4.1 23E224 darwin-arm64, locale en-GB) • Flutter version 3.22.0-18.0.pre.53 on channel master at /Users/alistairscott/fvm/versions/master • Upstream repository https://github.com/flutter/flutter.git • Framework revision 098e7e7ff3 (32 hours ago), 2024-04-29 01:25:19 +0000 • Engine revision 752b146df7 • Dart version 3.5.0 (build 3.5.0-109.0.dev) • DevTools version 2.35.0-dev.16
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/alistairscott/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • ANDROID_HOME = /Users/alistairscott/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15E204a • CocoaPods version 1.15.2
[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.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 17.0.9+0-17.0.9b1087.7-11185874)
[✓] VS Code (version 1.88.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.86.0
[✓] Connected device (5 available) • Alistair’s iPhone (mobile) • XXXXXXXX-XXXXXXXXXXXXXXXX • ios • iOS 17.4.1 21E236 • iPhone 15 (mobile) • 21B17972-B3BF-4042-A4C4-73D7FBDEA9D5 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 14.4.1 23E224 darwin-arm64 • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.4.1 23E224 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 124.0.6367.91
[✓] Network resources • All expected network resources are available.
• No issues found!
@Decodeuprefo You are on Flutter stable 3.19.6. As @alistair-riskmemo confirmed, the issue may be fixed on master channel, please also try on it and confirm. Thanks!
Yes, I am on Flutter stable 3.19.6. And still facing same issue.
@Decodeuprefo Do you mean you still see the issue on Flutter master channel (3.22.0
)? If you haven't checked it on master channel, please use command below to switch to master channel and retry:
flutter channel master
flutter upgrade
Working fine in master channel. Not facing this issue there.
Thank you for verifying it. Closing this issue as fixed. The fix should land on the stable channel in future releases.
@huycozy So should we not switch to 3.19.6
on stable right now? Because I just upgraded and my projects started giving me this same issue.
From the potential commit https://github.com/dart-lang/sdk/commit/fa8e34e8355ade322fa3d94d39037e53402036b7 that I thought fixed this issue, I see the fix is also available on the latest beta channel 3.22.0-0.3.pre
with Dart version 3.4.0 (build 3.4.0-282.3.beta)
, so you can switch to beta channel which is more stabilized than master channel.
flutter channel beta
flutter upgrade
Steps to reproduce
Running the project in any device
Expected results
Project should run in device
Actual results
Getting following error:
Code sample
It is an exiting project, which used to work properly, But after few days it start giving this error.
Screenshots or Video
No response
Logs
No response
Flutter Doctor output
Doctor output
```console [✓] Flutter (Channel stable, 3.19.6, on macOS 14.4.1 23E224 darwin-x64, locale en-IN) • Flutter version 3.19.6 on channel stable at /Users/decodeuptechnologies/Desktop/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 54e66469a9 (9 days ago), 2024-04-17 13:08:03 -0700 • Engine revision c4cd48e186 • Dart version 3.3.4 • DevTools version 2.31.1 [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/decodeuptechnologies/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15E204a • CocoaPods version 1.13.0 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2023.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 17.0.9+0-17.0.9b1087.7-11185874) [✓] VS Code (version 1.88.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.86.0 [✓] Connected device (3 available) • iPhone 15 Pro (mobile) • 508C44DB-9536-447E-B170-68DC0C6DB973 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator) • macOS (desktop) • macos • darwin-x64 • macOS 14.4.1 23E224 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 124.0.6367.91 [✓] Network resources • All expected network resources are available. ```