Specific URL not rendering in Android Webview

Viewed 1009

The website https://app.seesaw.me/#/login wont render anything for me inside a android webview.

My settings are as follows:

  with(webView.settings) {
            mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW
            loadsImagesAutomatically = true
            javaScriptEnabled = true
            ResourcesCompat.getFont(requireContext(), R.font.helvetica_neue)
        }

        webView?.loadUrl("https://app.seesaw.me/#/login")

It will load the main page but when I navigate to the login the screen goes blank. The logcat displays this message.

D/InputMethodManager: HSIFW - flag : 0
I/chromium: [INFO:CONSOLE(18)] "Invalid  asm.js: Type mismatch in assignment", source:  https://app.seesaw.me /#/login?force_login=signup (18)
I/chromium: [INFO:CONSOLE(4)] "The provided value 'moz-chunked-arraybuffer' is not a valid enum value of type XMLHttpRequestResponseType.", source:  (4)
I/chromium: [INFO:CONSOLE(14)] "Uncaught TypeError: Cannot read properties of null (reading 'getItem')", source: https://files.seesaw.me/release/prod/shared-ext.ec61797e71c5b625.bundle.js (14)
I/ViewRootImpl@7385979[MainActivity]: ViewPostIme pointer 0
2 Answers

Hi try adding this line domStorageEnabled = true after the javaScriptEnabled = trueAnd letme know if it worked

Please try with the below code, As I have checked with your given URL and it is working fine with the below code:-

WebSettings settings = binding.wvTermsConditions.getSettings();
settings.setJavaScriptEnabled(true);
settings.setDomStorageEnabled(true);
settings.setBuiltInZoomControls(true);
settings.setUseWideViewPort(true);
settings.setLoadWithOverviewMode(true);
binding.webView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
binding.webView.loadUrl(url);
Related