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

When i tap R on metro after reload it shows the error Exception in native call from js #5225

Closed
osramesh06 opened this issue Apr 28, 2021 · 6 comments · Fixed by #5230
Closed
Assignees
Labels
type: bug New bug report

Comments

@osramesh06
Copy link

Screenshot_20210428_112159 1

@osramesh06 osramesh06 added help: needs-triage Issue needs additional investigation/triaging. type: bug New bug report labels Apr 28, 2021
@efstathiosntonas
Copy link
Contributor

efstathiosntonas commented Apr 28, 2021

same here, out of the sudden, version 11.3.3, rn 0.63.4

logcat:

E/unknown:ReactNative: Tried to remove non-existent frame callback
2021-04-28 12:46:07.742 15167-15494/com.xxx E/unknown:ReactNative: CatalystInstanceImpl caught native exception
    java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextNode(HashMap.java:1441)
        at java.util.HashMap$KeyIterator.next(HashMap.java:1465)
        at io.invertase.firebase.common.TaskExecutorService.shutdown(TaskExecutorService.java:104)
        at io.invertase.firebase.common.ReactNativeFirebaseModule.onCatalystInstanceDestroy(ReactNativeFirebaseModule.java:92)
        at com.facebook.react.bridge.ModuleHolder.destroy(ModuleHolder.java:110)
        at com.facebook.react.bridge.NativeModuleRegistry.notifyJSInstanceDestroy(NativeModuleRegistry.java:85)
        at com.facebook.react.bridge.CatalystInstanceImpl$1.run(CatalystInstanceImpl.java:362)
        at android.os.Handler.handleCallback(Handler.java:914)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loop(Looper.java:225)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
        at java.lang.Thread.run(Thread.java:919)
2021-04-28 12:46:07.742 15167-15494/com.xxxx E/unknown:ReactNative: Exception in native call
    java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextNode(HashMap.java:1441)
        at java.util.HashMap$KeyIterator.next(HashMap.java:1465)
        at io.invertase.firebase.common.TaskExecutorService.shutdown(TaskExecutorService.java:104)
        at io.invertase.firebase.common.ReactNativeFirebaseModule.onCatalystInstanceDestroy(ReactNativeFirebaseModule.java:92)
        at com.facebook.react.bridge.ModuleHolder.destroy(ModuleHolder.java:110)
        at com.facebook.react.bridge.NativeModuleRegistry.notifyJSInstanceDestroy(NativeModuleRegistry.java:85)
        at com.facebook.react.bridge.CatalystInstanceImpl$1.run(CatalystInstanceImpl.java:362)
        at android.os.Handler.handleCallback(Handler.java:914)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loop(Looper.java:225)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
        at java.lang.Thread.run(Thread.java:919)

if it matters, killing the app fixes it. When i tap R on metro after reload it shows the error, that's the only way to raise it.

@osramesh06 please update the issue and follow the issue template otherwise this issue will be closed

@osramesh06 osramesh06 changed the title Getting Error Exception in native call from js When i tap R on metro after reload it shows the error Exception in native call from js Apr 28, 2021
@mikehardy
Copy link
Collaborator

Well, a stack trace from logcat with the version gets bonus points, that helps us actually locate the issue. v11.3.x has a new high-performance task core that allows parallel execution but, it's new, and things that are hard to test (like hot reloads) are edge cases I'd expect to see some bugs in. ConcurrentModificationException issues are typically easy to fix though, let me see

@mikehardy mikehardy added Type: In Progress Workflow: Needs Review Pending feedback or review from a maintainer. labels Apr 28, 2021
@mikehardy mikehardy self-assigned this Apr 28, 2021
@mikehardy
Copy link
Collaborator

Reproduced locally, fixing

mikehardy added a commit that referenced this issue Apr 28, 2021
Access to the collection of TaskExecutors wasn't correctly synchronized
in all places

Fixes #5225
mikehardy added a commit that referenced this issue Apr 28, 2021
This correctly identifies that #5225 can happen, where previously
it passed CI with no problem. Tested by applying / removing the fix
for 5225 and now CI will fail if a redbox ever happens again
@mikehardy
Copy link
Collaborator

next release will have it, just pending CI and I'll release a fix for this one

In the meantime you may get moving locally if you grab the patch-package patch set from the artifacts list on this CI action https://github.com/invertase/react-native-firebase/actions/runs/794045768#artifacts

@mikehardy mikehardy added Resolution: Solution Provided and removed help: needs-triage Issue needs additional investigation/triaging. Type: In Progress Workflow: Needs Review Pending feedback or review from a maintainer. labels Apr 28, 2021
mikehardy added a commit that referenced this issue Apr 28, 2021
This correctly identifies that #5225 can happen, where previously
it passed CI with no problem. Tested by applying / removing the fix
for 5225 and now CI will fail if a redbox ever happens again
@efstathiosntonas
Copy link
Contributor

@mikehardy it works as a charm now, thanks for your hard work!

mikehardy added a commit that referenced this issue Apr 29, 2021
This correctly identifies that #5225 can happen, where previously
it passed CI with no problem. Tested by applying / removing the fix
for 5225 and now CI will fail if a redbox ever happens again
mikehardy added a commit that referenced this issue Apr 29, 2021
Access to the collection of TaskExecutors wasn't correctly synchronized
in all places

Fixes #5225
@mikehardy
Copy link
Collaborator

Release 11.4.1 just went out with the change related to this among other fixes + features. Enjoy! 🚀

androidIsForVivek pushed a commit to androidIsForVivek/react-native-firebase that referenced this issue Aug 9, 2021
Access to the collection of TaskExecutors wasn't correctly synchronized
in all places

Fixes invertase#5225
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug New bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants