prebid / prebid-mobile-android

Prebid Mobile SDK for Android applications
Apache License 2.0
57 stars 82 forks source link

Crash for MRAID ads #735

Closed YuriyVelichkoPI closed 8 months ago

YuriyVelichkoPI commented 8 months ago

Describe the bug The bug was reported in the Slack channel:

I just noticed that the JavaScriptInterface method getCurrentPosition inhence the UI related method View.getGlobalVisibleRect is called in JavaBridge thread, which is a background thread. And this causes a lot of native crashes in our app.

https://github.com/prebid/prebid-mobile-android/blob/master/PrebidMobile/PrebidMobile-core/src/main/java/org/prebid/mobile/rendering/views/webview/mraid/BaseJSInterface.java#L175

To Reproduce

No steps. Prod crash.

Expected behavior

No crash.

Screenshots

image

image

Smartphone (please complete the following information):