Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 [firebase_core_web 1.7.0] is not working for web on flutter master channel #9132

Closed
Alecia1997 opened this issue Jul 18, 2022 · 10 comments
Labels
platform: web Issues / PRs which are specifically for web. plugin: core resolution: solution-provided A solution has been provided in the issue. type: bug Something isn't working type: crash A compile error or crash

Comments

@Alecia1997
Copy link

Receiving the following when running on web (Master Channel) -> Error: Assertion failed
Screenshot 2022-07-18 at 09 21 30

@Alecia1997 Alecia1997 added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Jul 18, 2022
@flutterninja9
Copy link

I fixed it by passing "options" in Firebase.initializeApp() method

@darshankawar darshankawar added the triage Issue is currently being triaged. label Jul 18, 2022
@darshankawar
Copy link

@Alecia1997
Do you get same error using previous version of it ? firebase_core_web: 1.6.6 ?
If not, then it could be related to an ongoing issue with flutter_core_web that you can follow-up in for further updates.

#9106
#9124 (comment)

@darshankawar darshankawar added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Jul 18, 2022
@Alecia1997
Copy link
Author

Not getting the same error when using the previous version - Firebase_core_web: 1.6.6.
Wil have a look at the referenced links you provided above
Thank you!

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Jul 18, 2022
@deepak786
Copy link
Contributor

deepak786 commented Jul 18, 2022

I have the same issue on the web using flutter stable version 3.0.2.

In the project, firebase_core is defined as

firebase_core: 1.19.1

Note there is no symbol (^) before the version number. It means I want to use this version strictly.

This version 1.19.1 uses

firebase_core_platform_interface: ^4.4.3
firebase_core_web: ^1.6.6

Note: firebase_core_web version is ^1.6.6.
It means when getting the dependencies, it can be 1.6.6, 1.6.7, 1.6.8, 1.6.9, and so on.
But it should not be 1.7.0.

When I build the project, it is taking firebase_core_web: 1.7.0
Please check the attached screen from CI (CodeMagic).

Screen Shot 2022-07-18 at 9 47 41 PM

Due to version 1.7.0, the web build is not working.

The question is why the dependency version is resolved to 1.7.0

is this correct behavior?

UPDATE:
I think the above behavior is correct. If either patch or minor version is updated then the dependency is resolved to a higher current available version of the same major version.

@deepak786
Copy link
Contributor

deepak786 commented Jul 18, 2022

It seems that JS SDK V9 is used now which is the cause of this issue.
It was better to update the major versions of the packages so that previous versions continue to work fine.

@deepak786
Copy link
Contributor

deepak786 commented Jul 18, 2022

I had to downgrade all the web dependencies to make the project work on the web.

firebase_core_web: 1.6.6
firebase_auth_web: 3.3.19
firebase_analytics_web: 0.4.0+17
firebase_database_web: 0.2.0+17
firebase_storage_web: 3.2.19
firebase_messaging_web: 2.4.4
firebase_remote_config_web: 1.0.16
cloud_firestore_web: 2.6.19
cloud_functions_web: 4.2.18

@DerickVanDerSandt
Copy link

@Alecia1997 also getting the same error. Downgrading all packages seems like the only way at the moment. @google-oss-bot Please advise on a different solution

@darshankawar
Copy link

This could be related to web JS SDK v9 which is the current version for which an issue is filed that you can track:
firebase/firebase-js-sdk#6445

I am able to replicate the same error as mentioned here: #9106 (comment)

@darshankawar darshankawar added plugin: core platform: web Issues / PRs which are specifically for web. type: crash A compile error or crash and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. labels Jul 19, 2022
@deepak786
Copy link
Contributor

It seems that we have to pass the Firebase options when initializing the Firebase from the dart side using Firebase.initializeApp().

@russellwheatley
Copy link
Member

Yes, you have to pass FirebaseOptions for the web platform. flutterfire configure will write the file, and you just have to import the generated options file and pass into options for Firebase.initializeApp().

@darshankawar darshankawar added the resolution: solution-provided A solution has been provided in the issue. label Jul 28, 2022
@firebase firebase locked and limited conversation to collaborators Aug 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform: web Issues / PRs which are specifically for web. plugin: core resolution: solution-provided A solution has been provided in the issue. type: bug Something isn't working type: crash A compile error or crash
Projects
None yet
Development

No branches or pull requests

7 participants