Giter Site home page Giter Site logo

bugsnag / bugsnag-react-native Goto Github PK

View Code? Open in Web Editor NEW
369.0 30.0 121.0 5.62 MB

Error monitoring and reporting tool for native exceptions and JS errors in React Native apps

Home Page: https://docs.bugsnag.com/platforms/react-native

License: MIT License

Objective-C 18.89% JavaScript 36.19% Java 30.52% Ruby 3.84% Makefile 1.32% TypeScript 0.45% Shell 1.77% Gherkin 4.57% Starlark 2.47%
crash error-reporting react-native android ios bugsnag crash-reporting crash-reporting-tool error-monitoring error-handling

bugsnag-react-native's Introduction

Deprecation notice

We upgraded our React Native support in the latest all-in-one JavaScript notifier repo.

All projects running React Native 0.60+ should upgrade to our new React Native notifier: @bugsnag/react-native. See the upgrade guide for details on how to upgrade.

This package is now deprecated, but will continue to be supported for older versions of React Native (pre 0.60) and it will continue to work with Bugsnag's API. However, it will no longer receive updates unless they are critical.

Please upgrade at your earliest convenience.


Bugsnag error monitoring & exception reporter for React Native

Documentation

Automatic React Native crash reporting with Bugsnag helps you detect both native OS and JavaScript errors in your React Native apps.

Features

Getting started

  1. Create a Bugsnag account
  2. Complete the instructions in the integration guide to report unhandled exceptions thrown from your app
  3. Report handled exceptions using Client.notify()
  4. Customize your integration using the configuration options

Support

Contributing

All contributors are welcome! For information on how to build, test and release bugsnag-react-native, see our contributing guide.

License

The Bugsnag React Native library is free software released under the MIT License. See LICENSE.txt for details.

bugsnag-react-native's People

Contributors

bengourley avatar bullmo avatar cawllec avatar cooperka avatar cpetzel avatar danilobuerger avatar dejakob avatar djskinner avatar duncanhewett avatar foxyblocks avatar fractalwrench avatar gracecheung avatar grahamcampbell avatar hawkrives avatar hwu1001 avatar jamesreggio avatar kattrali avatar kpinedok avatar mpatric avatar paulz avatar rghorbani avatar sabbyt54 avatar sbycrosz avatar sibljon avatar skv-headless avatar sondremare avatar sospedra avatar steve-nester-uk avatar thesisb avatar tomlongridge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bugsnag-react-native's Issues

Support cocoapod import

Many RN projects are handling their dependencies through Podfile in order to skip a lot of the manual integrations steps.

This is almost enabled by every IOS RN library out there.

Would be great to be able to add one to bugsnag-react-native as well.

Had something like this in mind. Haven't got it up and running yet thought as I'm not too knowledgeable what should be imported in kscrash either?

Another alternative is to make the library use cocoapods as well instead of vendoring. But that requires all RN projects to use cocoapods which might not be wishful.

require "json"
package = JSON.parse(File.read('package.json'))

Pod::Spec.new do |s|
  s.name          = package['name']
  s.version       = package['version']
  s.summary       = package['description']
  s.author        = "Bugsnag"
  s.license       = package['license']
  s.requires_arc  = true
  s.homepage      = "https://github.com/bugsnag/bugsnag-react-native"
  s.source        = { :git => 'https://github.com/bugsnag/bugsnag-react-native.git' }
  s.platform      = :ios, '6.0'
  s.libraries     = 'z'
  s.source_files  =
    "cocoa/vendor/kscrash/Source/KSCrash/**/*.{h,m}",
    "cocoa/vendor/bugsnag-cocoa/Source/*.{h,m}",
    "cocoa/*.{h,m}"

end

not receive notifications on development

How can I set up bugsnag to stop sending me emails and reporting errors when developing my app? I can't find anything in the docs. Any help will be greatly appreciated (:

[Android] Missing semi-colon after link

This is a relatively minor annoyance, but after running react-native link this line is inserted into MainActivity.java:

import com.bugsnag.BugsnagReactNative

It is missing a semi-colon and causes the build to fail.

EXC_BAD_ACCESS: Attempted to dereference garbage pointer 0x616c63245673748b.

This happens from time to time on a line which points to and its quite frequently

 Bugsnag.notify(new Error(`....`));

Thread dump

Thread 1·
/usr/lib/system/libsystem_kernel.dylib:___workq_kernreturn	
/usr/lib/system/libsystem_pthread.dylib:__pthread_wqthread	
Thread 2·
/usr/lib/system/libsystem_kernel.dylib:mach_msg_trap	
/usr/lib/system/libsystem_kernel.dylib:mach_msg	
Frameworks/CoreFoundation.framework/CoreFoundation:___CFRunLoopServiceMachPort	
Frameworks/CoreFoundation.framework/CoreFoundation:___CFRunLoopRun	
Frameworks/CoreFoundation.framework/CoreFoundation:CFRunLoopRunSpecific	
Frameworks/Foundation.framework/Foundation:-[NSRunLoop(NSRunLoop) runMode:beforeDate:]	
Frameworks/Foundation.framework/Foundation:-[NSRunLoop(NSRunLoop) runUntilDate:]	
Frameworks/UIKit.framework/UIKit:-[UIEventFetcher threadMain]	
Frameworks/Foundation.framework/Foundation:___NSThread__start__	
/usr/lib/system/libsystem_pthread.dylib:__pthread_body	
/usr/lib/system/libsystem_pthread.dylib:__pthread_start	
Thread 3·
/usr/lib/system/libsystem_kernel.dylib:mach_msg_trap	
/usr/lib/system/libsystem_kernel.dylib:mach_msg	
fi:__cxa_throw	
 /usr/lib/system/libsystem_pthread.dylib:__pthread_body	
/usr/lib/system/libsystem_pthread.dylib:__pthread_start	
Thread 4·
/usr/lib/system/libsystem_kernel.dylib:mach_msg_trap	
/usr/lib/system/libsystem_kernel.dylib:mach_msg	
Frameworks/CoreFoundation.framework/CoreFoundation:___CFRunLoopServiceMachPort	
Frameworks/CoreFoundation.framework/CoreFoundation:___CFRunLoopRun	
Frameworks/CoreFoundation.framework/CoreFoundation:CFRunLoopRunSpecific	
Frameworks/CFNetwork.framework/CFNetwork:+[NSURLConnection(Loader) _resourceLoadLoop:]	
Frameworks/Foundation.framework/Foundation:___NSThread__start__	
/usr/lib/system/libsystem_pthread.dylib:__pthread_body	
/usr/lib/system/libsystem_pthread.dylib:__pthread_start	
Thread 5·
/usr/lib/system/libsystem_kernel.dylib:mach_msg_trap	
/usr/lib/system/libsystem_kernel.dylib:mach_msg	
Frameworks/CoreFoundation.framework/CoreFoundation:___CFRunLoopServiceMachPort	
Frameworks/CoreFoundation.framework/CoreFoundation:___CFRunLoopRun	
Frameworks/CoreFoundation.framework/CoreFoundation:CFRunLoopRunSpecific	
Frameworks/AVFoundation.framework/Frameworks/AVFAudio.framework/AVFAudio:__ZN20GenericRunLoopThread5EntryEPv	
Frameworks/AVFoundation.framework/Frameworks/AVFAudio.framework/AVFAudio:__ZN9CAPThread5EntryEPS_	
/usr/lib/system/libsystem_pthread.dylib:__pthread_body	
/usr/lib/system/libsystem_pthread.dylib:__pthread_start	
Thread 6·
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN3WTF10StringImpl7destroyEPS0_	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN14OpaqueJSStringD1Ev	
Frameworks/JavaScriptCore.framework/JavaScriptCore:JSStringRelease	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__Z13objectToValueP9JSContextP11objc_object	
Frameworks/JavaScriptCore.framework/JavaScriptCore:+[JSValue valueWithObject:inContext:]	
fi:__cxa_throw	
 fi:__cxa_throw	
 fi:__cxa_throw	
 fi:__cxa_throw	
 fi:__cxa_throw	
 fi:__cxa_throw	
 fi:__cxa_throw	
 fi:__cxa_throw	
 Frameworks/Foundation.framework/Foundation:___NSThreadPerformPerform	
Frameworks/CoreFoundation.framework/CoreFoundation:___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__	
Frameworks/CoreFoundation.framework/CoreFoundation:___CFRunLoopDoSources0	
Frameworks/CoreFoundation.framework/CoreFoundation:___CFRunLoopRun	
Frameworks/CoreFoundation.framework/CoreFoundation:CFRunLoopRunSpecific	
fi:__cxa_throw	
 Frameworks/Foundation.framework/Foundation:___NSThread__start__	
