-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Getting RNFBMessagingModule.getToken got 4 arguments, expected 2 error #5379
Comments
Please read the breaking changes list for the v12 release https://github.com/invertase/react-native-firebase/blob/master/CHANGELOG.md Those APIs are just a little bit different now Here is how to follow this module so you can safely move along with us as we bump versions: https://invertase.io/blog/react-native-firebase-versioning |
@akshaykatale99 i was same with u |
Even better! |
Please reopen : also got this with the following configuration on Android only (OS version : 8/9/10/11)
I had to downgrade to 11.5 due to incompatibility with 12.x on iOS. Trying to update on Android only to 12.x |
@linaia there's no incompatibility with ios vs android - it works, it appears |
@mikehardy I detail here what was the problem with pod install in ios and why I had to rollback to 11.5.
I've opened a ticket for expo-ads-admob : expo/expo#13300. |
did you manage to resolve the problem? I just upgrade fro
what does it mean? shouldn't we use the cc @mikehardy
thanks |
Hi @SaeedZhiany it means what it says :-) but I can elaborate a little - you may still use getToken and deleteToken (the APIs exist, and they work fine), you just cannot used scoped tokens. In the little snippet you include, you are not using a scoped token so that's fine, your usage appears fine. If you have an argument mis-match perhaps you just need to clear out your project build caching so that javascript and native code are in sync, I typically recommend |
Ah, I didn't know what scoped tokens are. Thanks for clarifying. I need to support the pre-Lolipop Android version so I have to stick with 12.x.x version. Thanks, BTW |
@SaeedZhiany Note that the minSdkVersion should be 19 which is actually down to KitKat https://developer.android.com/reference/android/os/Build.VERSION_CODES#KITKAT I think I made a mistake and you can still go pre-lollipop if needed. f60afe1 - documented as 19 but I put 21 in package.json. You might try changing If you test it and it works I can move it from 21 to 19, you can post a PR here and I can get that released really quickly I do completely understand sometimes there are real reasons but even with a developing world userbase target, there were fewer than 1% active devices for me with SDK < 19 |
Yeah I know that. but my project minSdk is 16 😄
I completely agree, but my managers don't wanna upgrade yet and drop support for the old Android versions! However I'll try what you said and will inform you if it's ok to downgrade minSdk to 19 to make RNFB compatible with more Android versions. |
@mikehardy |
Hola, Me sucedió lo mismo por 2 días busque la solución hasta que la conseguí. después de actualizar a la versión 0.6.0, tendrás problemas de cache , realiza la siguiente operación react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res sudo react-native run-android |
Getting RNFBMessagingModule.getToken got 4 arguments, expected 2 error while calling getToken method.
Here is my code:
I am using follwing verions:
"react-native": "~0.63.3"
"@react-native-firebase/app": "^12.0.0"
"@react-native-firebase/database": "^12.0.0"
"@react-native-firebase/messaging": "^12.0.0"
The text was updated successfully, but these errors were encountered: