0
votes

Any help on this, i get this error whenever i try to run the pubspec file

[App] flutter pub get Running "flutter pub get" in App...
ReadFully failed 23

../../third_party/dart/runtime/bin/snapshot_utils.cc: 134: error: Failed to memory map snapshot: C:\flutter\bin\cache\dart-sdk\bin\snapshots\pub.dart.snapshot ===== CRASH ===== ExceptionCode=-1073741819, ExceptionFlags=0, ExceptionAddress=00007FFCA6E39440 Aborting re-entrant request for stack trace. pub get failed (-1073740791; Aborting re-entrant request for stack trace.) exit code 3221226505

This is my pubspec.yaml file

version: 1.0.0+1

environment: sdk: ">=2.7.0 <3.0.0"

dependencies: flutter: sdk: flutter
firebase_core: ^0.7.0
firebase_auth: "^0.20.0+1"
cloud_firestore: "^0.16.0"
google_sign_in:
shared_preferences: 0.5.12+4
provider:
fluttertoast: ^7.1.6
firebase_database:

cupertino_icons: ^1.0.0
font_awesome_flutter: ^8.5.0
flutter_svg: ^0.18.0 #
using svg in our app

dev_dependencies: flutter_test: sdk: flutter

1
select all your code and press Ctrl+K to format it properly. - Doc

1 Answers

0
votes

There are several reasons why this happens arbitrarily. Here are some solutions you can try out :

  1. Upgrade flutter to the latest stable engine.

  2. If you are using a Mac which is synced with iCloud, it sometimes deletes the pub.dart.snapshot which flutter can't find. That is the same file in the error you are getting.

  3. In the flutter directory try running these commands to clean the git repo:

git clean -xfd

git stash save --keep-index

git stash drop

git pull

flutter doctor

Hope one of these solutions fixes it.