Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

App crashes in debug mode after a reload of the app #38

Closed
shercoder opened this issue Jan 31, 2020 · 2 comments
Closed

App crashes in debug mode after a reload of the app #38

shercoder opened this issue Jan 31, 2020 · 2 comments

Comments

@shercoder
Copy link
Contributor

Is this a support request?
No

Describe the bug
Since LaunchDarklyReactNativeClient.swift inherits from RCTEventEmitter and somehow LD is synthesizing the bridge property somewhere that I can't find. On reload, this property is nil, hence causes the crash when it attempts to sendEvent while trying to register a listener

To reproduce

  1. Write code to register a listener in one of your screens that is launched as one of the first screens after opening the app.
  2. Build and run the app (The app should run fine)
  3. Open RN Developer Menu by shaking the device and hit Reload or CMD+R
  4. Result: app crash

Expected behavior
The app should not crash on reload. It should successfully register the listener once it has the bridge.

Logs
Don't have any.

SDK version
2.2.0

Language version, developer tools
Xcode 10.2.1
ReactNative: 0.59.10

OS/platform
iOS only

Additional context
N/A

@torchhound
Copy link
Contributor

Thanks @shercoder for reporting this issue and creating a PR. We will test and evaluate.

@shercoder
Copy link
Contributor Author

Fixed in #39

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants