-
Notifications
You must be signed in to change notification settings - Fork 236
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
Can't record an error with Crashlytics.recordError() #152
Comments
|
@willderness no, I use iOS device and emulator for testing and still can't make it work. How is that even possible? The very first and basic function doesn't work for some reason. |
@igorarkhipenko after having the same issue myself i realized recordError only works on an actual device and does not work via the emulator. Hope this helps |
I created a helper for logging errors feel free to use it
console.log should help you in the emulator |
@shyaniv7 could you please elaborate on what environments you manage to makes it work? |
As stated in the code this will log an error to crashlytics on both android and iOS using a single logError function. |
@shyaniv7 I mean configuration like are you on debug mode, simulator, or device. Something like that |
We actually have environment variables where we are able to know what environment we are running, what device, api version, app version and more information and whenever we use the logError we concatenate those information onto the error message before logging it. We wrote a fetch wrapper that makes our api requests and handles any caught errors using logError |
So that pretty much it is.
Crashlytics.crash()
does well and everything gets recorded as expected, but not in case withrecordError(error)
method.My code snipped is below and it's needless to say that
componentDidCatch()
method is called as well.What could be the reason of such behavior? Any help is appreciated.
The text was updated successfully, but these errors were encountered: