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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"method is deprecated and will be removed" Solution: migrate to modular style APIs. There is a guide #8282

Closed
nazacity opened this issue Feb 8, 2025 · 33 comments

Comments

@nazacity
Copy link

nazacity commented Feb 8, 2025

[Maintainer edit 👋 - We are resolving comments as people note things and we implement changes - but we really appreciate any feedback. If you convert to modular namespace and still see deprecation messages, or have other feedback, please leave a comment. Thanks]


Got Warning
This v8 method is deprecated and will be removed in the next major release as part of move to match Firebase Web modular v9 SDK API. Please use getApp() instead.

on both Android and IOS

Image
@umakantv

This comment has been minimized.

@furkananter

This comment has been minimized.

@sanjaykdotworld

This comment has been minimized.

@SamJbori

This comment has been minimized.

@retyui

This comment has been minimized.

@mikehardy mikehardy changed the title [🐛] Bug Report This v8 method is deprecated and will be removed in the next major release as part of move to match Firebase Web modular v9 SDK API. Please use getApp() instead "method is deprecated and will be removed in the next major release" Solution: you must migrate to modular firebase-js-sdk style APIs Feb 8, 2025
@mikehardy
Copy link
Collaborator

mikehardy commented Feb 8, 2025

Maintainer here 👋

This message will trigger for every API you use that is deprecated, so basically every single time you use any of the non-modular / chained APIs directly off one of the firebase modules - they are easy enough to search for in each file.

You will need to move to the new non-modular APIs.

I will really underline to everyone: This sounds painful. When I first looked into it in my projects I thought "oh no..."

The API move is purely mechanical though. It is really just changing syntax. It is not difficult, it just changes a lot of files.

The migration is not to be feared.

We just posted up a migration document but this isn't a bug or an issue or anything.
Google has deprecated the non-modular APIs in firebase-js-sdk and they are removing them.
We are obligated to conform to the firebase-js-sdk API set, so we must follow them.

The migration is straightforward thankfully - see here for how you migrate, or - once you accept that you know react-native-firebase v22 will drop all the APIs that are warning you - you can defer your maintenance as long as you like and disable the messages

https://rnfirebase.io/migrating-to-v22

(note, the feature of disabling the messages is present in react-native-firebase 21.7.3+)
(also note, the feature of enabling "strict mode" is present in react-native-firebase 21.10.1+)

Frequent Questions

Things I'm noting as I read comments here, we will add to the migration guide as we see people's concerns:

-" is it that critical?"

the APIs will be removed in react-native-firebase v22 so you will not be able to upgrade until you complete the migration. How critical is it for you to maintain a path to upgrade such that you maintain the ability to receive bugfixes, new ios/android system support, etc? Every project has a different timeline and answer for that

  • "I've seen some issues related to the migration":

Indeed there are still some typing issues at the moment, for typescript users. We are treating those as high priority bugs and fixing them as quickly as possible

  • Your thought here. I/we are listening. If you post a comment noting something specific you see about the migration, and have some constructive suggestion that would be great. We'll try to smooth the process out in response to any specific notes or constructive suggestions

Cheers

@mikehardy mikehardy pinned this issue Feb 8, 2025
@furkananter

This comment has been minimized.

@mikehardy

This comment has been minimized.

@omerkars78

This comment has been minimized.

@mikehardy

This comment has been minimized.

@furkananter

This comment has been minimized.

@mikehardy mikehardy changed the title "method is deprecated and will be removed in the next major release" Solution: you must migrate to modular firebase-js-sdk style APIs "method is deprecated and will be removed" Solution: migrate to modular style APIs. There is a guide Feb 8, 2025
@mikehardy

This comment has been minimized.

@mikehardy

This comment has been minimized.

@mikehardy

This comment has been minimized.

@SamJbori

This comment has been minimized.

@emokeOrdog

This comment has been minimized.

@mikehardy

This comment has been minimized.

@ryansobol

This comment has been minimized.

@mikehardy

This comment has been minimized.

@retyui

This comment has been minimized.

@mikehardy

This comment has been minimized.

@aman-prajapati05

This comment has been minimized.

@mikehardy

This comment has been minimized.

@mikehardy

This comment has been minimized.

@mikehardy

This comment has been minimized.

@aliceni81

This comment has been minimized.

@tahaipek

This comment has been minimized.

@mikehardy

This comment has been minimized.

@mikehardy

This comment has been minimized.

@SamJbori

This comment has been minimized.

@aliceni81

This comment has been minimized.

@Decezaris

This comment has been minimized.

@mikehardy

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests