Closed ncpa0cpl closed 2 months ago
It seems that we had a Native Module in Java, which I wasn't aware of, that was setting up the DD client separately from the rest of the app, and it had been provided with a incorrect token. (hence the The Datadog library has already been initialized
error)
Describe the bug
After performing apk upgrade to a new version, DD logs don't make it out to the DataDog servers and can't be seen in the log explorer. The error messages in the logcat report a invalid token, but that cannot be the case as the token in this app is hardcoded right into the config and didn't change in the newer version.
Newer apk version is using
@datadog/mobile-react-native
at version2.4.3
, while the old apk has that package at version2.3.6
, though I am not sure if this is relevant as I also tried to downgrade this package to the previous version and am still experiencing this issue.Curiously I tested upgrading on two devices, one with Android 10 and one with Android 12. This problem only occurs on the Android 12, on 10 it works without any problems.
Also, I am not sure it this is relevant at all but I am always performing the upgrade while the app is running in the foreground (since this is how it will always be performed in the production).
I'd appreciate any help as this is a blocker that prevents us from releasing the new version of our app.
Reproduction steps
Upgrade apk to a newer version
SDK logs
Expected behavior
No response
Affected SDK versions
2.3.6
Latest working SDK version
don't know
Did you confirm if the latest SDK version fixes the bug?
Yes
Integration Methods
Yarn
React Native Version
0.74.5
Package.json Contents
iOS Setup
No response
Android Setup
No response
Device Information
No response
Other relevant information
No response