uxcam / react-native-ux-cam

54 stars 10 forks source link

Unhandled SoftException com.uxcam.screenshot.helper.ScreenShotHelperImpl.takeScreenshotAndEncode #111

Closed Jad-Jbara closed 1 year ago

Jad-Jbara commented 1 year ago

Device type: Android 13

SDK version: "react-native-ux-cam": "^5.4.11",

While the app is running, I ran adb logcat to find the logs being bombarded with this exception. Also I noticed a lot of random crashes not sure if it is due to UXCam, but I have yet to get the logs for them. Will update the issue if the crashes are a result of these errors.

Expand to see logs ``` 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: Unhandled SoftException 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: com.facebook.react.bridge.AssertionException: Expected to run on UI thread! 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.facebook.react.bridge.SoftAssertions.assertCondition(SoftAssertions.java:37) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.facebook.react.bridge.UiThreadUtil.assertOnUiThread(UiThreadUtil.java:32) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.facebook.react.views.view.ReactViewGroup.getChildDrawingOrder(ReactViewGroup.java:549) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.getAndVerifyPreorderedIndex(ViewGroup.java:2110) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4501) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:809) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.View.draw(View.java:24409) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.View.draw(View.java:24278) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.drawChild(ViewGroup.java:4748) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.facebook.react.views.view.ReactViewGroup.drawChild(ReactViewGroup.java:836) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4505) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:809) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.View.draw(View.java:24276) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.drawChild(ViewGroup.java:4748) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.facebook.react.views.view.ReactViewGroup.drawChild(ReactViewGroup.java:836) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4505) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:809) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.View.draw(View.java:24276) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.drawChild(ViewGroup.java:4748) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.facebook.react.views.view.ReactViewGroup.drawChild(ReactViewGroup.java:836) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4505) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:809) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.View.draw(View.java:24409) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.View.draw(View.java:24278) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.drawChild(ViewGroup.java:4748) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.facebook.react.views.view.ReactViewGroup.drawChild(ReactViewGroup.java:836) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4505) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:809) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.View.draw(View.java:24276) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.drawChild(ViewGroup.java:4748) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4505) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.facebook.react.ReactRootView.dispatchDraw(ReactRootView.java:294) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.View.draw(View.java:24276) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.drawChild(ViewGroup.java:4748) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4505) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.View.draw(View.java:24276) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.drawChild(ViewGroup.java:4748) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4505) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.View.draw(View.java:24276) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.drawChild(ViewGroup.java:4748) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4505) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.View.draw(View.java:24276) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.drawChild(ViewGroup.java:4748) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4505) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.View.draw(View.java:24276) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.drawChild(ViewGroup.java:4748) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4505) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.android.internal.policy.DecorView.dispatchDraw(DecorView.java:1544) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at android.view.View.draw(View.java:24409) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.android.internal.policy.DecorView.draw(DecorView.java:1517) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.uxcam.screenshot.legacyscreenshot.LegacyScreenshotImpl.a(SourceFile:17) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.uxcam.screenshot.screenshotTaker.ScreenshotTakerImpl.a(SourceFile:186) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.uxcam.screenshot.screenshotTaker.ScreenshotTakerImpl.a(SourceFile:17) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.uxcam.screenshot.screenshotTaker.ScreenshotTakerImpl.b(SourceFile:13) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.uxcam.screenshot.screenshotTaker.ScreenshotTakerImpl.a(SourceFile:131) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.uxcam.screenshot.screenshotTaker.ScreenshotTakerImpl.a(SourceFile:80) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.uxcam.screenshot.helper.ScreenShotHelperImpl.a(SourceFile:28) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.uxcam.screenshot.helper.ScreenShotHelperImpl.takeScreenshotAndEncode(SourceFile:2) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.uxcam.internals.gl$ac.a(SourceFile:86) 10-12 12:28:59.968 26131 26356 E unknown:SoftAssertions: at com.uxcam.internals.gl$ac.run(SourceFile:13) ```
DFDIEGOH commented 1 year ago

Hi @Jad-Jbara - Would it be possible to upgrade to the latest version of the RN SDK 5.4.12 and check if you are getting the same logs in your console?

Jad-Jbara commented 1 year ago

Hello @DFDIEGOH, I will try to test it next week, and I will update this thread as soon as a do. Been super busy with deadlines this week.

Jad-Jbara commented 1 year ago

@DFDIEGOH Confirmed, latest version 5.4.12 handles this issue. No more logs shown. Closing the issue 👍🏿