
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
react-native-crash-reporter
Advanced tools
`react-native-crash-reporter` is a small library that hooks into the JavaScript error system and reports the unrolled stack trace to the native side. On the native side a callback will be called where the error information can be forwarded to a crash repo
react-native-crash-reporter
is a small library that hooks into the JavaScript error system and reports the unrolled stack trace to the native side. On the native side a callback will be called where the error information can be forwarded to a crash reporting system of choice. To be able to unroll the error it uses the sourcemap, which is automatically created while the React Native bundle is generated
$ npm install react-native-crash-reporter --save
$ react-native link react-native-crash-reporter
Libraries
➜ Add Files to [your project's name]
node_modules
➜ react-native-crash-reporter
and add MSRCrashReporter.xcodeproj
libMSRCrashReporter.a
to your project's Build Phases
➜ Link Binary With Libraries
Cmd+R
)<android/app/src/main/java/[...]/MainApplication.java
import net.mischneider.MSRCrashReporterPackage;
to the imports at the top of the filenew MSRCrashReporterPackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':react-native-crash-reporter'
project(':react-native-crash-reporter').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-crash-reporter/android')
android/app/build.gradle
:
compile project(':react-native-crash-reporter')
First is to define how the native part should handle crash reports. On Android register a listener on the MSRCrashReporterModule
:
MSRCrashReporterModule.getInstance().setOnRecordCustomExceptionCallback(new MSRCrashReporterModule.OnCrashReporterRecordCustomExceptionCallback() {
@Override
public void recordCustomException(Exception e) {
// TODO: Handle the exception
}
});
On iOS register a listener block on the MSRCrashReporter
singleton:
[MSRCrashReporter sharedReporter].recordCustomExceptionHandler = ^(NSString * _Nonnull name, NSString * _Nonnull reason, NSArray<MSRCrashReporterStackFrame *> * _Nonnull frameArray) {
// TODO: Handle crash
};
Initialize the crash reporter usually in your index.js
of your app:
import { init as initCrashReporting } from 'react-native-crash-reporter';
initCrashReporting({ captureOnDebugMode: false });
FAQs
`react-native-crash-reporter` is a small library that hooks into the JavaScript error system and reports the unrolled stack trace to the native side. On the native side a callback will be called where the error information can be forwarded to a crash repo
We found that react-native-crash-reporter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.