Can't run flutter project due to error VERBOSE.dart error, isolate error - flutter

When I try to run my flutter-project code on the iOS simulator in VS code, I get the following error on the console:
Launching lib/main.dart on iPhone 11 Pro in debug mode...
lib/main.dart:1
Xcode build done. 24.4s
[VERBOSE-2:shell.cc(103)] Dart Error: Can't load Kernel binary: Invalid SDK hash.
[VERBOSE-2:dart_isolate.cc(171)] Could not prepare isolate.
[VERBOSE-2:runtime_controller.cc(415)] Could not create root isolate.
[VERBOSE-2:shell.cc(588)] Could not launch engine with configuration.
Thanks in advance.

Hi!
In my case, the error was caused by the forced shutdown of the IDE.
After manually selecting the libraries, I identified the one that was causing the problem, updated the project without it, and updated the project again with it.
With that the problem was solved.
Hope I have helped, if yes, please flag.

Could you delete the bin/cache folder, then run app

Open terminal and run: $ flutter channel beta
"it will install beta version, once installation is done, try it!"
"In case you willing to change the beta version to stable version you can use the following:"
$ flutter channel stable

Related

Flutter simply showing 'sysctl -n hw.optional.arm64' returned unexpected output: ''

Not sure which details are relevant so I'll include as many as possible.
Had to upgrade flutter today and instead of working when I typed in 'flutter upgrade' into android studios terminal/Iterm2/terminal zsh I was met with the following response.
'sysctl -n hw.optional.arm64' returned unexpected output: ''
When I search for this issue the only thing i can find is this post which states that sysctl can't be found. The path does appear to be in my .zshrc but still not working. I can't use which or where sysctl as it just says 'sysctl not found'
When I try to upgrade flutter through brew (brew install --cask flutter) it downloads fine but on installing it throws the following error:
==> Purging files for version 3.3.5 of Cask flutter
Error: It seems there is already a Binary at '/opt/homebrew/bin/dart'.
I can't continue working as I need the new flutter version and it seems the web doesn't have much to show for this particular error.
I can't flutter --version, flutter doctor or anything of the sort as I just get the same message.
I'm using:
MacOS monterey 12.6 macbook air.
Android studios
Iterm2
Ohmyzsh
When I open android studios it shows me the following:
"Flutter device daemon #1 exited (exit code 1), stderr: 'sysctl -n hw.optional.arm64' returned unexpected output: '' in a pop up window.
Pubspec has been edited > get dependencies > Upgrade depenedencies: Both of which have the same error as in the title.
The current configured flutter SDK is not known to be fully supported. Please update your SDK and restart intelliJ which I think is what I've been trying to do.
This is an answer I hope will be helpful for others who have the same issue.
Other answers suggested a fix by just updating the path document (.zshrc) but this is what helped me as that did not and my paths were up to date.
Sadly, it's as simple as manually deleting all my flutter SDK files locally. Downloading them again (this time the latest one) and unzipping it into the same place. Didn't even have to update the path).
Worked a charm, issues appear to be all gone except that the dialogue in android studios is still saying that there are dependencies that need getting and upgrading (but doesn't go away even when I've run it).
I solved it by removing the old flutter SDK, downloading the latest version, and setting it up again.
it works perfectly for me!

Flutter SDK 0.0.0-unknown [xcrun: error: invalid active developer path] after MacOS Ventura update

I upgraded my software yesterday to MacOS Ventura. Today when I opened my project so I can work on it, I cannot get to build the app because I get this error: The current Flutter SDK version is 0.0.0-unknown.
Running "flutter pub get" in elfi_menu...
The current Flutter SDK version is 0.0.0-unknown.
Because country_icons 2.0.2 requires Flutter SDK version >=0.1.4 and no versions of country_icons match >2.0.2 <3.0.0, country_icons ^2.0.2 is forbidden.
So, because elfi_menu depends on country_icons ^2.0.2, version solving failed.
pub get failed (1; So, because elfi_menu depends on country_icons ^2.0.2, version solving failed.)
Exited (1)
I have tried to reinstall flutter, I get the same error, I also tried opening a new project, same error. I also looked it up on the internet but I saw pretty old similar issues, they are fixing it on Windows and it is not the same here on mac from what I've seen.
Does anyone have any ideas why this happened and how to fix it?
Thank you very much in advance
EDIT
Above the output I have written in the code, this is a line that appeared:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
I searched for the solve on the internet and this like solves the problem, written in the terminal:
xcode-select --install
This fixed it for me:
Open Xcode
Go to Preferences
Go to Locations
Use the "Command Line Tools" dropdown to select the available Command Line Tools
Mine was empty and I chose the single available option: "Xcode 14.0.1 (...)"
Restart console, everything should be working
To solve the problem, I have written this in the terminal:
xcode-select --install
source: https://apple.stackexchange.com/questions/254380/why-am-i-getting-an-invalid-active-developer-path-when-attempting-to-use-git-a

Error Module 'flutter_secure_storage' not found when try Product ->Build for -> Profiling

well this error occurs to me when I try to make my app in production.
The app is created with flutter and I was able to create the apk for android, but when I try to do it for ios it won't let me.
The file that I am opening is Runner.xcworkspace and the problem is the import of a flutter library, it seems to me that I have to make some kind of connection with the pods.
here is the error, I want to tell you that I do not want to run the app, but to make an installer
The error that occurs when building a release (ie. flutter build ipa) and not when running a debug build is:
/[REDACTED]/ios/Runner/GeneratedPluginRegistrant.m:48:9: fatal error: module
'flutter_secure_storage' not found
#import flutter_secure_storage;
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
For me regenerating Podfile in the following way solved the issue:
rm ios/Podfile && flutter build ios
See Closed [ios][release] GeneratedPluginRegistrant.m Module not found
#43986

Invalid argument(s: A directory corresponding to fileSystemPath /Users/user/.pub-cache/hosted/pub.dartlang.org/devtools-2.9.2/build could not be found

Somehow the "build" directory doesn't exist within devtools-2.9.2 directory. I am getting this exception only while running the build on iPhone SE 2nd generation iOS 14.5 simulator though, which is weird. This began after an unexpected forced reboot of my mac. But I can not directly connect this event.
What is happening and how can I build this stuff or get rid of exceptions? And what is the cause?
flutter doctor -v No issues found
It seems like the new 2.9.2 release doesn't have the required "build" folder.
You can try fixing it by running this in the terminal:
dart pub global activate devtools -v 2.8.0
which downgrades the version to 2.8.0 (that works fine).
Answer from github.
run the following code and it'll get solved.
dart pub global activate devtools -v 2.8.0
DevTools is no longer being shipped via pub and is now part of the Dart SDK. 2.9.2 was published unintentionally this morning and has since been retracted.
How were you starting DevTools? You might want to file an issue on the DevTools repository if you're still having issues and I (#bkonyi) can help you out further there.

flutter given error while running: Error waiting for a debug connection: Bad state: No element

I'm launching the app in a real device.
Anyone knows why this is happening?
Launching lib/main.dart on GT I9063T in debug mode...
✓ Built build/app/outputs/apk/debug/app-debug.apk.
Error waiting for a debug connection: Bad state: No element
Error launching application on GT I9063T.
Exited (sigterm)
Even the hello-world app is showing this error.
Run flutter clean.
This works for me.
I had this error with a clean install on MacOS X (Mojave), and after trial and error discovered that the main user who is running flutter debug needs to be an admin user.
Clue was the line:
log: Must be admin to run 'stream' command
when running from command line.
After this VS Code and command line work.
Build always works on my VS code normally. Updating to the latest Flutter 1.12 also started showing this and most times, my code either shows up on my device first before showing that debug has started or the program just quits. Any fix with VS code because I am not an Android Studio fan.
Try to change flutter channel to beta using "flutter channel beta". it worked for me to fix issue which is because flutter version is updated to "v1.12.13+hotfix.5".
I ended reinstalling flutter sdk.
Ubuntu 16.04
VSCODE
Started with Flutter 12. It seems that the user must be admin now.
Rolling back to a previous Flutter version will do for now.
flutter version v1.9.1+hotfix.6
I changed the channel of flutter to the master and works, I was using the stable channel.
You can use the command:
flutter channel master
or just flutter channel to see another channel.
In the 'Developer Options' of my phone, when I changed the 'Select Debug app' option to 'Nothing', the error was solved.
Try to downgrade the libglvnd package to version 1.2.0 in arch linux.
This started occuring after i updated xcode to 14.1.
Simple Restarting mac works with flutter clean