[bug]: flutterfire configure fails on reusing firebase.json
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
Direzione di ricerca
Parti dal punto di ingresso flutterfire configure e verifica come vengono riutilizzati i valori di firebase.json durante la scrittura del file Android google-services.json. Esegui il comando due volte in un progetto Flutter nuovo, confronta la configurazione riutilizzata con quella della prima esecuzione riuscita e considera conclusa l’issue quando la seconda esecuzione termina senza il null type error e riutilizza i valori salvati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is there an existing issue for this?
- I have searched the existing issues.
CLI Version
1.0.0
Firebase Tools version
13.29.0
Flutter Doctor Output
[√] Flutter (Channel stable, 3.27.1, on Microsoft Windows [Version 10.0.22631.4602], locale en-US)
• Flutter version 3.27.1 on channel stable at C:\Users\thukt\scoop\apps\flutter\3.27.1
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 17025dd882 (4 weeks ago), 2024-12-17 03:23:09 +0900
• Engine revision cb4b5fff73
• Dart version 3.6.0
• DevTools version 2.40.2
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at C:\Users\thukt\AppData\Local\Android\sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: C:\Users\thukt\AppData\Local\Programs\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.12.3)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.12.35527.113
• Windows 10 SDK version 10.0.26100.0
[√] Android Studio (version 2024.2)
• Android Studio at C:\Users\thukt\AppData\Local\Programs\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)
[√] VS Code (version 1.96.2)
• VS Code at C:\Users\thukt\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.102.0
[√] Connected device (4 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 14 (API 34) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version
10.0.22631.4602]
• Chrome (web) • chrome • web-javascript • Google Chrome 131.0.6778.206
• Edge (web) • edge • web-javascript • Microsoft Edge 131.0.2903.112
[√] Network resources
• All expected network resources are available.
• No issues found!
Description
Each time I try to run flutterfire configure on this project to refresh configuration, I have to start from scratch. What I try to reuse the values in firebase.json, I get the following error:
$ flutterfire configure
? You have an existing `firebase.json` file and possibly already configured your project for Firebas
e. Would you prefer to reuse the values in your existing `firebase.json` file to configure your proj
✔ You have an existing `firebase.json` file and possibly already configured your project for Firebas
e. Would you prefer to reuse the values in your existing `firebase.json` file to configure your project? · yes
Failed to write android google-services.json file write for default service file. Please report this
issue at:https://github.com/invertase/flutterfire_cli. Exception: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast
type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast
If I say no and yes to overwrite, then follow the prompts and re-enter what I've previously entered, things work correctly.
Steps to reproduce
I can recreate this with a fresh project and doing flutterfire configure twice in a row.
$ flutter create flutterfire_minimal
[...]
$ cd flutterfire_minimal
[...]
$ flutterfire config
i Found 1 Firebase projects.
✔ Select a Firebase project to configure your Flutter application with · <create a new project>
✔ Enter a project id for your new Firebase project (e.g. my-cool-project) · flutterfire-minimal
i New Firebase project flutterfire-minimal created successfully.
✔ Which platforms should your configuration support (use arrow keys & space to select)? · android, ios, web
? Which Android application id (or package name) do you want to use for this configuration, e.g. 'co
✔ Which Android application id (or package name) do you want to use for this configuration, e.g. 'com.example.app'? · com.example.flutterfire.example
i Firebase android app com.example.flutterfire.example is not registered on Firebase project flutterfire-minimal.
i Registered a new Firebase android app on Firebase project flutterfire-minimal.
i Firebase ios app com.example.flutterfireMinimal is not registered on Firebase project flutterfire-minimal.
i Registered a new Firebase ios app on Firebase project flutterfire-minimal.
i Firebase web app flutterfire_minimal (web) is not registered on Firebase project flutterfire-minimal.
i Registered a new Firebase web app on Firebase project flutterfire-minimal.
[...]
$ flutterfire config
? You have an existing `firebase.json` file and possibly already configured your project for Firebas
e. Would you prefer to reuse the values in your existing `firebase.json` file to configure your proj
✔ You have an existing `firebase.json` file and possibly already configured your project for Firebas
e. Would you prefer to reuse the values in your existing `firebase.json` file to configure your project? · yes
Failed to write android google-services.json file write for default service file. Please report this
issue at:https://github.com/invertase/flutterfire_cli. Exception: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast
type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast
Results of this pushed to https://github.com/AlanKrueger/flutterfire_minimal with individual commits for each step.
Expected behavior
Not to receive a type error and for the configure command to reuse the previously-entered information.
Screenshots
No response
Additional context and comments
No response
- Lingua principale
- Dart
- Stelle
- 194
- Fork
- 76
- Merge medio
- 2g 9h
- PR unite (30g)
- 7
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di invertase/flutterfire_cli
-
bug Needs Attention triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
invertase/flutterfire_cli#467 ·
I maintainer di solito rispondono entro 1 giorno
-
request: usage as packgeApertaNeeds Attention Stale triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
invertase/flutterfire_cli#450 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug Needs Attention triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
invertase/flutterfire_cli#443 · 16 commenti · 12 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
bug Needs Attention triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 66/100
invertase/flutterfire_cli#428 · 12 commenti · 4 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
blocked: customer-response bug enhancement keep open
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
invertase/flutterfire_cli#403 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di invertase/flutterfire_cli
Issue simili
-
Smart charging: USB charger re-assert is starved during BLE scans, so the tablet never dischargesApertabug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
decentespresso/decaid#931 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
flame-engine/flame#4067 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
mrgnhnt96/zonai#37 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
google/skills_lint.dart#58 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
nvim-flutter/flutter-tools.nvim#557 ·
I maintainer di solito rispondono entro 1 giorno