sentry-react-native: Unexpected ApplicationNotResponding errors being sent
OS:
- Windows
- MacOS
- Linux
Platform:
- iOS
- Android
SDK:
-
@sentry/react-native
-
react-native-sentry
SDK version: 1.2.1
react-native
version: 0.61.5
Are you using Expo?
- Yes
- No
Are you using sentry.io or on-premise?
- sentry.io (SaaS)
- on-premise
Configuration:
Sentry.init({
dsn: SENTRY_DSN,
environment: ENV,
})
I have the following issue:
I recently upgraded to 1.2.1 of this plugin, and suddenly started to get ApplicationNotResponding errors. According to the java documentation here https://docs.sentry.io/clients/java/integrations/#android, it looks like it’s an optional setting that you have to turn on (and that it waits 5 seconds before sending the error).
I have not turned it on, and it seems to complain after 4 seconds.
I realise I don’t have the latest version of sentry, and will look at getting that updated soon, but I just wanted to confirm if that was a known issue, and perhaps has been fixed.
If not, can you please confirm why it seems to be enabled by default, since the java docs at least seems to suggest it’s an opt in option.
I am using this in my sentry.properties, defaults.url=https://sentry.io/, but assuming that should be as the documentation mentioned.
An example title of the error is ApplicationNotResponding: Application Not Responding for at least 4000 ms.
Update:
I decided to use the ANR error by setting the timeout to 15seconds, which is getting ignored, I’m still getting alerts after 4 seconds. I’m going to assume then that explicitly disabling is going to also have no effect.
The biggest problem of all. My quota of events is going to run out in three days, which means sentry becomes useless to me.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 6
- Comments: 23 (11 by maintainers)
Can confirm I have the same issue since an update to
1.3.2
, I receive a lot of error from the same user.hey @jacquesdev please look at https://docs.sentry.io/platforms/android/#configuration-options
Application Not Responding (ANR)
section, the link you’ve shared is from the old Android SDK version.So to disable it, you need to add in your AndroidManifest file:
<meta-data android:name="io.sentry.anr.enable" android:value="false" />
To change the interval, you have to:
<meta-data android:name="io.sentry.anr.timeout-interval-mills" android:value="15000" />
// if 15 secondsfacing similar issue
Thanks @marandaneto, it seems the version we were using in our package lock file was not the same one as specificied in our package.json. We have now fixed
hey @reyalpsirc I’d recommend you to open a new issue about the
and the user ids are the default ones and not the ones I set on the App during start
.@marandaneto, can you please confirm in which version of the react-native plugin this was changed? Ie in which version did it start using the updated sdk where ANR is turned on by default?
Thank you for the AndroidManifest fix, I will try it out. For me it’s happening with
SM-G960F
andSM-G950F
on Android 9 and 10.