Is this a bug report?
Yes
Have you read the Contributing Guidelines?
No
Environment
react-native: 0.46.2
react: 16.0.0-alpha.12
I got this crash report from Fabric.io but I dont know where and when it happened.
Fatal Exception: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6398)
at android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:905)
at android.view.ViewGroup.invalidateChild(ViewGroup.java:4340)
at android.view.View.invalidate(View.java:10968)
at android.view.View.invalidate(View.java:10923)
at android.widget.TextView.updateAfterEdit(TextView.java:7558)
at android.widget.Editor.finishBatchEdit(Editor.java:1121)
at android.widget.Editor.endBatchEdit(Editor.java:1103)
at android.widget.TextView.endBatchEdit(TextView.java:5980)
at com.android.internal.widget.EditableInputConnection.endBatchEdit(EditableInputConnection.java:77)
at android.view.inputmethod.BaseInputConnection.finishComposingText(BaseInputConnection.java:283)
at android.view.inputmethod.InputMethodManager.checkFocusNoStartInput(InputMethodManager.java:1330)
at android.view.inputmethod.InputMethodManager.onWindowFocus(InputMethodManager.java:1374)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3253)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(Unknown Source)
at java.lang.Thread.run(Thread.java:841)
I have just seen this while reloading my android app.
@edo1493 Do you know how to solve it? has your android APP is crash yet?
Hey, same issue here.
I am having this issue being reported a lot on my crash reports... I am not sure if its relevant but after trying on a few devices i am notice it becoming very common among the lower end devices like android 4.4.2.
Can confirm!
how to solve this issue?
In my case, the problem was with the perf monitor.
If the perf monitor was running as the app reloaded, then I would get the error.
My work around it simply turn off the perf monitor before the app reloads and then turn it on again.
Hope it helps.
I find this bug appears in the released version,the wrong information provided by firebase doesn't help me solve this problem
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.
@3210jr Thanks for this, my problem was with the perf monitor too.
I also saw the same issue on my crash reports, and it appears in the released version. But I didn't reproduce this issue. I should refer to the solution of @3210jr . May be a crash report issue causing the released version to collect debug errors...
Same issue, there are more than a hundred crash reports on my released version.
android.view.CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6593)
at android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:966)
at android.view.ViewGroup.invalidateChild(ViewGroup.java:5082)
at android.view.View.invalidateInternal(View.java:12730)
at android.view.View.invalidate(View.java:12694)
at android.view.View.invalidate(View.java:12678)
at android.widget.TextView.updateAfterEdit(TextView.java:8023)
at android.widget.Editor.finishBatchEdit(Editor.java:1277)
at android.widget.Editor.endBatchEdit(Editor.java:1259)
at android.widget.TextView.endBatchEdit(TextView.java:6452)
at com.android.internal.widget.EditableInputConnection.endBatchEdit(EditableInputConnection.java:78)
at android.view.inputmethod.BaseInputConnection.finishComposingText(BaseInputConnection.java:275)
at android.view.inputmethod.InputMethodManager.reportFinishInputConnection(InputMethodManager.java:858)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3471)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:818)
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
Most helpful comment
In my case, the problem was with the perf monitor.
If the perf monitor was running as the app reloaded, then I would get the error.
My work around it simply turn off the perf monitor before the app reloads and then turn it on again.
Hope it helps.