Open debase opened 12 months ago
@debase thank you for even preparing a sample project. That's really helpful and I've prepared a task to resolve this. I'll keep you posted here
Hi @debase, this should be resolved in version https://github.com/phrase/phrase-android/releases/tag/3.7.1. Could you try it with the latest release?
For me the issue still happens in 3.7.3
android.content.res.Resources$NotFoundException: Resource ID #0x0 at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:265) at android.content.res.MiuiResourcesImpl.getValue(MiuiResourcesImpl.java:96) at android.content.res.Resources.loadXmlResourceParser(Resources.java:2607) at android.content.res.Resources.getLayout(Resources.java:1314) at androidx.appcompat.widget.ResourcesWrapper.getLayout(ResourcesWrapper.java:204) at android.view.LayoutInflater.inflate(LayoutInflater.java:537) at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:425) at android.widget.ArrayAdapter.getView(ArrayAdapter.java:416) at WV.DM.getView(chromium-TrichromeWebViewGoogle6432.aab-stable-604506633:11) at android.widget.AbsListView.obtainView(AbsListView.java:2424) at android.widget.ListView.measureHeightOfChildren(ListView.java:1417) at android.widget.ListView.onMeasure(ListView.java:1323) at android.view.View.measure(View.java:26640) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7060) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:26640) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7060) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:26640) 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:26640) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7060) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:26640) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7060) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:26640) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7060) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at com.android.internal.policy.DecorView.onMeasure(DecorView.java:835) at android.view.View.measure(View.java:26640) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:4145) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:2810) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3116) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2546) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9498) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1459) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1467) at android.view.Choreographer.doCallbacks(Choreographer.java:1089) at android.view.Choreographer.doFrame(Choreographer.java:1003) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1435) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:211) at android.os.Looper.loop(Looper.java:300) at android.app.ActivityThread.main(ActivityThread.java:8395) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)
Hi. I also experience this issue in 3.7.3.
Hi @Valentin-Buculei and @valeriiia, thanks for the report. Does this issue occur for you when opening the alert dialog as well or a different action inside a webview?
Hi. For me it occurs when one tries to pick a date and time on the webview. When the date/time dialog appears the app crashes. Once we've disabled the Phrase this crash disappear
Cheers, Valeriia
On Tue, Dec 19, 2023, 9:16 AM theSoenke @.***> wrote:
Hi @Valentin-Buculei https://github.com/Valentin-Buculei and @valeriiia https://github.com/valeriiia, thanks for the report. Does this issue occur for you when opening the alert dialog as well or a different action inside a webview?
— Reply to this email directly, view it on GitHub https://github.com/phrase/phrase-android/issues/60#issuecomment-1862306786, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUGZGGJ4SD4UKF3QSDS3ZW3YKFEPXAVCNFSM6AAAAAA4T2HJDOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRSGMYDMNZYGY . You are receiving this because you were mentioned.Message ID: @.***>
Hi @Valentin-Buculei and @valeriiia, thanks for the report. Does this issue occur for you when opening the alert dialog as well or a different action inside a webview?
yes, when it opens a dialog (after clicking on a <select>
element)
Hello. Are there any updates on this issue or any workarounds? Thanks
Hey @valeriiia, unfortunately I don't have an update yet. There are 1-2 things we'll have to resolve before in the SDK and then this will be next priority to resolve.
Hello. Are there any updates on this issue or any workarounds? Thanks
A workaround would be to open the dialog from a new, translucent activity that does not call Phrase.getDelegate()
Hello @theSoenke and @Valentin-Buculei
We encountered the same issue on our application with your latest SDK v3.9.0.
Is a fix coming soon?
Thanks.
We are also affected by the same issue, crashes started spiking recently without any reason.
The only fix seems to be to not call Phrase.getDelegate()
on the activity. It is not reproducible on every device and depends on the webview version
When a fix can be expected ?
The latest release 3.10.0, includes fixes for crashes experienced in Webview when opening alert dialogs.
The 3.10.1 release solved the problem indeed. However, I see the following information about the next 3.10.2 release " Bugfixes: Reverts changes introduced in release 3.10.1 which can potentially lead to app crashing. " Does it mean that fix for crashes experienced in Webview are back again? Could you please clarify it?
Hi @valeriiia actually the after 3.10.0
there were still some reports of this issue appearing in Xiaomi devices. A potential fix was made in 3.10.1
which caused some regression. Hence, we have just reverted the fix made in 3.10.1
, fixes that were shipped in 3.10.0
should still work.
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:
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(): AppCompatDelegate
solve the issue.