MacBook M1 Flutter error


Error with Adguard:

Error:
Unhandled exception:
Bad state: Future already completed

Fix: 

flutter config --no-analytics
Goto Adguard preferences -> Network -> Select Mode... in "Network Extension" of Automatically filter applications -> Change to "automatic proxy"

Refs:
https://github.com/AdguardTeam/AdguardForMac/issues/773
https://kb.adguard.com/en/macos/solving-problems/big-sur-issues#automatic-proxy


Error: Android Flutter and Dart are not detected in flutter doctor although install correctly

[!] Android Studio (version 4.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.

Fix: Update symbols

ln -s ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins ~/Library/Application\ Support/AndroidStudio4.1

Cocoapod error to install:

LoadError - dlsym(0x7f8926035eb0, Init_ffi_c): symbol not found - 

Fix:

- Right-click on terminal app -> Get Info -> Check to "Open using Rosetta" to enable Rosetta mode as default 
- Then close all terminal instance and reopen it
- Run sudo gem install ffi
- Run pod install

Error: Getting “Error retrieving thread information: (ipc/send) invalid destination port” in the logs on Apple Silicon M1

Fix1: change to the beta channel

flutter channel beta
flutter upgrade
flutter clean

Fix2: silent error by folding it in android studio

Leave a Reply

Your email address will not be published.Required fields are marked *