Coltuxumab
Coltuxumab

Reputation: 787

Tried archiving flutter project with no disc space left, can't fix errors

Question upfront: How can I thoroughly clean/repair my flutter project to allow it to run/build again?

I had been building and archiving (in Xcode) flutter projects without issue until just now.

My computer ran out of disc space mid archive and forced it to stop with "nonzero exit code".

I deleted a bunch of things on the computer to make space, and now it says there is >100gb left.

I was due for a flutter upgrade, so I ran flutter upgrade, which completed without error.

I closed android studio and Xcode and restarted my computer.

I ran flutter clean as well as clean within Xcode.

I can no longer run the app within flutter or run/archive within Xcode.

The exact errors seem variable, but here are some of them that I see:

Running from Xcode:

.../ios/Flutter/Flutter.framework/Headers/FlutterPlugin.h:292:13: Cannot find protocol declaration for 'FlutterTextureRegistry'; did you mean 'FlutterPluginRegistry'?

.../ios/Flutter/Flutter.framework/Headers/FlutterEngine.h:54:38: Cannot find protocol declaration for 'FlutterTextureRegistry'; did you mean 'FlutterPluginRegistry'?

.../.pub-cache/hosted/pub.dartlang.org/in_app_purchase-0.3.1+2/ios/Classes/FIAPReceiptManager.m:13:9: Could not build module 'Flutter'

Running from Flutter (I can't paste all of the errors... way too long):

^~~~~~~~~~~~~~~~~~~~~~ FlutterPluginRegistry While building module 'Flutter' imported from .../.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.5/ios/Classes/FLTPathProviderPlugin.h:5: In file included from :1: In file included from .../Documents/Flutter/patient_medical_record/ios/Pods/../Flutter/Flutter.framework/Headers/Flutter.h:54: In file included from .../Documents/Flutter/patient_medical_record/ios/Pods/../Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:11: .../Documents/Flutter/patient_medical_record/ios/Pods/../Flutter/Flutter.framework/Headers/FlutterPlugin.h:395:11: note: 'FlutterPluginRegistry' declared here @protocol FlutterPluginRegistry ^ 3 errors generated. In file included from .../.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.5/ios/Classes/FLTPathProviderPlugin.m:5: .../.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.5/ios/Classes/FLTPathProviderPlugin.h:5:9: fatal error: could not build module 'Flutter' #import ~~~~~~~^

4 errors generated. note: Using new build system note: Building targets in parallel note: Planning build note: Constructing build description

Upvotes: 0

Views: 185

Answers (1)

Coltuxumab
Coltuxumab

Reputation: 787

Well this is a bummer because I can't find a clean solution, but for now I did fix it with the following:

  • Create a new flutter project
  • Copied over the lib files
  • Copied over other setup in random places (i.e. google services, android changes)
  • Copied over pubspec.yaml and ran packages get

It now works again. Clearly something went wrong in the Flutter-managed files that I don't understand. If someone else can think of a better solution to effectively reset the project, please share.

Upvotes: 0

Related Questions