Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PathNotFoundException: Cannot open file, path = '/Users/myusername/firebase.json'

I am setting up my Flutter project with Firebase. I have setup it using flutterfire configure and I can see the firebase.json was created inside my app's root directory.

I can launch my Android app with no issue and I can see my Crashlytics reports coming in for Android. The problem is with iOS app, when I want to launch the app, I am getting below error:

Unhandled exception:
PathNotFoundException: Cannot open file, path = '/Users/myusername/firebase.json' (OS Error: No such file or directory, errno = 2)
#0      _checkForErrorResponse (dart:io/common.dart:55:9)
#1      _File.open.<anonymous closure> (dart:io/file_impl.dart:381:7)
<asynchronous suspension>
#2      _File.readAsBytes.<anonymous closure> (dart:io/file_impl.dart:562:24)
<asynchronous suspension>
#3      _File.readAsString (dart:io/file_impl.dart:621:18)
<asynchronous suspension>
#4      appleConfigFromFirebaseJson (package:flutterfire_cli/src/common/utils.dart:286:7)
<asynchronous suspension>
#5      UploadCrashlyticsSymbols._getConfigurationFromFirebaseJsonFile (package:flutterfire_cli/src/commands/upload_symbols.dart:278:9)
<asynchronous suspension>
#6      UploadCrashlyticsSymbols.run (package:flutterfire_cli/src/commands/upload_symbols.dart:331:34)
<asynchronous suspension>
#7      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#8      main (file:///Users/myusername/.pub-cache/hosted/pub.dev/flutterfire_cli-1.0.0/bin/flutterfire.dart:63:5)
<asynchronous suspension>
Command PhaseScriptExecution failed with a nonzero exit code
note: Removed stale file '/Users/myusername/Library/Developer/Xcode/DerivedData/Runner-egqrgdeioyfvqjgozczypudejvlm/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Script-AA5FB794F195D0E14D219BF0.sh'

Any idea on why this is happening?

like image 850
Mike Avatar asked Oct 16 '25 00:10

Mike


1 Answers

As per @Nhật Trần comment, my issue is due to my directory folder containing space. After removing the space, then I no longer have this issue.

like image 90
Mike Avatar answered Oct 17 '25 14:10

Mike



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!