Skip to content

Phrase SDK crash webview on forms opening AlertDialog #60

@debase

Description

@debase

Context

We are using phrase SDK 3.5.0 in our project opening in app webviews containing <fieldset> html property which basically tries to open an alert dialog.

Observed behavior

When opening a in app webviews url containing <fieldset> property when clicking on it to select, the app crash with stack trace:

Process: com.example.phraseotacrashwebviews, PID: 32444
              android.content.res.Resources$NotFoundException: Resource ID #0x0
               at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:226)
               at android.content.res.Resources.loadXmlResourceParser(Resources.java:2504)
               at android.content.res.Resources.getLayout(Resources.java:1261)
               at androidx.appcompat.widget.ResourcesWrapper.getLayout(ResourcesWrapper.java:204)
               at android.view.LayoutInflater.inflate(LayoutInflater.java:536)
               at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:425)
               at android.widget.ArrayAdapter.getView(ArrayAdapter.java:416)
               at WV.rj0.getView(chromium-TrichromeWebViewGoogle6432.aab-stable-584516333:11)
               at android.widget.AbsListView.obtainView(AbsListView.java:2421)
               at android.widget.ListView.measureHeightOfChildren(ListView.java:1417)
               at android.widget.ListView.onMeasure(ListView.java:1323)
               at android.view.View.measure(View.java:26362)
               at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6981)
               at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
               at android.view.View.measure(View.java:26362)
               at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6981)
               at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
               at android.view.View.measure(View.java:26362)
               at com.android.internal.widget.AlertDialogLayout.tryOnMeasure(AlertDialogLayout.java:146)
               at com.android.internal.widget.AlertDialogLayout.onMeasure(AlertDialogLayout.java:71)
               at android.view.View.measure(View.java:26362)
               at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6981)
               at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
               at android.view.View.measure(View.java:26362)
               at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6981)
               at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
               at android.view.View.measure(View.java:26362)
               at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6981)
               at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
               at com.android.internal.policy.DecorView.onMeasure(DecorView.java:758)
               at android.view.View.measure(View.java:26362)
               at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:3916)
               at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:2609)
               at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2902)
               at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2354)
               at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9078)
               at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1346)
               at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1354)
               at android.view.Choreographer.doCallbacks(Choreographer.java:1005)
               at android.view.Choreographer.doFrame(Choreographer.java:936)
               at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1322)
               at android.os.Handler.handleCallback(Handler.java:942)
               at android.os.Handler.dispatchMessage(Handler.java:99)
               at android.os.Looper.loopOnce(Looper.java:227)
               at android.os.Looper.loop(Looper.java:327)
               at android.app.ActivityThread.main(ActivityThread.java:7995)
               at java.lang.reflect.Method.invoke(Native Method)
               at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
               at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:942)

Expected behavior

App should not crash on selection and should open the alert dialog

Step to reproduce

Sample project here which just open url "https://eu.claims.axa.travel/claim_form/form" in a webview
Just clicking on "country of residence" form field make the app crash.
Commenting override fun getDelegate(): AppCompatDelegatesolve the issue.

Metadata

Metadata

Assignees

Labels

acceptedbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions