Unhandled Promise rejection : Attempt to invoke virtual method 'java.lang.String android.webkit.WebSettings.getUserAgentString()' on a null object reference

I integrated capacitor in my Ionic project and getting the below error while calling service
Ionic 5.4.16
Capacitor 3.1.2
npm 6.14.13
node 14.17.3

E/Capacitor/Console: File: http://localhost/polyfills-es2015.js - Line 1 - Msg: Unhandled Promise rejection: Attempt to invoke virtual method ‘java.lang.String android.webkit.WebSettings.getUserAgentString()’ on a null object reference ; Zone: ; Task: null ; Value: Attempt to invoke virtual method ‘java.lang.String android.webkit.WebSettings.getUserAgentString()’ on a null object reference undefined

Looks like a bug, can you report it on Issues · ionic-team/capacitor · GitHub and provide a sample app where it can be reproduced?

Hello, i knw that have been a long time since you made this post, but, i just have fixed the same problem by updating my @capacitor/android, i was running an older version ( 2. something ) and updated to 3.2