Closed vaibhavaroraneo closed 6 months ago
The problem is related to the firebase config definition which is not properly indented:
flavorizr:
app:
android:
flavorDimensions: "app_flavor"
flavors:
staging:
app:
name: " Staging"
android:
applicationId: "com.app.staging"
firebase:
config: "android/app/src/staging/google-services.json"
ios:
bundleId: "com.app.staging"
firebase:
config: "ios/config/staging/GoogleService-Info.plist"
preprod:
app:
name: "PreProd"
android:
applicationId: "com.app.preprod"
firebase:
config: "android/app/src/preprod/google-services.json"
ios:
bundleId: "com.app.preprod"
firebase:
config: "ios/config/preprod/GoogleService-Info.plist"
prod:
app:
name: "Prod"
android:
applicationId: "com.app.live"
firebase:
config: "android/app/src/prod/google-services.json"
ios:
bundleId: "com.app.live"
firebase:
config: "ios/config/prod/GoogleService-Info.plist"
I also suggest changing the config path of your firebase files because they will be overwritten over and over if you're using the same path as the destination path.
@AngeloAvv thanks for the quick response.
flavorizr:
app:
android:
flavorDimensions: "neozap_flavor"
flavors:
staging:
app:
name: "NeoZAP Staging"
android:
applicationId: "com.neozap.staging"
firebase:
config: "android/app/src/staging/google-services.json"
ios:
bundleId: "com.neozap.staging"
firebase:
config: "ios/runner/staging/GoogleService-Info.plist"
preprod:
app:
name: "NeoZAP PreProd"
android:
applicationId: "com.neozap.preprod"
firebase:
config: "android/app/src/preprod/google-services.json"
ios:
bundleId: "com.neozap.preprod"
firebase:
config: "ios/runner/preprod/GoogleService-Info.plist"
prod:
app:
name: "NeoZAP"
android:
applicationId: "com.neozap.live"
firebase:
config: "android/app/src/prod/google-services.json"
ios:
bundleId: "com.neozap.live"
firebase:
config: "ios/runner/prod/GoogleService-Info.plist"
this is updated path that I've set for the firebase files. I am facing a strange issue of app crashes on iOS for staging
and preprod
. Only prod
is getting run for simulators and devices. the error received is
Terminating app due to uncaught exception 'com.firebase.core', reason: 'App name can only contain alphanumeric, hyphen (-), and underscore (_) characters'
The firebase files are updated with the names. but somehow its getting crashed stating the same error.
Is there anything that I'm missing out?
Closing as you're requesting help for a different subject
I've added firebase to the project having 3 flavors. Now upon running
flutter pub run flutter_flavorizr
there appears an error thatThe following fields are null or undefined: [firebase]. Read the docs for further details
.The exact message received is
The flavor code added is
Google-service files for android are present in 3 directories
staging
prepared
prod
created inandroid > app > src > staging/preprod/prod
Google service files for iOS are present in 3 directories
staging
prepared
prod
created inios > config >staging/preprod/prod
@AngeloAvv please help out what is being missed out.