Bugsnag via segment not showing any error in their dashboard - react-native

I've integrated bugsnag in react native via segment and followed all the steps provided by segment documents but still, it's not showing any sort of error or log in bugsnag dashboard. Should I implement bugsnag directly instead of relying on the segment?

We would always recommend integrating with Bugsnag directly instead of using the Segment integration. This is because Bugsnag should be loaded as early on in your application as possible in order to detect all errors in your app, and using it via the Segment integration breaks that.
The Segment integration also doesn't use an up to date version of Bugsnag - by integrating with Bugsnag directly you will be able to use the latest version of the Bugsnag library and take advantage of all the latest fixes and improvements.
Take a look at our platform guides for details on how to get set up with your preferred platform: https://docs.bugsnag.com/platforms/

Related

React Native adding and remove packages as features or plugin at runtime

I am working on building a modular React Native App for Enterprises in which it requires adding or remove packages as features or plugins (without updating the app). The following shall be a process
An enterprise user shall download and install a base mobile Android/iOS app (build in React Native) in a mobile handset
From the back-end, multiple packages or features (may defer with other enterprises) shall be configured for an enterprise
The multiple pre-built packages/modules shall be kept at a store at the backend
The enterprise user shall automatically get the packages as features in the mobile app using step 1 above, post step 2
I don't have any issue handling and building the backend and react native app. I am struggling that how dynamically adding/removing a package is possible in the existing base mobile app based on backend configuration.
If those packages/features are javascript only you can try codepush. This will allow to change the js bundle runtime. Check out this section: Dynamic Deployment Assignment
However if those packages require native implementation the only solution would be to split your code. This way you would need to ship every package in the apk, but the main bundle will contain only the code of the "base" app and the other code with the additional features would be loaded runtime. This will also bring a huge performance boost.
You can easily control which user sees what by conditionally rendering the screens by a role or whatever.
For code splitting you can check out these repos:
react-native-bundle-splitter or repack

In Expo v35 managed workflow, how to handle `Warning: Async Storage has been extracted from react-native core`?

I use expo SDK v35, and works on the managed workflow (one without eject).
In my project, I face warning whenever I use AsyncStorage as demonstrated by their doc.
This, however, results in following warning being emitted:
Warning: Async Storage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '#react-native-community/async-storage' instead of 'react-native'. See https://github.com/react-native-community/react-native-async-storage
I tried to follow the instruction given by this warning, and tried to use #react-native-community/async-storage, but it did not succeed; it appears the library requires some linking, which is not available if you want to work inside the Expo's managed workflow.
Question
What is the proper way to handle AsyncStorage warning when working on expo's managed workflow?
Env
Expo 35.0.0
Recently I began developing a simple app using react native and the expo cli. However, on the react native docs, it seems that asyncStorage is getting deprecated. The solution would normally be to use the react community version but that is not compatible with expo.
https://github.com/react-native-community/async-storage/
There is currently no scope of linking libraries while using the managed workflow of expo. I've faced similiar issues , and was bound to migrate from expo to pure react native. And expo isnt meant for production as apps are slower. Better i would suggest you to migrate to pure React native . Async storage cant be used otherwise and if deprecated , you will be in a great problem in the future for your app.

React Native: Using Firebase Crashlytics and Bugsnag

We use Bugsnag for general error catching, and we use firebase for a host of other features.
At the moment crashes and error only got to Bugsnag (react-native-bugsnag), but we'd like them to also go to Crashlytics (which is installed as part of React Native Firebase).
Is this possible? If so how.
While Bugsnag and Crashlytics can usually operate fine alongside each other, there are some cases where other error reporting tools can cause interference and thus the error may only land in one or the other.
I'd recommend trying Bugsnag and Crashlytics out separately to confirm the behaviour in case something else is causing the issue, or swapping the order in which they are initialized as that will likely make a difference.
Please feel free to reach out to us at Bugsnag support to discuss your config in more detail.

How to integrate Crashlytics with Sentry?

Can you help us please with these great tools integration.
Our React Native iOS project has been using Crashlytics for several months and it works well in case of native crashes but in case of JS exceptions it required some customization of react-native logging (this Medium articles helped a lot to reach as verbose JS output as possible). In the end we didn't have as good JS errors output as we would like to have.
So we decided to integrate Sentry as well.
It was done successfully, but it seems that Sentry outpaces Crashlytics catching crashes before it: we can see crashes in Sentry dashboard but no in Crashlytics' one.
My question is the next: is it possible to integrate both Crashlytics and Sentry for both case - native crashes AND JS exceptions?
Thank you in advance.
UPD 06.03.2019
Finally, we've come to the usage of only Sentry because of the next reasons:
first of all, it doesn't require any special code for the JS events & errors well-formated output, whereas Crashlytics does;
second, it doesn't require any manipulation with dSym files released (and probably encrypted) via Testflight;
third, it also catches native crashes and provides a verbose output as well.
Sentry has support to React Native which includes the JS and Native errors (both iOS and Android).
I'm totally biased as I work for Sentry but it seems to me, based on your requirements and the two options you listed, Sentry is the one which has the support you need.
Mike from Fabric here. On iOS, only one uncaught exception handler can be safely installed and there will be conflicts, like you're seeing if multiple handlers are installed.

Google Maps Premium Plan on react-native-maps

I'm trying to modify an app which is using react-native-maps with a free API token to start using the "Premium plan" for Google Maps.
I have reviewed the documentation, but I can not find how to add the premium client id and channel id.
Also, after checking https://developers.google.com/maps/premium/android-get-started I saw that for native applications the package "com.google.android.m4b.maps" should be used instead of "com.google.android.gms.maps". How can I do this with react-native-maps?
Thanks!
The react-native-maps project has several dependencies on com.google.android.gms.maps. Unfortunately, you will need to either…
Fork this project and update the dependencies to com.google.android.m4b.maps, or
Write your own Android Native Module for the functionality you need instead of using react-native-maps