/usr/lib/system/libsystem_pthread.dylib:__pthread_body	
/usr/lib/system/libsystem_pthread.dylib:__pthread_start	
Thread 7·
/usr/lib/system/libsystem_kernel.dylib:___semwait_signal	
/usr/lib/system/libsystem_c.dylib:nanosleep	
/usr/lib/libc++.1.dylib:__ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZNSt3__111this_thread9sleep_forIxNS_5ratioILl1ELl1000EEEEEvRKNS_6chrono8durationIT_T0_EE	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN7bmallocL14waitUntilFalseERNSt3__111unique_lockINS_11StaticMutexEEENS0_6chrono8durationIxNS0_5ratioILl1ELl1000EEEEERb	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN7bmalloc4Heap8scavengeERNSt3__111unique_lockINS_11StaticMutexEEENS1_6chrono8durationIxNS1_5ratioILl1ELl1000EEEEE	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN7bmalloc4Heap18concurrentScavengeEv	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN7bmalloc9AsyncTaskINS_4HeapEMS1_FvvEE13threadRunLoopEv	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN7bmalloc9AsyncTaskINS_4HeapEMS1_FvvEE16threadEntryPointEPS4_	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZNSt3__114__thread_proxyINS_5tupleIJPFvPN7bmalloc9AsyncTaskINS2_4HeapEMS4_FvvEEEES8_EEEEEPvSC_	
/usr/lib/system/libsystem_pthread.dylib:__pthread_body	
/usr/lib/system/libsystem_pthread.dylib:__pthread_start	
Thread 8·
/usr/lib/system/libsystem_kernel.dylib:___psynch_cvwait	
/usr/lib/system/libsystem_pthread.dylib:__pthread_cond_wait	
/usr/lib/libc++.1.dylib:__ZNSt3__118condition_variable4waitERNS_11unique_lockINS_5mutexEEE	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN3WTF10ParkingLot21parkConditionallyImplEPKvRKNS_12ScopedLambdaIFbvEEERKNS3_IFvvEEENSt3__16chrono10time_pointINSD_12steady_clockENSD_8durationIxNSC_5ratioILl1ELl1000000000EEEEEEE	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN3JSC11JITWorklist9runThreadEv	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZNSt3__110__function6__funcIZN3JSC11JITWorklistC1EvE3$_0NS_9allocatorIS4_EEFvvEEclEv	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN3WTFL16threadEntryPointEPv	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN3WTFL19wtfThreadEntryPointEPv	
/usr/lib/system/libsystem_pthread.dylib:__pthread_body	
/usr/lib/system/libsystem_pthread.dylib:__pthread_start	
Thread 9·
/usr/lib/system/libsystem_kernel.dylib:___psynch_cvwait	
/usr/lib/system/libsystem_pthread.dylib:__pthread_cond_wait	
/usr/lib/libc++.1.dylib:__ZNSt3__118condition_variable4waitERNS_11unique_lockINS_5mutexEEE	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN3WTF10ParkingLot21parkConditionallyImplEPKvRKNS_12ScopedLambdaIFbvEEERKNS3_IFvvEEENSt3__16chrono10time_pointINSD_12steady_clockENSD_8durationIxNSC_5ratioILl1ELl1000000000EEEEEEE	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN3WTF18ParallelHelperPool21waitForClientWithTaskERKNS_6LockerINS_8LockBaseEEE	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN3WTF18ParallelHelperPool16helperThreadBodyEv	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN3WTFL16threadEntryPointEPv	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN3WTFL19wtfThreadEntryPointEPv	
/usr/lib/system/libsystem_pthread.dylib:__pthread_body	
/usr/lib/system/libsystem_pthread.dylib:__pthread_start	
Thread 10·
/usr/lib/system/libsystem_kernel.dylib:mach_msg_trap	
/usr/lib/system/libsystem_kernel.dylib:mach_msg	
Frameworks/CoreFoundation.framework/CoreFoundation:___CFRunLoopServiceMachPort	
Frameworks/CoreFoundation.framework/CoreFoundation:___CFRunLoopRun	
Frameworks/CoreFoundation.framework/CoreFoundation:CFRunLoopRunSpecific	
PrivateFrameworks/WebCore.framework/WebCore:__ZL12RunWebThreadPv	
/usr/lib/system/libsystem_pthread.dylib:__pthread_body	
/usr/lib/system/libsystem_pthread.dylib:__pthread_start	
Thread 11·
/usr/lib/system/libsystem_kernel.dylib:mach_msg_trap	
/usr/lib/system/libsystem_kernel.dylib:mach_msg	
Frameworks/CoreFoundation.framework/CoreFoundation:___CFRunLoopServiceMachPort	
Frameworks/CoreFoundation.framework/CoreFoundation:___CFRunLoopRun	
Frameworks/CoreFoundation.framework/CoreFoundation:CFRunLoopRunSpecific	
Frameworks/CoreFoundation.framework/CoreFoundation:CFRunLoopRun	
Frameworks/CoreMotion.framework/CoreMotion:CLStartStopAdvertisingBeacon	
/usr/lib/system/libsystem_pthread.dylib:__pthread_body	
/usr/lib/system/libsystem_pthread.dylib:__pthread_start	
Thread 12·
/usr/lib/system/libsystem_kernel.dylib:mach_msg_trap	
/usr/lib/system/libsystem_kernel.dylib:mach_msg	
Frameworks/CoreFoundation.framework/CoreFoundation:___CFRunLoopServiceMachPort	
Frameworks/CoreFoundation.framework/CoreFoundation:___CFRunLoopRun	
Frameworks/CoreFoundation.framework/CoreFoundation:CFRunLoopRunSpecific	
Frameworks/Foundation.framework/Foundation:-[NSRunLoop(NSRunLoop) runMode:beforeDate:]	
Frameworks/Foundation.framework/Foundation:-[NSRunLoop(NSRunLoop) run]	
fi:__cxa_throw	
 Frameworks/Foundation.framework/Foundation:___NSThread__start__	
/usr/lib/system/libsystem_pthread.dylib:__pthread_body	
/usr/lib/system/libsystem_pthread.dylib:__pthread_start	
Thread 13·
/usr/lib/system/libsystem_kernel.dylib:mach_msg_trap	
/usr/lib/system/libsystem_kernel.dylib:mach_msg	
/usr/lib/system/libsystem_kernel.dylib:thread_suspend	
fi:__cxa_throw	
 /usr/lib/system/libsystem_pthread.dylib:__pthread_body	
/usr/lib/system/libsystem_pthread.dylib:__pthread_start	
Thread 14·
Thread 15·
/usr/lib/system/libsystem_kernel.dylib:select$DARWIN_EXTSN	
Frameworks/CoreFoundation.framework/CoreFoundation:___CFSocketManager	
/usr/lib/system/libsystem_pthread.dylib:__pthread_body	
/usr/lib/system/libsystem_pthread.dylib:__pthread_start	
Thread 16·
/usr/lib/system/libsystem_kernel.dylib:semaphore_timedwait_trap	
/usr/lib/system/libdispatch.dylib:__dispatch_semaphore_wait_slow	
Frameworks/CoreLocation.framework/CoreLocation:CLClientInvalidate	
Frameworks/CoreLocation.framework/CoreLocation:CLClientGetCapabilities	
Frameworks/CoreLocation.framework/CoreLocation:CLClientGetCapabilities	
Frameworks/CoreLocation.framework/CoreLocation:CLClientCreateIso6709Notation	
Frameworks/CoreLocation.framework/CoreLocation:CLClientCreateIso6709Notation	
Frameworks/CoreLocation.framework/CoreLocation:CLClientCreateIso6709Notation	
Frameworks/CoreLocation.framework/CoreLocation:CLClientCreateIso6709Notation	
/usr/lib/system/libxpc.dylib:__xpc_connection_call_event_handler	
/usr/lib/system/libxpc.dylib:__xpc_connection_mach_event	
/usr/lib/system/libdispatch.dylib:__dispatch_client_callout4	
/usr/lib/system/libdispatch.dylib:__dispatch_mach_msg_invoke	
/usr/lib/system/libdispatch.dylib:__dispatch_queue_serial_drain	
/usr/lib/system/libdispatch.dylib:__dispatch_mach_invoke	
/usr/lib/system/libdispatch.dylib:__dispatch_queue_serial_drain	
/usr/lib/system/libdispatch.dylib:__dispatch_queue_invoke	
/usr/lib/system/libdispatch.dylib:__dispatch_queue_serial_drain	
/usr/lib/system/libdispatch.dylib:__dispatch_queue_invoke	
/usr/lib/system/libdispatch.dylib:__dispatch_root_queue_drain_deferred_item	
/usr/lib/system/libdispatch.dylib:__dispatch_kevent_worker_thread	
/usr/lib/system/libsystem_pthread.dylib:__pthread_wqthread	
Thread 17·
Thread 18·
Thread 19·
/usr/lib/system/libsystem_kernel.dylib:semaphore_timedwait_trap	
/usr/lib/system/libdispatch.dylib:__dispatch_semaphore_wait_slow	
Frameworks/CoreLocation.framework/CoreLocation:CLClientInvalidate	
Frameworks/CoreLocation.framework/CoreLocation:CLClientGetCapabilities	
Frameworks/CoreLocation.framework/CoreLocation:CLClientGetCapabilities	
Frameworks/CoreLocation.framework/CoreLocation:CLClientCreateIso6709Notation	
Frameworks/CoreLocation.framework/CoreLocation:CLClientCreateIso6709Notation	
Frameworks/CoreLocation.framework/CoreLocation:CLClientCreateIso6709Notation	
Frameworks/CoreLocation.framework/CoreLocation:CLClientCreateIso6709Notation	
/usr/lib/system/libxpc.dylib:__xpc_connection_call_event_handler	
/usr/lib/system/libxpc.dylib:__xpc_connection_mach_event	
/usr/lib/system/libdispatch.dylib:__dispatch_client_callout4	
/usr/lib/system/libdispatch.dylib:__dispatch_mach_msg_invoke	
/usr/lib/system/libdispatch.dylib:__dispatch_queue_serial_drain	
/usr/lib/system/libdispatch.dylib:__dispatch_mach_invoke	
/usr/lib/system/libdispatch.dylib:__dispatch_queue_serial_drain	
/usr/lib/system/libdispatch.dylib:__dispatch_queue_invoke	
/usr/lib/system/libdispatch.dylib:__dispatch_queue_serial_drain	
/usr/lib/system/libdispatch.dylib:__dispatch_queue_invoke	
/usr/lib/system/libdispatch.dylib:__dispatch_root_queue_drain_deferred_item	
/usr/lib/system/libdispatch.dylib:__dispatch_kevent_worker_thread	
/usr/lib/system/libsystem_pthread.dylib:__pthread_wqthread	
Thread 20·
/usr/lib/system/libsystem_kernel.dylib:___psynch_cvwait	
/usr/lib/system/libsystem_pthread.dylib:__pthread_cond_wait	
/usr/lib/libc++.1.dylib:__ZNSt3__118condition_variable4waitERNS_11unique_lockINS_5mutexEEE	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN3WTF10ParkingLot21parkConditionallyImplEPKvRKNS_12ScopedLambdaIFbvEEERKNS3_IFvvEEENSt3__16chrono10time_pointINSD_12steady_clockENSD_8durationIxNSC_5ratioILl1ELl1000000000EEEEEEE	
PrivateFrameworks/WebKitLegacy.framework/WebKitLegacy:<redacted>	
PrivateFrameworks/WebKitLegacy.framework/WebKitLegacy:<redacted>	
PrivateFrameworks/WebKitLegacy.framework/WebKitLegacy:<redacted>	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN3WTFL16threadEntryPointEPv	
Frameworks/JavaScriptCore.framework/JavaScriptCore:__ZN3WTFL19wtfThreadEntryPointEPv	
/usr/lib/system/libsystem_pthread.dylib:__pthread_body	
/usr/lib/system/libsystem_pthread.dylib:__pthread_start	
Thread 21·
/usr/lib/system/libsystem_kernel.dylib:___workq_kernreturn	
/usr/lib/system/libsystem_pthread.dylib:__pthread_wqthread	
Thread 22·
/usr/lib/system/libsystem_kernel.dylib:___workq_kernreturn	
/usr/lib/system/libsystem_pthread.dylib:__pthread_wqthread	
Thread 23·
/usr/lib/system/libsystem_kernel.dylib:___workq_kernreturn	
/usr/lib/system/libsystem_pthread.dylib:__pthread_wqthread

props not registered with breadcrumbs

Cant seem to get component props to register with breadcrumbs.

componentWillReceiveProps (newProps) {
    this.props.bugsnagClient.leaveBreadcrumb('New Props to MyComponent', {
      type: 'process',
      props: newProps.data,
      component: '<MyComponent/>'
    })
  }
componentWillMount () {
    this.props.bugsnagClient.leaveBreadcrumb('Load MyComponent', {
      type: 'navigation',
      props: this.props.data,
      component: '<MyComponent />'
    })
  }

Anyone else experience this issue ?

Meta-data in breadcrumbs throwing error

breadcrumbs work fine if I only pass a type but throw an error when I attempt to pass additional data:

client.leaveBreadcrumb(msg, {
      type: 'navigation',
      component: 'Something',
      props: props,
      previousScene: 'Previous',
    });

Any thoughts on why this would be happening?

SourceMap upload returns "Nothing to Upload" response

When I run the following command

curl https://upload.bugsnag.com/ \
  -F apiKey={My-API-key} \
  -F appVersion=1.0 \
  -F minifiedUrl="main.jsbundle" \
  -F minifiedFile=main.jsbundle \
  -F sourceMap=sourcemap.js \
  -F overwrite=true \
  -F /workspace/app/index.ios.js=app/index.ios.js

I get a response that says Nothing to upload

I am not sure what the last line of the command should be pointing at, but I feel like that is the incorrect part.

Error trying to install for iOS: Bugnsnag/Bugsnag.h not found

Following your steps here, I was able to easily get Android up and running. I can see the bugs coming into my Bugsnag snag project dashboard (which is a Javascript type project by the way).

However, when I try to build in iOS after following the specific iOS instructions here (using the CocoaPods route), I get the following error in Xcode: Bugnsnag/Bugsnag.h not found

image

The documentation here on what to install/configure is pretty confusing by the way.

[Android] Crash when trying to leave non-string breadcrumbs

Current behavior

leaveBreadcrumb on Android can't process non-string data types.

For example, each of the following lines:

client.leaveBreadcrumb('some type', { foo: 1 });
client.leaveBreadcrumb('some type', { foo: true });
client.leaveBreadcrumb('some type', { foo: {} });

Leads to a crash with the errors:

TypeError: expected dynamic type `string', but had type `int64'
TypeError: expected dynamic type `string', but had type `boolean'
TypeError: expected dynamic type `string', but had type `object'

They work fine on iOS, and strings do work on Android (e.g. { foo: 'bar' }). The crash itself happens in readStringMap trying to execute pair.getString("value").

Repro steps

You can repro successfully with the current example app, using the code above.

Expected behavior

According to allowedMapObjectTypes in lib/Bugsnag.js, int and boolean should be accepted, and Object should be recursively processed.

React Native peer dependency for 0.41.x

When trying to use this with react native 0.41.2, there's a npm peer dependency warning:

[email protected] requires a peer of react-native@^0.40 but none was installed

This is because the dependency in bugsnag-react-native is declared as: "react-native": "^0.40"

That means as per semver rules (caret allows changes that do not modify the left-most non-zero digit), any react native version other than 0.40.x is not supported.

Usage with mocha

This library works great when compiling and running it on device. Problems come when running test with mocha with components that are using this library.

The problem is that this library does not have dist version of it which would be in ES5. All code is in ES6 now and babel to my knowledge ignores node_modules by default. So that is my I am getting "Unexpected token import" from 2nd line of bugsnag-react-native library.

My question is that

  1. isn't it normal that all npm packages have es5 (dist) version in the package so we shouldn't babelify node_modules.
  2. is my mocha configured wrong?
  3. is it normal that react native libraries are all written in es6? Notice that this problem is only when testing.

The way I have solved this for now is that I moved bugsnag library to my src folder and I require it there so then it will be compiled with babel.

Tell me if you need more information :)

Here is also my mocha.opts:

--compilers js:babel-core/register
--require react-native-mock/mock
--require babel-polyfill
--require test/setup.js
--reporter spec
--recursive

KSCrash/KSCrashReportWriter.h file not found

Hi Guys !

Issue:
When archiving my project I got this error:
/node_modules/bugsnag-react-native/cocoa/vendor/bugsnag-cocoa/Source/BugsnagConfiguration.m:27:9: 'KSCrash/KSCrashReportWriter.h' file not found

There is no problem when running on simulator or device (iPhone6), I assume this is due to missing architecture parameters.

Thanks for your help

After installing library I am getting a gradle error

Error is related to min-sdk versions and I believe I've correctly tried the use tools override library suggestion:

Error:Execution failed for task ':bugsnag-react-native:processDebugAndroidTestManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 4 cannot be smaller than version 16 declared in library [com.facebook.react:react-native:0.33.1] /Users/trobrock/Sites/Frankenstein/node_modules/bugsnag-react-native/android/build/intermediates/exploded-aar/com.facebook.react/react-native/0.33.1/AndroidManifest.xml
    Suggestion: use tools:overrideLibrary="com.facebook.react" to force usage

No Crash Report?

1、debug:use your demo, it can report the crash, but after android release, can't release the crash
2、add meta-data in androidManifest and replace the appkey;
add "apply plugin:com.bugsnag.android.gradle.BugsnagPlugin" in app/buildgradle;
add "classpath 'com.bugsnag:bugsnag-android-gradle-plugin:2.3.2' " in project/build.gradle;
add "-keepattributes SourceFile,LineNumberTable" in app/proguard-rules.pro;
But can't get the crash,after click the Button ,exit !!

Reporting unhandled errors not working on non-debug env.

Symptoms:
Having staging/release (or call it production) environment...

  • Bugsnag does not capture unhandled errors
  • Bugsnag does sent reports when notify is used.

All works as expected in development environment.

Possible source of this problem - default error handler.
What I understand, default error handler just shuts the app down - there is no time for Bugsnag to complete notification request.

Possible solution (maybe?)

  • pass control to default handler when request is resolved. Control would be passed with delay.
  • cache and send reports on next start (this would probably require passing control to default handler with delay anyway)

Notes:

  • despite I tested Android only, it affects iOS as well.

Reported errors aren't re-thrown

Unhandled errors aren't handled by the default global error handler in RN after the error report has been sent, meaning that the app won't crash on error.

Tested on iOS with library v1.2.3 and RN v0.37.

Error when using Bugsnag for both react native and native ios

I successfully configured Bugsnag for my react native project and everything is fine dandy. Errors from the javascript side of things are caught and placed in Bugsnag service.
Now I also want to configure Bugsnag inside the Xcode project to catch errors from the native domain.

So I followed the guide, installed the Bugsnag pod, and called Bugsnag.startBugsnag() in appDelegate (which is written in Swift).

But when I run the app on the device, in runtime, I got an error which says something along the lines of "found lib... in both places... which one to use?".

For some reason, I can't make it so that this error message will appear again, but instead, now it just says "something went wrong when installing the app on device". But this happens for the same reason.

What do I need to do to successfully run Bugsnag in the same react native project on both the javascript side and native side?

Example Jest tests fail to compile bugsnag-react-native library

The newest release of react native includes some built in jest tests. https://github.com/facebook/react-native/releases/tag/v0.35.0

If you try to run them after adding the bugsnag react native library you get a compilation failure.

screenshot 2016-10-12 18 07 17

I think the jest react native preset is set to skip preprocessing files inside the node_modules folder.

I tried adding the following to a sample project's package.json to see if it would help:

  "jest": {
    "preset": "jest-react-native",
    "preprocessorIgnorePatterns": [
      "node_modules/(?!(jest-)?react-native|react-clone-referenced-element|bugsnag-react-native)"
    ]
  },

This produced the error

    Bugsnag: No native client found. Is BugsnagReactNative installed in your native code project?

      at new Client (node_modules/bugsnag-react-native/lib/Bugsnag.js:27:7)
      at Object.<anonymous> (bugsnag.js:7:12)
      at Object.<anonymous> (index.ios.js:15:14)
      at Object.<anonymous> (__tests__/index.ios.js:3:15)

[hot module reloading] Bugsnag Android init Error

Hello

I am getting the following error running bugsnag in an Android (Genymotion) emulator.

You must call Bugsnag.init before any other Bugsnag methods.

error

This seems to only be happening with Hot module loading enabled but I can't be sure.

From what I can tell from the android library the client should never be null?

Thanks
Ciaran

Breadcrumbs not properly treating objects as metadata on android

Using this line of code:
client.leaveBreadcrumb('foo', {bar: 'baz'});
results in the warning:
Breadcrumb metadata is not a Map or String

here:

  leaveBreadcrumb = (name, metadata) => {
    if (name.constructor !== String) {
      console.warn('Breadcrumb name must be a String');
      return;
    }
    if (metadata == undefined) {
      metadata = {};
    }
    if (metadata.constructor === String) {
      metadata = {'message': metadata };
    }
    if (!(metadata instanceof Map)) {
      console.warn('Breadcrumb metadata is not a Map or String'); //<---------
      return;
    }
    let type = metadata['type'] || 'manual';
    delete metadata['type'];
    NativeClient.leaveBreadcrumb({
      name,
      type,
      metadata: typedMap(metadata)
    });

as a result, the breadcrumbs are never left.

i can see that the incoming metadata is jsut a normal js object. it does not appear to be converted into Map, as-is

How to unset user?

Setting user is easy...

I am experiencing issues with unsetting user (e.g when user logs out).
setUser(null, null, null) does not work - further reports are completely without user (not even "dummy" one)

setUser(undefined, undefined, undefined) produces fatal error.
screen

Having something like unsetUser would be great!

exceptions trigger crash in bugsnag

I'm running into an issue where a call to notify(), an exception, crashes my app. In the debugger it's shown as 'mapState is not a function' error.

screen shot 2016-12-01 at 12 41 33

ExceptionsManager.js:63 mapState is not a functionhandleException @  
ExceptionsManager.js:63handleError @ InitializeCore.js:108(anonymous function) @   Bugsnag.js:46reportFatalError @ error-guard.js:40guard @   MessageQueue.js:48callFunctionReturnFlushedQueue @ MessageQueue.js:107(anonymous   function) @ debuggerWorker.js:71  
ExceptionsManager.js:71 Unhandled JS Exception: mapState is not a   functionreactConsoleErrorHandler @ ExceptionsManager.js:71console.error @   YellowBox.js:61logIfNoNativeHook @ RCTLog.js:38__callFunction @   MessageQueue.js:236(anonymous function) @ MessageQueue.js:108guard @   MessageQueue.js:46callFunctionReturnFlushedQueue @ MessageQueue.js:107(anonymous   function) @ debuggerWorker.js:71  

Improve source map docs

Trying to setup Bugsnag to show full stack traces, but I am stuck on source maps.
Docs are brief, not clear at all, eventually I need to know some magic behind your services to get things working.

I have no problem to build a bundle with source map, but I fail on other side. Despite having source maps uploaded to your servers, I cannot see anything but bundled file.

Is there anything I could provide you in order to help

Boolean values don't get logged in breadcrumbs [iOS]

Even after the fixes in #56 (rebased on v1.2.2), boolean breadcrumb values show up as blank on crash reports for iOS. However, they work fine on Android.

Screenshot showing missing breadcrumb value:

screenshot of missing breadcrumb

A bit of logging in BugsnagReactNative.m reveals that BSGConvertTypedNSDictionary properly recognizes boolean values, transforming them using @([RCTConvert BOOL:value]) and saving converted[key] as either 1 or 0. Assuming this is expected behavior, the issue must happen after this point, though I haven't been able to figure out exactly where.

Any advice?

How do I access instantiated library in other classes?

I would like to add breadcrumbs on each screen of my app. Right now the only way it seems like I can do this is to construct the bugsnag library in my root index and then pass down the property to each screen in my app. This is quite tedious.

It would be better to construct/configure the app in the root screen and then make bugsnag a singleton so I can access an instance in the rest of the app.

There must be some better way of accessing the configured library than passing the property throughout the entire app.

Need manual installation guide

My Version

react native: 0.36
bugsnag: 1.0.4

In IOS,

react-native link

doesn't automatically map with the sdk.

So I had to manually do Linking with the library in the XCode.

You should probable update the installation guide manually for option

Runtime Error: No native client found

After following the directions to setup Bugsnag in our react-native project, I'm able to build and run but I just get this error:

Bugsnag: No native client found. Is BugsnagReactNative installed in your native code project?]

I did run react-native link.

Where is proguard mapping.txt?

Hello, from the tutorial I've read on https://docs.bugsnag.com/api/proguard-upload/, the param -F proguard=@/path/to/mapping.txt should include proguard mapping file. My question is: where I can get this file? I've search this and didn't see any mapping.txt. I also have make sure to enable enableProguardInReleaseBuilds and execute ./gradlew assembleRelease && ./gradlew installRelease to generate app-release.apk. Maybe am I doing misconfiguration on react native project?

This is my proguard file for reference:

# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Disabling obfuscation is useful if you collect stack traces from production crashes
# (unless you are using a system that supports de-obfuscate the stack traces).
-dontobfuscate

# React Native

# Keep our interfaces so they can be used by other ProGuard rules.
# See http://sourceforge.net/p/proguard/bugs/466/
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip

