Wootric / WootricSDK-Android

Android SDK for Wootric Survey Platform supporting NPS, CSAT and CES surveys
https://wootric.com
MIT License
15 stars 16 forks source link

Crash Wootric.java line 547 #101

Closed joelpereda closed 3 years ago

joelpereda commented 3 years ago

Hi guys, we have a crash with @wootric/react-native-wootric v1.4.0. We appreciate if you can help us with this crash! Thanks

The crash is the follow: 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:8370) at android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:1474) at android.view.View.requestLayout(View.java:24793) at android.view.View.setLayoutParams(View.java:17372) at android.view.WindowManagerGlobal.updateViewLayout(WindowManagerGlobal.java:436) at android.view.WindowManagerImpl.updateViewLayout(WindowManagerImpl.java:103) at android.app.Activity.onWindowAttributesChanged(Activity.java:3869) at androidx.appcompat.view.WindowCallbackWrapper.onWindowAttributesChanged(WindowCallbackWrapper.java:114) at android.view.Window.dispatchWindowAttributesChanged(Window.java:1172) at com.android.internal.policy.PhoneWindow.dispatchWindowAttributesChanged(PhoneWindow.java:3065) at android.view.Window.setSoftInputMode(Window.java:1070) at com.wootric.androidsdk.Wootric.<init>(Wootric.java:547) at com.wootric.androidsdk.Wootric.init(Wootric.java:105) at com.reactlibrary.RNWootricModule.configureWithClientID(RNWootricModule.java:57) at java.lang.reflect.Method.invoke(Method.java) at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372) at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:151) at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java) at android.os.Handler.handleCallback(Handler.java:883) 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:224) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226) at java.lang.Thread.run(Thread.java:919)

diegoserranoa commented 3 years ago

Hi @joelpereda, sorry for the long wait and thanks for reporting this. I will try to check this during the next week. I also have to check on other bugs so please be patient 🙏

Thanks!

diegoserranoa commented 3 years ago

Hi @joelpereda sorry for the long wait. Last week we merged the fix for this. Hope this helps. Closing this issue now. If something shows up, please comment again.

Thanks for the patience!

https://github.com/Wootric/react-native-wootric/commit/912bdf3107f7dd9f446dd4c33bfc2b43e82a05ac