Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

456
Views
Webview gives error while leaving from my app js error

Hey stackoverflow I am redirecting user to Webview from my app the redirection url is host on my server which is working fine on my device but in my testing its not working for some other devices. Error which i found from logcat is :

I/chromium: [INFO:CONSOLE(478)] "Uncaught TypeError: Cannot set property 'innerHTML' of null", source: https://secure-acs2ui-b1-indmum-mumrdc.wibmo.com/v1/acs/legacy/live/8547/M.P/uid=fd076e4c-afc4-44b2-99f5-97a0bC3lD7qB (478)

My webview function is :

    private fun configureWebview() {
        // Get the web view settings instance
        val settings = binding.webView.settings

        // Enable java script in web view
        settings.javaScriptEnabled = true

        // Enable and setup web view cache
        settings.setAppCacheEnabled(false)

        // Enable zooming in web view
//        settings.setSupportZoom(true)
//        settings.builtInZoomControls = true
//        settings.displayZoomControls = true


        // Zoom web view text
        settings.textZoom = 125


        // Enable disable images in web view
        settings.blockNetworkImage = false
        // Whether the WebView should load image resources
        settings.loadsImagesAutomatically = true


        // More web view settings
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            settings.safeBrowsingEnabled = true  // api 26
        }
        //settings.pluginState = WebSettings.PluginState.ON
        settings.useWideViewPort = true
        settings.loadWithOverviewMode = true
        settings.javaScriptCanOpenWindowsAutomatically = true
        settings.mediaPlaybackRequiresUserGesture = false


        // More optional settings, you can enable it by yourself
        settings.setAppCacheEnabled(false)
        settings.domStorageEnabled = true
        settings.defaultTextEncodingName = "utf-8"
        settings.setSupportMultipleWindows(true)
        settings.loadWithOverviewMode = true
        settings.allowContentAccess = false
        settings.allowUniversalAccessFromFileURLs = false
        settings.allowFileAccess = false
        
        // WebView settings
        binding.webView.fitsSystemWindows = true


        /*
            if SDK version is greater of 19 then activate hardware acceleration
            otherwise activate software acceleration
        */
        binding.webView.setLayerType(View.LAYER_TYPE_HARDWARE, null)
    }

Please help me to resolve this error thanks in advance

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!