Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Crash when try to "launch google password (import flow)" #5499

Closed
Kobayashi-996 opened this issue Jan 21, 2025 · 4 comments · Fixed by #5527
Closed

[Bug] Crash when try to "launch google password (import flow)" #5499

Kobayashi-996 opened this issue Jan 21, 2025 · 4 comments · Fixed by #5527

Comments

@Kobayashi-996
Copy link

Describe the bug

I tried to use the feature and the app crash.

FATAL EXCEPTION: main
Process: com.duckduckgo.mobile.android.debug, PID: 21262
java.lang.UnsupportedOperationException: This method is not supported by the current version of the framework and the current WebView APK
at androidx.webkit.internal.WebViewFeatureInternal.getUnsupportedOperationException(WebViewFeatureInternal.java:689)
at androidx.webkit.WebViewCompat.addWebMessageListener(WebViewCompat.java:746)
at com.duckduckgo.autofill.impl.importing.blob.ImportGooglePasswordBlobConsumer$configureWebViewForBlobDownload$2.invokeSuspend(ImportGooglePasswordBlobConsumer.kt:66)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:266)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:99)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

How to Reproduce

  1. Open the app
  2. More Options
  3. Settings
  4. Autofill Dev Settings
  5. Launch Google Passwords (import flow)

Then the app crash

Screen_recording_20250121_154256.online-video-cutter.com.mp4

Expected behavior

Normal functioning

Environment

- DDG App Version: 5.224.0
- Device: Pixel 2
- OS: Android 9.0
Copy link
Contributor

Thank you for opening an Issue in our Repository.
The issue has been forwarded to the team and we'll follow up as soon as we have time to investigate.
As stated in our Contribution Guidelines, requests for feedback should be addressed via the Feedback section in the Android app.

@CDRussell
Copy link
Member

Thanks for flagging.

In this particular case, it is the System WebView installed on your device that is lacking the feature to support calling addWebMessageListener; this usually happens when your WebView is old and is in need of an update.

  • this is why you won’t see the option to import your passwords from Google inside the password management screen (we detect it’s not compatible on your device and hide the button)
  • The Internal Features section you’re using here isn’t available to normal users. It’s a set of options for developers to help test various parts of the app as we build them, and is only visible when the app has been built with the internal build variant. As such, it doesn’t always have the same safeguards that are applied elsewhere in the app.

So if you’re looking for way around this on your device, see if you can update the system WebView as that’s the only real fix in this scenario. I will also add the compatibility checks to that developer setting screen to prevent the feature from launching in that scenario even in the developer menu.

@CDRussell
Copy link
Member

Internal issue tracker: https://app.asana.com/0/414730916066338/1209200821186635/f

@Kobayashi-996
Copy link
Author

Got it! Thank you very much for your detailed advice!

CDRussell added a commit that referenced this issue Jan 24, 2025
…5527)

Task/Issue URL:
https://app.asana.com/0/488551667048375/1209200821186635/f

### Description

### Steps to test this PR
QA optional but if you want to….

- [ ] Install `internal` build on a device/emulator with old `WebView`
- [ ] Access `Settings->Autofill Dev Settings`
- [ ] Tap on `Launch Google Passwords (import flow)`
- [ ] Verify you see a toast saying `WebView` isn’t compatible
- [ ] Repeat this on a device/emulator with a compatible, modern
`WebView` and ensure the flow can be launched


Fixes #5499

Co-authored-by: Craig Russell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants