🔥Phone auth not working with disabled swizzling
Issue
When I try validate phone number with disabled swizzling I see message
[auth/notification-not-forwarded] If app delegate swizzling is disabled, remote notifications received by UIApplicationDelegate need to be forwarded to FIRAuth's canHandleNotificaton: method.]
I have FIRAuth's canHandleNotificaton in my didReceiveRemoteNotification but this method returns NO
I added some logs to FIRAuthNotificationManager.m and I see _pendingCallbacks is null in canHandleNotificaton
I was curious how this works with enabled swizzling and I see me didReceiveRemoteNotification method is called 4 times and canHandleNotificaton only once handle prober notification correctly
2020-04-20 13:40:59.797069+0200 mobile[567:88578] ++++++++++++++++++ internalVerifyPhoneNumber++++++++++++++++
2020-04-20 13:40:59.797207+0200 mobile[567:88578] ++++++++++ checkNotificationForwardingWithCallback _pendingCallbacks:(
"<__NSMallocBlock__: 0x2813d39c0>"
)
2020-04-20 13:40:59.797260+0200 mobile[567:88335] ++++++++++ didReceiveRemoteNotification:proberNotification _pendingCallbacks:(
"<__NSMallocBlock__: 0x2813d39c0>"
)
2020-04-20 13:40:59.797429+0200 mobile[567:88335] canHandleNotification data {
warning = "This fake notification should be forwarded to Firebase Auth.";
}
2020-04-20 13:40:59.797454+0200 mobile[567:88335] canHandleNotification kNotificationProberKey: This fake notification should be forwarded to Firebase Auth. _pendingCallbacks: (null)
2020-04-20 13:40:59.797479+0200 mobile[567:88335] return NO kNotificationProberKey !_pendingCallbacks
2020-04-20 13:40:59.797524+0200 mobile[567:88335] canHandleNotification data {
warning = "This fake notification should be forwarded to Firebase Auth.";
}
2020-04-20 13:40:59.797550+0200 mobile[567:88335] canHandleNotification kNotificationProberKey: This fake notification should be forwarded to Firebase Auth. _pendingCallbacks: (null)
2020-04-20 13:40:59.797570+0200 mobile[567:88335] return NO kNotificationProberKey !_pendingCallbacks
2020-04-20 13:40:59.797603+0200 mobile[567:88335] canHandleNotification data {
warning = "This fake notification should be forwarded to Firebase Auth.";
}
2020-04-20 13:40:59.797749+0200 mobile[567:88335] canHandleNotification kNotificationProberKey: This fake notification should be forwarded to Firebase Auth. _pendingCallbacks: (
"<__NSMallocBlock__: 0x2813d39c0>"
)
2020-04-20 13:40:59.797905+0200 mobile[567:88335] +++++++++++++++++++++++++++++ callBack
2020-04-20 13:40:59.798895+0200 mobile[567:88335] return YES kNotificationProberKey
2020-04-20 13:40:59.798969+0200 mobile[567:88335] canHandleNotification data {
warning = "This fake notification should be forwarded to Firebase Auth.";
}
2020-04-20 13:40:59.798988+0200 mobile[567:88335] canHandleNotification kNotificationProberKey: This fake notification should be forwarded to Firebase Auth. _pendingCallbacks: (null)
2020-04-20 13:40:59.799000+0200 mobile[567:88335] return NO kNotificationProberKey !_pendingCallbacks
2020-04-20 13:40:59.799185+0200 mobile[567:88335]
Project Files
Javascript
Click To Expand
package.json:
"@react-native-firebase/analytics": "^6.4.0",
"@react-native-firebase/app": "^6.4.0",
"@react-native-firebase/auth": "^6.4.0",
"@react-native-firebase/crashlytics": "^6.4.0",
"@react-native-firebase/dynamic-links": "^6.4.0",
"@react-native-firebase/iid": "^6.4.0",
"@react-native-firebase/in-app-messaging": "^6.4.0",
"@react-native-firebase/messaging": "^6.4.0",
"@react-native-firebase/perf": "^6.4.0",
"@react-native-firebase/remote-config": "^6.4.0"
firebase.json for react-native-firebase v6:
# N/A
iOS
Click To Expand
ios/Podfile:
- [ ] I'm not using Pods
- [x] I'm using Pods and my Podfile looks like:
# N/A
AppDelegate.m:
// N/A
Android
Click To Expand
Have you converted to AndroidX?
- [ ] my application is an AndroidX application?
- [ ] I am using
android/gradle.settingsjetifier=truefor Android compatibility? - [ ] I am using the NPM package
jetifierfor react-native compatibility?
android/build.gradle:
// N/A
android/app/build.gradle:
// N/A
android/settings.gradle:
// N/A
MainApplication.java:
// N/A
AndroidManifest.xml:
<!-- N/A -->
Environment
Click To Expand
react-native info output:
System:
OS: macOS Mojave 10.14.5
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 221.97 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.0 - /usr/local/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
npmGlobalPackages:
react-native-cli: 2.0.1
react-native: 0.61.2
- Platform that you're experiencing the issue on:
- [ ] iOS
- [ ] Android
- [ ] iOS but have not tested behavior on Android
- [ ] Android but have not tested behavior on iOS
- [ ] Both
react-native-firebaseversion you're using that has this issue:6.4.0
Firebasemodule(s) you're using that has the issue:auth
- Are you using
TypeScript?Y
- 👉 Check out
React Native FirebaseandInvertaseon Twitter for updates on the library.
Might be related #3386
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.
@psanowski It seems like I'm seeing the same issue. Did you manage to fix it?