# Do not strip any method/class that is annotated with @DoNotStrip
-keep @com.facebook.proguard.annotations.DoNotStrip class *
-keep @com.facebook.common.internal.DoNotStrip class *
-keepclassmembers class * {
    @com.facebook.proguard.annotations.DoNotStrip *;
    @com.facebook.common.internal.DoNotStrip *;
}

-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
  void set*(***);
  *** get*();
}

-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
-keepclassmembers class *  { @com.facebook.react.uimanager.UIProp <fields>; }
-keepclassmembers class *  { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
-keepclassmembers class *  { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }

-dontwarn com.facebook.react.**

# okhttp

-keepattributes Signature
-keepattributes *Annotation*
-keep class okhttp3.** { *; }
-keep interface okhttp3.** { *; }
-dontwarn okhttp3.**

# okio

-keep class sun.misc.Unsafe { *; }
-dontwarn java.nio.file.*
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn okio.**

# react-native-facebook-account-kit
-keep class com.facebook.FacebookSdk {
   boolean isInitialized();
}
-keep class com.facebook.appevents.AppEventsLogger {
   com.facebook.appevents.AppEventsLogger newLogger(android.content.Context);
   void logSdkEvent(java.lang.String, java.lang.Double, android.os.Bundle);
}

# react-native-config
-keep class com.gokuliner.BuildConfig { *; }

# react-native-background-geolocation
-dontwarn ch.qos.logback.core.**

# bugsnag-react-native
-keepattributes LineNumberTable,SourceFile

-dontwarn sun.misc.Unsafe

NativeClient.notifyBlocking is not a function

Not sure if I messed something up with the installation but I did verify that both libz.tbd and libBugsnagReactNative.a are in my linked libraries in xCode. The client seems to initialize without errors.

image

After initializing the client in a singleton module I attempt to send a test error using client.notify and I catch the following error from the Promise:

TypeError: NativeClient.notifyBlocking is not a function
at Client._callee$ (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:111239:14)
at tryCatch (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:34034:29)
at Generator.invoke [as _invoke] (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:34308:12)
at Generator.prototype.(anonymous function) [as next] (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:34067:13)
at tryCatch (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:34034:29)
at invoke (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:34110:12)
at http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:34155:1
at tryCallTwo (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:33674:1)
at doResolve (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:33829:9)
at new Promise (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:33695:1)

Client.notify requires an Error object, docs and setup do not reflect this

When setting up Bugsnag on a new project, I followed instructions to do a test error to make sure it's set up properly. However the project said to do client.notify("Test Error"), and that caused a warning and wouldn't post to Bugsnag. The client.notify function requires an Error object. My solution was to simply wrap the string in an Error with client.notify(new Error("Test Error")). That worked fine.

This should probably be reflected in the projects page or docs, or client.notify function should accept a string as well and create a new Error object if the parameter is a string. I've attached the screenshot of what my Bugsnag project dashboard showed during setup.

Otherwise a flawless and simple setup process! 👍

screen shot 2016-11-17 at 12 15 27 pm

Build error (undefined symbols for architecture x86_64)

I installed and linked the package and I am getting the following error:

Undefined symbols for architecture x86_64:
  "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::compare(char const*) const", referenced from:
      (anonymous namespace)::NodePrinter::isSwiftModule(std::__1::shared_ptr<swift::Demangle::Node>) in libBugsnagReactNative.a(Demangle.o)

It goes on with a bunch of similar errors. Notice I am not using cocoapods, so let me know if there's instructions for integrating the lib manually without cocoapods.

Example for logging from native side

Hey!

I have use-case where I would like to notify from a native side as well in both Android + IOS
Would be great to get a example in the docs how to do this, should one walk through the JS interface using the ReadableMap / JavaOnlyMap or is there an easier way to accomplish this.

Errors reported/displayed differently when sent from iOS and Android

Sending the same error on iOS and Android respectively produces two separate errors in the interface, but grouped per platform.

Report object sent with error seems to be the same on both platforms though.

Top one is iOS and bottom Android, the error message doesn't seem to be included in the header on Android.

image

Inconsistent setUser argument order.

We're using this library in our production app on both iOS and Android, and it works great. However, when we attach user info to our reports, the properties get scrambled between platforms. We set user info as:
Bugsnag.setUser(profile.id, profile.name, '');

When viewing our reports in the Bugsnag web interface, the user info is correct for iOS events. For Android, profile.name appears as "email", while "name" is empty. I believe this is because of the different order in this method declaration/call:

https://github.com/bugsnag/bugsnag-react-native/blob/master/android/src/main/java/com/bugsnag/BugsnagReactNative.java#L101
https://github.com/bugsnag/bugsnag-java/blob/f135429eec2ee3c90a9a32055cedacc2979558ec/src/main/java/com/bugsnag/Report.java#L230

Typescript type declarations

Typescript type declarations will make the package easier to integrate in Typescript projects.

I am currently using it with Typescript and I can contribute the typings. Interested in a PR?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.