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

Android: ConcurrentModificationException #12

Open
samzmann opened this issue Sep 9, 2022 · 1 comment
Open

Android: ConcurrentModificationException #12

samzmann opened this issue Sep 9, 2022 · 1 comment

Comments

@samzmann
Copy link

samzmann commented Sep 9, 2022

I am getting theses crash report from production. This seems to be happening when users try to log in, at which point we restart the app with react-native-restart.

The crash report is hinting at some issue in TreeLifecycleObserver.kt. I am not using Scandit at this point of the app flow (user is only in the login flow). Can you help me understand this?

java.util.ConcurrentModificationException: null
    at java.util.ArrayList$Itr.next(ArrayList.java:860)
    at com.scandit.datacapture.reactnative.core.b.b.b(TreeLifecycleObserver.kt:49)
    at com.scandit.datacapture.reactnative.core.ScanditDataCaptureCoreModule.dispose(ScanditDataCaptureCoreModule.kt:251)
    at com.scandit.datacapture.reactnative.core.ScanditDataCaptureCoreModule.onCatalystInstanceDestroy(ScanditDataCaptureCoreModule.kt:143)
    at com.facebook.react.bridge.BaseJavaModule.invalidate(BaseJavaModule.java:76)
    at com.facebook.react.bridge.ModuleHolder.destroy(ModuleHolder.java:110)
    at com.facebook.react.bridge.NativeModuleRegistry.notifyJSInstanceDestroy(NativeModuleRegistry.java:108)
    at com.facebook.react.bridge.CatalystInstanceImpl$1.run(CatalystInstanceImpl.java:368)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
    at java.lang.Thread.run(Thread.java:1012)

I am using:

"react-native": "0.67.3",
"react-native-restart": "^0.0.23",
"scandit-react-native-datacapture-barcode": "6.11.0",
"scandit-react-native-datacapture-core": "6.11.0",

These reports have come for Android 10, 11 and 12.

@ScanditSupport
Copy link
Collaborator

Hi @samzmann,

Please accept my apologies for the issues you are having, seems this issue is specific to react-native-restart.
Can you please reach out to us directly and share a few snippets of your code on how you implemented Scandit? Submit a request – Frequently Asked Questions (FAQ)

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