Skip to content
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

feat: report startup crashes on android #1012

Merged

Conversation

abdelhamid-f-nasser
Copy link
Contributor

@abdelhamid-f-nasser abdelhamid-f-nasser commented Aug 22, 2023

Description of the change

  • Add native-side init API which can be used to catch and report startup crashes on android.
  • Refactor the react-native init to reuse the native-side#init method
  • Cover code with tests

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related issues

MOB-12628, MOB-12689, MOB-12690

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests

Code review

  • This pull request has a descriptive title and information useful to a reviewer
  • Issue from task tracker has a link to this pull request

@InstabugCI
Copy link
Collaborator

InstabugCI commented Aug 22, 2023

Coverage Report

Label Coverage Status
JavaScript 96.5%
Android 49.6%
iOS 38.9%

Generated by 🚫 dangerJS against 6ac69d2

@abdelhamid-f-nasser abdelhamid-f-nasser force-pushed the feat/MOB-12628-cp-rn-report-startup-crashes-on-android branch from a8da51a to 5df8857 Compare August 23, 2023 10:19
abdelhamid-f-nasser added a commit that referenced this pull request Aug 23, 2023
Add changelog entry under the "Added" section for PR #1012

Jira ID: MOB-12628, MOB-12689, MOB-12690
@abdelhamid-f-nasser abdelhamid-f-nasser force-pushed the feat/MOB-12628-cp-rn-report-startup-crashes-on-android branch from 5df8857 to eefee21 Compare August 23, 2023 14:25
@abdelhamid-f-nasser abdelhamid-f-nasser marked this pull request as ready for review August 23, 2023 14:59
@abdelhamid-f-nasser abdelhamid-f-nasser changed the title feat: cp rn report startup crashes on android feat: report startup crashes on android Aug 23, 2023
Copy link
Contributor

@a7medev a7medev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great effort @abdelhamid-f-nasser! 👏🏼 Please check the review comments. 🙏🏼

Introduce a native-side SDK init API. This offers an alternative to standard react-native init API. It servers to catch startup crashes that might otherwise slip. This is due a gap between the native app launch and the initialization of the react-native SDK. During that time span, any crashes that occur aren't reported.

Jira ID: MOB-12628, MOB-12689, MOB-12690
Optimizes the React Native SDK initialization, reusing the native init method eliminating duplicate code.

Jira ID: MOB-12628, MOB-12689, MOB-12690
Bump up mockito-inline from 3.4.0 to 3.12.1

Jira ID: MOB-12628, MOB-12689, MOB-12690
Add changelog entry under the "Added" section for PR #1012

Jira ID: MOB-12628, MOB-12689, MOB-12690
Add tests fpr `RNInstabug` native `init` API, `setCurrentPlatform` and `setDeprecationBaseUrl`.

Jira ID: MOB-12628, MOB-12689, MOB-12690
InvocationEvents wasn't passed from react-native init to native init method

Jira ID: MOB-12628, MOB-12689, MOB-12690
This was failing tests as the mock wasn't closed and was redundant for this tests anyhow.
- Added a new test for overloaded init
- Renamed the testInit testInitWithLogLevel
@abdelhamid-f-nasser abdelhamid-f-nasser force-pushed the feat/MOB-12628-cp-rn-report-startup-crashes-on-android branch from 5c0340b to bb6e604 Compare August 24, 2023 14:02
@abdelhamid-f-nasser abdelhamid-f-nasser merged commit e1c1063 into dev Aug 24, 2023
@abdelhamid-f-nasser abdelhamid-f-nasser deleted the feat/MOB-12628-cp-rn-report-startup-crashes-on-android branch August 24, 2023 14:56
HeshamMegid pushed a commit that referenced this pull request Sep 17, 2023
Jira ID: MOB-12628, MOB-12689, MOB-12690
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants