mollyim / mollyim-android

Enhanced and security-focused fork of Signal.
GNU Affero General Public License v3.0
1.37k stars 77 forks source link

Redirect WebView CAPTCHA to device's browser #303

Open shuvashish76 opened 3 months ago

shuvashish76 commented 3 months ago

Is there an existing issue for this?

Bug description

I've disabled my system WebView as the updated version takes huge amount of space (while older versions are not safe for security) of low end device. I assume it requires only to solve CAPTCHA? Is it possible to redirect this to users' browser & solve them from there only?

Logs:

``` FATAL EXCEPTION: main Process: im.molly.app, PID: 1325 android.view.InflateException: Binary XML file line #41: Binary XML file line #41: Error inflating class android.webkit.WebView Caused by: android.view.InflateException: Binary XML file line #41: Error inflating class android.webkit.WebView Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:343) at android.view.LayoutInflater.createView(LayoutInflater.java:647) at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:720) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:788) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.inflate(LayoutInflater.java:515) at android.view.LayoutInflater.inflate(LayoutInflater.java:423) at org.thoughtcrime.securesms.registration.fragments.CaptchaFragment.onCreateView(CaptchaFragment.java:35) at androidx.fragment.app.Fragment.performCreateView(Fragment.java:3114) at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:557) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:272) at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1943) at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1845) at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1782) at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:565) 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:6718) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: android.util.AndroidRuntimeException: android.webkit.WebViewFactory$MissingWebViewPackageException: Failed to load WebView provider: No WebView installed at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:471) at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:251) at android.webkit.WebView.getFactory(WebView.java:2467) at android.webkit.WebView.ensureProviderCreated(WebView.java:2462) at android.webkit.WebView.setOverScrollMode(WebView.java:2527) at android.view.View.(View.java:4807) at android.view.View.(View.java:4948) at android.view.ViewGroup.(ViewGroup.java:659) at android.widget.AbsoluteLayout.(AbsoluteLayout.java:55) at android.webkit.WebView.(WebView.java:408) at android.webkit.WebView.(WebView.java:353) at android.webkit.WebView.(WebView.java:336) at android.webkit.WebView.(WebView.java:323) ... 28 more Caused by: android.webkit.WebViewFactory$MissingWebViewPackageException: Failed to load WebView provider: No WebView installed at android.webkit.WebViewFactory.getWebViewContextAndSetProvider(WebViewFactory.java:376) at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:439) ... 40 more ```

Steps to reproduce

  1. After Enter phone number > ok step
  2. App crashes

Molly version

v7.1.3-1-FOSS (140001)

Android version

9

Device

Lenovo Tab4 8 Plus

Link to debug log

No response

HarriBuh commented 3 months ago

Oh boi.. You NEED at least one Webview app on your phone- it's ESSENTIAL for many (even non-Google) apps to work at all!! Why on earth would you disable it? Please THINK or at least educate yourself about any system app before doing such things

greensheeps commented 3 months ago

Oh boi.. You NEED at least one Webview app on your phone- it's ESSENTIAL for many (even non-Google) apps to work at all!! Why on earth would you disable it? Please THINK or at least educate yourself about any system app before doing such things

Correct, disabling it also won't save any storage...?

shuvashish76 commented 3 months ago

ESSENTIAL for many (even non-Google) apps to work at all.

  1. I don't use Google apps 2. I don't prefer using WebView dependant apps as you can't change your system WebView app ; unless you're rooted, which is most likely an overlay to use another webview)

Why on earth would you disable it?

I know what I'm doing. I mentioned it clearly on the description "the updated version takes more space". So disabling old-default version saves some device space. (not because you disabled it, but due to not being auto-update to latest).

No point in discussing about user preference on enable/disable WebView.


We should focus on the main topic here i.e. why we need WebView? If it's only to solve captcha...can it be redirected to browser instead. (Solving such basic captcha is weak form of verification to detect human vs bots, but that's the upstream Signal topic)