Code Monkey home page Code Monkey logo

react-native-firebase-crash-report's People

Contributors

ianlin avatar zxcpoiu 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

Watchers

 avatar  avatar

react-native-firebase-crash-report's Issues

Bitcode bundle could not be generated in Release

Hi,

I have installed the package as it's mentioned in README and although I made it work for Android, I keep trying it for iOS. After I do pod install and build&execute a Debug version everything seem to be ok but when I try to build a Release (or Archive) my project I get the following error:

bitcode bundle could not be generated because '/Users/xxx/Library/Developer/Xcode/DerivedData/ProjectName-xxx/Build/Products/Release-iphoneos/libRNFirebaseCrashReport.a(RNFirebaseCrashReport.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture armv7

I have followed this tutorial: https://medium.com/@heitorburger/static-libraries-frameworks-and-bitcode-6d8f784478a9#.pqgvekd41. I enabled bitcode and I set Other C flags in Debug to -fembed-bitcode-marker, and Release to -fembed-bitcode

Have someone had this issue before?

ld: library not found for -lGoogleToolboxForMac

ld: warning: directory not found for option '-L/Users/butuzgol/Library/Developer/Xcode/DerivedData/game-gotkymwjmpspvncuflounjcjojut/Build/Products/Release-iphoneos/GoogleToolboxForMac'
ld: warning: directory not found for option '-L/Users/butuzgol/Library/Developer/Xcode/DerivedData/game-gotkymwjmpspvncuflounjcjojut/Build/Products/Release-iphoneos/Protobuf'
ld: warning: directory not found for option '-L/Users/butuzgol/Library/Developer/Xcode/DerivedData/game-gotkymwjmpspvncuflounjcjojut/Build/Products/Release-iphoneos/nanopb'
ld: library not found for -lGoogleToolboxForMac
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Assertion failed: (NO), function -[RNFirebaseCrashReport report:]

This is my first time integrating Firebase Crash so I hope someone can help me. My XCode stops running because of the following error:

2017-02-13 11:44:27.880900 rooplayNativeMock3[7547:1469600] Testing Firebase crash reporting....
Assertion failed: (NO), function -[RNFirebaseCrashReport report:], file /Users/annelorraineuy/projects/rooplayNativeMock3/node_modules/react-native-firebase-crash-report/ios/RNFirebaseCrashReport/RNFirebaseCrashReport.m, line 37.
warning: could not load any Objective-C class information. This will significantly reduce the quality of type information available.
(lldb) 

I am testing out this package by putting it into my app init saga. Like this:

import FirebaseCrash from 'react-native-firebase-crash-report';

export function* initApp(clientAuth, clientApi) {
      ...
      FirebaseCrash.logcat('Testing Firebase crash reporting....');
      FirebaseCrash.report('Please receive this on the console.'); // <- this line triggers it
      ...
}

What is this line assert(NO) here under report for? https://github.com/ianlin/react-native-firebase-crash-report/blob/master/ios/RNFirebaseCrashReport/RNFirebaseCrashReport.m#L37

Android config lacks manual instructions

I am not sure why react-native link did not automatically add this part for me. I've got this package working in tandem with react-native-firebase-analytics, so thanks for this!

Anyway, just sharing in case someone else runs into the error where FirebaseCrash is undefined on android, and looking to use both analytics and crash reporting together. Basically manual install instructions:

app/build.gradle

dependencies {
  ...
  compile project(':react-native-firebase-analytics')
  compile project(':react-native-firebase-crash-report') <-- add this
  ...
}

settings.gradle

include ':react-native-firebase-analytics'
project(':react-native-firebase-analytics').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase-analytics/android')

// add everything below this
include ':react-native-firebase-crash-report'
project(':react-native-firebase-crash-report').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase-crash-report/android')

MainApplication.java

...
import com.ianlin.RNFirebaseCrashReport.RNFirebaseCrashReportPackage; <-- add this
...

@Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
            new FIRAnalyticsPackage(),
            ...
            new RNFirebaseCrashReportPackage(), <-- add this
            ...
      );
 }

report() on iOS crash

In RNFirebaseCrashReport.m

RCT_EXPORT_METHOD(report:(NSString *)message)
{
FIRCrashLog(message);
assert(NO); // ===> Crash.
}

Is it intented?

how can i see logs?

i use these commands for making a log but i don't see it in firebase crash reporting panel, but if i use report method instead of log method i see it in that panel

import firebaseReort from 'react-native-firebase-crash-report';
firebaseReort.log('test')

How do i get it to send a report for Firebase Console?

Nice module, but how do i get it to send a fake crash to the Firebase Console?

since none of these seems to do the job

FirebaseCrash.report('A weird thing just happened...');
FirebaseCrash.log('ERROR #39');
FirebaseCrash.logcat('ERROR #40');
FirebaseCrash.logcat('ERROR #41', '2', 'MyTag');

Log unhandled exceptions

Hello, just want to confirm if this tool handles unhandled exceptions automatically?

I tried a simple:

throw new Error('Something happened')

but it was not logged in our Firebase console. Did I miss something or is this a limitation of the said library? Thanks!

Android installation fails.

After npm install && rnpm link and putting the dependencies inside the root level build.gradle and to the bottom of the app level build.gradle, I am getting this error:

:app:compileDebugJavaWithJavac
C:\medicall\android\app\src\main\java\co\my\package\MainActivity.java:6: error: package com
.ianlin.RNFirebaseCrashReport does not exist
import com.ianlin.RNFirebaseCrashReport.RNFirebaseCrashReportPackage;
                                       ^
1 error
:app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

I even tried inserting it inside the settings.gradle, but did not help neither.

React-Native : 0.40.0,
react-native-firebase-crash-report: 1.2.0,
latest google repository and play services in the android studio

Any ideas on this issue?
Thanks in advance.

Feature: Capture console.log instead of using separate log function

Hi, I think it would be nicer if all console.log calls are automatically logged for crash reporting (instead of having to call FirebaseCrash.log).

Like this (Objective-C example):

  //Add the following lines
  RCTSetLogThreshold(RCTLogLevelInfo);
  RCTSetLogFunction(FIRReactLogFunction);
RCTLogFunction FIRReactLogFunction = ^(
                                               RCTLogLevel level,
                                               __unused RCTLogSource source,
                                               NSString *fileName,
                                               NSNumber *lineNumber,
                                               NSString *message
                                               )
{
  NSString *log = RCTFormatLog([NSDate date], level, fileName, lineNumber, message);

#ifdef DEBUG
  fprintf(stderr, "%s\n", log.UTF8String);
  fflush(stderr);
#else
  FIRCrashLog(log);
#endif

  int aslLevel;
  switch(level) {
    case RCTLogLevelTrace:
      aslLevel = ASL_LEVEL_DEBUG;
      break;
    case RCTLogLevelInfo:
      aslLevel = ASL_LEVEL_NOTICE;
      break;
    case RCTLogLevelWarning:
      aslLevel = ASL_LEVEL_WARNING;
      break;
    case RCTLogLevelError:
      aslLevel = ASL_LEVEL_ERR;
      break;
    case RCTLogLevelFatal:
      aslLevel = ASL_LEVEL_CRIT;
      break;
  }
  asl_log(NULL, NULL, aslLevel, "%s", message.UTF8String);
};

It is described in more detail here:
https://medium.com/delivery-com-engineering/add-crashlytics-to-your-react-native-ios-app-69a983a9062a#.rg68fvfs7

Getting Multiple dex files define Error

Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/common/api/zzf;
    UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/common/api/zzf;```

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.