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

App crashes on Android devices if holding (changing) volume during start up #39

Closed
shadowcatx opened this issue Jun 5, 2018 · 3 comments

Comments

@shadowcatx
Copy link

shadowcatx commented Jun 5, 2018

Hi Ninty,

Thanks for creating this library!
A bug report (and a potential fix):

Issue description

RNSS will cause crashes on Android devices if the volume is changed during app startup.

Steps to reproduce the issue

  1. Holding on volume up/down
  2. Start the app
    Tested on: Huawei Y6, Samsung J5, Samsung Galaxy S9, Samsung Galaxy Note 9

What's the expected result?

  • App launches

What's the actual result?

  • App crashes

Error log

Caused by java.lang.RuntimeException
Tried to access a JS module before the React instance was fully set up. Calls to ReactContext#getJSModule should only happen once initialize() has been called on your native module.

The issue happens because users are able to interact with volumes before react is fully set up. That would cause a runtime exception.
I've created a PR with an empty try-catch to address this issue.

Regards,
Samuel

@c19354837
Copy link
Owner

Thanks for your PR!

I'll test it asap.

@shadowcatx
Copy link
Author

Thank you Ninty!

@c19354837
Copy link
Owner

V1.4.5 has been published!

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

No branches or pull requests

2 participants