-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[🐛] 🔥 @react-native-firebase/perf fails to track my custom trace #6017
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
Comments
Probably not related but I noticed this you use react-native-splash-screen - careful with that one: crazycodeboy/react-native-splash-screen#289 - repo was fully dead from 2019 until just this December so it doesn't develop quickly either. Suggest react-native-bootsplash Also, react-native < 0.65 is very worrisome, it does not even build with Xcode 12.5+ or on M1 macs, I would be suprised if react-native 0.63 worked correctly on Android 12 ? It might, but...I'd hop on https://react-native-community.github.io/upgrade-helper/ and get up to date, there aren't many difficult changes from 0.63 forward.
Those are out of date, but the perf plugin is up to date, and it's the one that should matter the most. Plus you are receiving some traces, so that's a good sign. Those are all possibly of interest, but likely have no bearing on the actual problem, which is unfortunate - as it means it needs more investigation and I have not personally used custom traces so I'm not as familiar with them and likely won't have time to test locally for a while. We do test this locally in our e2e harness: But there is no external verification of trace delivery to the backend, so it could be false positive on the tests. There were issues with analytics debug mode attributes not showing in debug mode on the console, but showing up later once some unknown backend post-processing had happened, which I mention as anecdote to leave open the possibility that the console itself is malfunctioning somehow, beyond our control. Separate avenue of inquiry, if this is happening on just one platform (android, or apple), or on both but you want to focus on one where you definitely reproduce then combining the native sdk issue list for that platform may be informative. Also checking the native logs during reproduction (xcode console while running on real device, or adb logcat for android) may yield something. Reaching directly into node_modules and adding logging prior to any native perf API calls (including all params) and logging all return values may also yield something, for low effort |
@mikehardy Yeah, unfortunately this is a legacy project with a lot of outdated dependencies with multiple people working on it and updating would cause breaking changes, but it is on the backlog at least, but you know how the project planning goes. Complaints aside, for some reason, changing the version of the simulator target from iPhone 11 to iPhone 12 in combination with upgrading I was prompted to do this, as I received this warning which previously did not show in the console: I wish I could provide further info for anyone with similar issues, but probably your best shot is upgrading react-native-firebase versions and firebase sdk and then rebuilding the project via coca-pods with Also as a quick mention for anyone still struggling: One last thing which also took me a short moment to figure out is to make sure you have the correct platform selected in performance mode in console, as I did stupidly for the first time did look through the Android build, which is selected by default despite testing on iOS This was not the issue on my end, but it's relatively easy to miss, so just in case you missed it, make sure you have the correct platform selected. |
Thanks for posting how you were able to resolve it, this stuff is tricky but perhaps your info will help a future person. And yes I have fallen for that platform selection issue before. Same for crashlytics... |
Uh oh!
There was an error while loading. Please reload this page.
Issue
I'm trying to implement firebase performance monitoring for @react-native-firebase. I have followed the official installation guide and it sees to have worked, as inside my firebase console I can now view the automated performance tracking metrics.
Next I tried implementing some custom traces with the following code:
Pretty standard stuff - now when I tried tracking a simple method inside a component in the following way.
The method itself in the build fires correctly and does not produce any errors. However when I open the firebase console and view custom traces, it only shows the default ones.
Any idea what am I doing wrong?
Project Files
Javascript
Click To Expand
package.json
:firebase.json
for react-native-firebase v6:iOS
Click To Expand
ios/Podfile
:AppDelegate.m
:Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:android/app/build.gradle
:android/settings.gradle
:MainApplication.java
:AndroidManifest.xml
:Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:Firebase
module(s) you're using that has the issue:14.4.2
TypeScript
?Y
&^4.4.2
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: