After updating react-native-firebase to the version 4.0.3, I'm getting such errors:
Android:
/Users/iryna/Documents/Projects/hoops-23_03_2018/hoops/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/firestore/RNFirebaseFirestore.java:53: error: cannot find symbol
getFirestoreForApp(appName).disableNetwork().addOnCompleteListener(new OnCompleteListener() {
^
symbol: method disableNetwork()
location: class FirebaseFirestore
/Users/iryna/Documents/Projects/hoops-23_03_2018/hoops/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/firestore/RNFirebaseFirestore.java:78: error: cannot find symbol
getFirestoreForApp(appName).enableNetwork().addOnCompleteListener(new OnCompleteListener() {
^
symbol: method enableNetwork()
location: class FirebaseFirestore
/Users/iryna/Documents/Projects/hoops-23_03_2018/hoops/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/admob/RNFirebaseAdMobRewardedVideo.java:95: error: method does not override or implement a method from a supertype
@Override
^
/Users/iryna/Documents/Projects/hoops-23_03_2018/hoops/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/invites/RNFirebaseInvites.java:169: error: cannot find symbol
mPromise.resolve(Arguments.fromList(Arrays.asList(ids)));
^
symbol: method fromList(List)
location: class Arguments
Note: /Users/iryna/Documents/Projects/hoops-23_03_2018/hoops/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/notifications/RNFirebaseNotificationManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
IOS:
/Users/iryna/Documents/Projects/hoops-23_03_2018/hoops/ios/Hoops/AppDelegate.m:34:27: error: no known class method for selector 'application:openURL:options:'
return [RNFirebaseLinks application:application
^~~~~~~
/Users/iryna/Documents/Projects/hoops-23_03_2018/hoops/ios/Hoops/AppDelegate.m:42:27: error: no known class method for selector 'application:continueUserActivity:restorationHandler:'
return [RNFirebaseLinks application:application
Both
macOS High Sierra
Xcode 10.2
Android studio 3.0.1
0.47.2
4.0.3
dynamic links
You'll also need to upgrade your firebase SDK versions and gradle as well for v4, see the upgrade guide on the v4 realase notes: https://rnfirebase.io/docs/v4.0.x/release-notes#Upgrade-instructions
Same error here (started happening today), we followed the upgrade instructions but this did not solve the issue.
Fixed with the following:
Had to change the next line in package.json
"react-native-firebase": "^4.0.5",
to
"react-native-firebase": "4.0.0",
deleted package-lock.json and ran npm install again
also re-download google-services.json from firebase as we were getting this error:
> Task :app:processDebugGoogleServices FAILED
Parsing json file: ...\android\app\google-services.json
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> Failed to delete: ...\android\app\build\generated\res\google-services\debug
Don't forget to update your project global settings if you set them in android/build.gradle
I changed:
ext {
compileSdkVersion = 26
targetSdkVersion = 26
buildToolsVersion = "26.0.2"
googlePlayServicesVersion = "11.8.0"
supportLibVersion = "27.1.0"
}
to
ext {
compileSdkVersion = 26
targetSdkVersion = 26
buildToolsVersion = "26.0.2"
googlePlayServicesVersion = "12.0.1"
supportLibVersion = "27.1.0"
}
For dynamic links on iOS, you need to make a subtle change to your
AppDelegate.m
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<NSString *, id> *)options {
return [[RNFirebaseLinks instance] application:application openURL:url options:options];
}
- (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray *))restorationHandler {
return [[RNFirebaseLinks instance] application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
}
Most helpful comment
Same error here (started happening today), we followed the upgrade instructions but this did not solve the issue.
Fixed with the following:
Had to change the next line in
package.jsonto
deleted
package-lock.jsonand rannpm installagainalso re-download google-services.json from firebase as we were getting this error: