[bug]: flutterfire configure fails on reusing firebase.json
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 42/100
調査の方向性
flutterfire configure のエントリーポイントから開始し、Android の google-services.json ファイルを書き込む際に firebase.json の値がどのように再利用されるかを確認してください。新しい Flutter プロジェクトでコマンドを 2 回実行し、再利用された設定を成功した 1 回目の実行結果と比較してください。2 回目の実行が null type error なしで完了し、保存された値を再利用できれば、issue は完了したものとします。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Dart
- スター
- 194
- フォーク
- 76
- 平均マージ
- 2日 9時間
- マージ済み PR(30日)
- 7
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
invertase/flutterfire_cli のほかの issue
-
bug Needs Attention triage
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
invertase/flutterfire_cli#467 ·
メンテナーはふだん 1 日以内に返信
-
Needs Attention Stale triage
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
invertase/flutterfire_cli#450 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
[bug]: upload symbols fails with Flutter 3.44 because the SourcePackages have moved対応中かも @phuongta-pi が 138 日前に担当しました。 オープンbug Needs Attention triage
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
invertase/flutterfire_cli#443 · コメント 18 件 · リアクション 12 件 ·
メンテナーはふだん 1 日以内に返信
-
bug Needs Attention triage
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
invertase/flutterfire_cli#428 · コメント 14 件 · リアクション 4 件 ·
メンテナーはふだん 1 日以内に返信
-
blocked: customer-response bug enhancement keep open
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
invertase/flutterfire_cli#403 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
invertase/flutterfire_cli の issue をすべて見る
似ている issue
-
bug product: very_good_flutter_plugin
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
VeryGoodOpenSource/very_good_templates#654 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
Server never consumes the request body on early-error paths: _sinkIncoming does not resume the paused subscription再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
[BUG][All] VLESS URIs with flow=xtls-rprx-vision-udp443 are silently dropped on subscription importオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
simonoppowa/OpenNutriTracker#1336 ·
メンテナーはふだん 1 日以内に返信