mehrvarz / webcall-android

WebCall for Android - Web-Telephony P2P Messaging File-Exchange E2E-Encryption No-SIM
GNU General Public License v3.0
130 stars 14 forks source link

"No System WebView installed" - but it is #1

Closed HeCorr closed 2 years ago

HeCorr commented 2 years ago

Hello! I tried installing WebCall on my old Motorola Moto G4 Plus (Android 7.0) but the app is unable to start, showing the "WebCall cannot start. No System WebView installed" error, but I checked and it does seem to be installed:

image

How should I proceed?

mehrvarz commented 2 years ago

Pls download https://timur.mobi/webcall/_dl/WebCall-0.9.68.apk and run it with: adb logcat |grep -E "WebCall|webcall|AndroidRuntime|System.err"

I would like to know what you get after "WebCallActivity: onCreate".

D WebCallActivity: onCreate 0.9.68
D WebCallActivity: getCurrentWebViewPackageInfo for O+
D WebCallActivity: onCreate webview packageInfo com.android.webview 97.0.4692.71
D WebCallActivity: onCreate data=null

Edited: put my log in code quote

HeCorr commented 2 years ago

Oh, this version actually launched without problems.. I was on 0.9.67 previously.

Here's the log either way (right after opening the app with it fully closed):

02-14 17:19:24.079  1565  5831 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=timur.webcall.callee/.WebCallCalleeActivity bnds=[540,1217][804,1498] (has extras)} from uid 10066 on display 0
02-14 17:19:24.132  1565 18576 I ActivityManager: Start proc 18040:timur.webcall.callee/u0a235 for activity timur.webcall.callee/.WebCallCalleeActivity
02-14 17:19:24.200 18040 18040 W System  : ClassLoader referenced unknown path: /data/app/timur.webcall.callee-2/lib/arm
02-14 17:19:24.259 18040 18040 D WebCallActivity: onCreate 0.9.68
02-14 17:19:24.259 18040 18040 D WebCallActivity: getCurrentWebViewPackageInfo for M+
02-14 17:19:24.259 18040 18040 D WebCallActivity: getCurrentWebViewPackageInfo for M+ (2)
02-14 17:19:24.260 18040 18040 D WebCallActivity: getCurrentWebViewPackageInfo for M+ (2) ex=java.lang.ClassNotFoundException: com.google.android.webview.WebViewFactory
02-14 17:19:24.260 18040 18040 D WebCallActivity: onCreate no WebView packageInfo on 24 > 23
02-14 17:19:24.514 18040 18040 D WebCallActivity: onCreate data=null
02-14 17:19:24.516 18040 18040 D WebCallActivity: onStart activityStartNeeded
02-14 17:19:24.520 18040 18040 D WebCallActivity: onResume proximitySensorEventListener registered
02-14 17:19:24.543 18040 18040 D WebCallActivity: proximitySensorEvent accuracy 3
02-14 17:19:24.543 18040 18040 D WebCallActivity: proximitySensorEvent TYPE_PROXIMITY 100.0
02-14 17:19:24.566 18040 18040 D WebCallService: onCreate 0.9.68
02-14 17:19:24.568 18040 18040 D WebCallService: onStartCommand
02-14 17:19:24.569 18040 18040 D WebCallService: onStartCommand charging=true
02-14 17:19:24.573 18040 18040 D WebCallService: onStartCommand audioToSpeakerMode=0
02-14 17:19:24.573 18040 18040 D WebCallService: onStartCommand beepOnLostNetworkMode=0
02-14 17:19:24.573 18040 18040 D WebCallService: onStartCommand webcalldomain=
02-14 17:19:24.573 18040 18040 D WebCallService: onStartCommand username=
02-14 17:19:24.573 18040 18040 D WebCallService: onStartCommand startOnBootMode=0
02-14 17:19:24.573 18040 18040 D WebCallService: onStartCommand setWifiLockMode=1
02-14 17:19:24.573 18040 18040 D WebCallService: onStartCommand screenForWifiMode=0
02-14 17:19:24.573 18040 18040 D WebCallService: onStartCommand keepAwakeWakeLockMS=0
02-14 17:19:24.573 18040 18040 D WebCallService: onStartCommand lastUsed versionName=0.9.68
02-14 17:19:24.582 18040 18040 D WebCallService: onBind 0.9.68
02-14 17:19:24.619 18040 18040 D WebCallActivity: onServiceConnected startWebView
02-14 17:19:24.621 18040 18040 D WebCallService: startWebView creating myWebView for user=
02-14 17:19:24.621 18040 18040 D WebCallService: startWebView ua=Mozilla/5.0 (Linux; Android 7.0; Moto G (4) Build/NPJS25.93-14-18; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/55.0.2883.91 Mobile Safari/537.36
02-14 17:19:24.626 18040 18040 D WebCallService: startWebView load currentUrl=file:///android_asset/index.html
02-14 17:19:24.640 18040 18040 D WebCallService: wakeupType() wsClient not set, no connectToSignalingServerIsWanted
02-14 17:19:24.704  1565  2922 I LaunchCheckinHandler: Displayed timur.webcall.callee/.WebCallCalleeActivity,cp,ca,582
02-14 17:19:24.704  1565  2922 I ActivityManager: Displayed timur.webcall.callee/.WebCallCalleeActivity: +582ms
02-14 17:19:24.895  1565  2922 I WindowManager: Destroying surface Surface(name=Starting timur.webcall.callee) called by com.android.server.wm.WindowStateAnimator.destroySurface:2069 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:897 com.android.server.wm.WindowState.destroyOrSaveSurface:2121 com.android.server.wm.AppWindowToken.destroySurfaces:363 com.android.server.wm.WindowStateAnimator.finishExit:575 com.android.server.wm.WindowStateAnimator.stepAnimationLocked:501 com.android.server.wm.WindowAnimator.updateWindowsLocked:303 com.android.server.wm.WindowAnimator.animateLocked:704
02-14 17:19:24.985 18040 18040 D WebCallService: console versionName 0.9.68 L30
02-14 17:19:24.987 18040 18040 D WebCallService: console domain timur.mobi L97
02-14 17:19:24.988 18040 18040 D WebCallService: console username  L98
02-14 17:19:24.990 18040 18040 D WebCallService: onPageFinished url=file:///android_asset/index.html
02-14 17:19:24.990 18040 18040 D WebCallService: onPageFinished set currentUrl=file:///android_asset/index.html
02-14 17:19:27.042   553   553 D SFPerfTracer:        layers: (3:11) (StatusBar (0xacd44800): 0:597804) (com.android.systemui.ImageWallpaper (0xacd42000): 0:290306)* (DimLayerController/Stack=0 (0xac9aa000): 0:17345)* (Sprite (0xac98e400): 0:168)* (animation background stackId=1 (0xac9ac800): 0:938)* (DockedStackDim (0xacd43400): 0:7)* (animation background stackId=0 (0xac9ab400): 0:2)* (NavigationBar (0xac990c00): 0:2243) (com.google.android.googlequicksearchbox/com.google.android.launcher.GEL (0xac98f800): 0:185)- (Starting timur.webcall.callee (0xac98bc00): 0:44)- (timur.webcall.callee/timur.webcall.callee.WebCallCalleeActivity (0xac98d000): 18:47)

If you want I can install the previous version and get the log of it too :)

I do see some "connect time out" errors every few seconds.. But I have no idea what they are about. I'm not even touching my phone and haven't tried registering/logging in yet.

02-14 17:23:41.144 13893 14070 W System.err: java.net.SocketTimeoutException: connect timed out
02-14 17:23:41.145 13893 14070 W System.err:    at java.net.PlainSocketImpl.socketConnect(Native Method)
02-14 17:23:41.145 13893 14070 W System.err:    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:343)
02-14 17:23:41.145 13893 14070 W System.err:    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:205)
02-14 17:23:41.145 13893 14070 W System.err:    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:187)
02-14 17:23:41.145 13893 14070 W System.err:    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:356)
02-14 17:23:41.145 13893 14070 W System.err:    at java.net.Socket.connect(Socket.java:586)
02-14 17:23:41.145 13893 14070 W System.err:    at com.android.okhttp.internal.Platform.connectSocket(Platform.java:113)
02-14 17:23:41.145 13893 14070 W System.err:    at com.android.okhttp.Connection.connectSocket(Connection.java:196)
02-14 17:23:41.145 13893 14070 W System.err:    at com.android.okhttp.Connection.connect(Connection.java:172)
02-14 17:23:41.145 13893 14070 W System.err:    at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:367)
02-14 17:23:41.145 13893 14070 W System.err:    at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:130)
02-14 17:23:41.145 13893 14070 W System.err:    at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:329)
02-14 17:23:41.145 13893 14070 W System.err:    at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:246)
02-14 17:23:41.145 13893 14070 W System.err:    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:457)
02-14 17:23:41.145 13893 14070 W System.err:    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:126)
02-14 17:23:41.145 13893 14070 W System.err:    at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:89)
02-14 17:23:41.145 13893 14070 W System.err:    at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java)
02-14 17:23:41.145 13893 14070 W System.err:    at com.facebook.ads.redexgen.X.Gh.A01(:34916)
02-14 17:23:41.146 13893 14070 W System.err:    at com.facebook.ads.redexgen.X.Gh.A0J(:35083)
02-14 17:23:41.146 13893 14070 W System.err:    at com.facebook.ads.redexgen.X.Gy.A00(:35606)
02-14 17:23:41.146 13893 14070 W System.err:    at com.facebook.ads.redexgen.X.Gy.doInBackground(:35627)
02-14 17:23:41.146 13893 14070 W System.err:    at android.os.AsyncTask$2.call(AsyncTask.java:304)
02-14 17:23:41.146 13893 14070 W System.err:    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
02-14 17:23:41.146 13893 14070 W System.err:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
02-14 17:23:41.146 13893 14070 W System.err:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
02-14 17:23:41.146 13893 14070 W System.err:    at java.lang.Thread.run(Thread.java:761)

..Facebook ads? 👀

HeCorr commented 2 years ago

A quick update, I tried connecting and it won't connect, and since I already had logcat running through adb here's what I can see: (from the moment I press the "Go Online" button)

02-14 17:32:59.120 18040 18040 D WebCallService: console goOnline 38742535174 L1469
02-14 17:32:59.127 18040 18040 D WebCallService: console goOnline have no wsConn L1469
02-14 17:32:59.127 18040 18040 D WebCallService: console login to signaling server...false 38742535174 0 L1469
02-14 17:32:59.128 18040 18040 D WebCallService: console xhr /rtcsig/login?id=38742535174&_=1644870779128 L1469
02-14 17:32:59.282 18040 18040 D WebCallService: console login wsAddr=wss://timur.mobi:8443/ws?wsid=45994401258 L1469
02-14 17:32:59.283 18040 18040 D WebCallService: console outboundIP 66.228.46.43 L1469
02-14 17:32:59.286 18040 18040 D WebCallService: console login getsettings api /rtcsig/getsettings?id=38742535174 L1469
02-14 17:32:59.286 18040 18040 D WebCallService: console xhr /rtcsig/getsettings?id=38742535174&_=1644870779284 L1469
02-14 17:32:59.288 18040 18040 D WebCallService: console isHiddenCheckbox.checked false L1469
02-14 17:32:59.289 18040 18040 D WebCallService: console connect to signaling server andr wsConn==null L797
02-14 17:32:59.290 18040 18085 D WebCallJSIntrf: wsOpen wsClient==null addr=wss://timur.mobi:8443/ws?wsid=45994401258
02-14 17:32:59.290 18040 18085 D WebCallService: connectHost(wss://timur.mobi:8443/ws?wsid=45994401258)
02-14 17:32:59.576 18040 19322 D WebCallWebSock: onSetSSLParameters javax.net.ssl.SSLParameters@a85b0d5
02-14 17:33:00.003 18040 18085 D WebCallService: connectHost connectBlocking done isOpen=true
02-14 17:33:00.003 18040 18085 D WebCallService: connectHost hostVerify Success net=2
02-14 17:33:00.005 18040 18085 D WebCallService: audioToSpeakerSet setForceUse false
02-14 17:33:00.008 18040 18085 W System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
02-14 17:33:00.008 18040 18085 W System.err:    at timur.webcall.callee.WebCallService.connectHost(WebCallService.java:2936)
02-14 17:33:00.008 18040 18085 W System.err:    at timur.webcall.callee.WebCallService.access$5100(WebCallService.java:157)
02-14 17:33:00.008 18040 18085 W System.err:    at timur.webcall.callee.WebCallService$WebCallJSInterface.wsOpen(WebCallService.java:1476)
02-14 17:33:00.008 18040 18085 W System.err:    at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
02-14 17:33:00.008 18040 18085 W System.err:    at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:41)
02-14 17:33:00.008 18040 18085 W System.err:    at android.os.Handler.dispatchMessage(Handler.java:102)
02-14 17:33:00.008 18040 18085 W System.err:    at android.os.Looper.loop(Looper.java:154)
02-14 17:33:00.008 18040 18085 W System.err:    at android.os.HandlerThread.run(HandlerThread.java:61)
02-14 17:33:00.010 18040 18040 D WebCallService: console Uncaught Error: Java exception was raised during method invocation L805
02-14 17:33:00.013 18040 18040 D WebCallService: console login calleeName  L1469
02-14 17:33:00.014 18040 18040 D WebCallService: console wsOnOpen 38742535174 L1469
02-14 17:33:00.016 18040 18040 D WebCallService: console ws connection send init|! L1469
02-14 17:33:00.017 18040 18040 D WebCallService: console connect to signaling server andr wsConn==null L797
02-14 17:33:00.018 18040 18085 D WebCallJSIntrf: wsOpen return existing wsClient
02-14 17:33:00.020 18040 18040 D WebCallService: console connectSig wss://timur.mobi:8443/ws?wsid=45994401258 L1469
02-14 17:33:29.344 18040 19322 D WebCallWebSock: onClose skip code=1000
mehrvarz commented 2 years ago

..Facebook ads?

Quick reply. This is not my code doing that. The adb command I asked you to run filters out all "WebCall" related entries from the combined Android log, as well as all "AndroidRuntime" and "System.err" errors from any source that occur at the same time. Note that WebCall is not listed once in your 2nd log snapshot. If this was my device, I would try to find out what is causing this. Maybe by freezing apps one by one?

Your 3rd snapshot is showing a little bug. I'll come back to you regarging this.

mehrvarz commented 2 years ago

This is not my code doing that.

You can verify this claim by uninstalling WebCall and by continuing to monitor your Android log with that adb command. You should see that SocketTimeoutException again. Maybe when you don't have network coverage?

It is good to know that 0.9.68 has fixed the WebView detection issue.

Regarding the NullPointerException, if you find the time, please try v0.9.69 from https://timur.mobi/webcall/_dl/WebCall-0.9.69.apk

The 0.9.68 sources are in the repository. The 0.9.69 changes not yet.

HeCorr commented 2 years ago

This is not my code doing that. [...] Note that WebCall is not listed once in your 2nd log snapshot.

Oh, I didn't notice that. my apologies.

Regarding the NullPointerException, if you find the time, please try v0.9.69

Alright, will do! :)

HeCorr commented 2 years ago

After some investigation I figured out which app was using Facebook's ads SDK..

But it's still not working as expected.. I updated to v0.9.69 and found many issues which are listed below.

It's possible most of these issues are due to my phone being old though.

mehrvarz commented 2 years ago

We sort it out. Call Stats will only show something post call. I have an old Nexus phone with Android 5 for testing. It works just fine. Although the audio is not as good as on newer devices. What is your 2nd device? Are your 2 devices connected via the same Wifi access point? Can you please try to establish a call btw 2 PCs/Macs using desktop browsers (to exclude the Moto for a test)? Maybe it is not the Moto but something else. When you use the Moto, can you look at the logs for msgs that look "exceptional" and happen at the same time you experience an issue on the device?

mehrvarz commented 2 years ago

I have an idea. Can you go to Settings / Apps and find out what version your System WebView is? My Nexus phone is old and is running Android 5, but the System WebView is v96 from late 2021. If your WebView is pre-2021, then that could cause all the issues you describe.

HeCorr commented 2 years ago

I can't seem to find it in the apps list.. even when including system apps.. Maybe it's not called "WebView" or "System WebView" on my device..?

Also, my secondary device used for testing was my PC which is on the same network (although wired). I can test with a different desktop later on.

HeCorr commented 2 years ago

Interesting.. I just tried calling my PC from the phone and it shows "peerCon iceCandidate error 400" at the PC..

..and the "Hang Up" button does nothing on the phone 😅 it just keeps trying to connect..

HeCorr commented 2 years ago

can you look at the logs for msgs that look "exceptional" and happen at the same time you experience an issue on the device?

Yes, I can check that but not at the moment. I didn't notice anything obvious last time I checked the logs tho..

mehrvarz commented 2 years ago

This was in the log you sent with your 2nd post:

getCurrentWebViewPackageInfo for M+ (2) ex=java.lang.ClassNotFoundException: com.google.android.webview.WebViewFactory

This indicates that your current WebView does not implement the WebViewFactory class which could mean that your WebView is 5+ years old. I didn't think about it much yesterday.

Under Developer options (must be enabled) the WebView version should show up under "WebView implementation". If you cannot find out the version you can still try to upgrade it.

mehrvarz commented 2 years ago

I can't seem to find it in the apps list.. even when including system apps.. Maybe it's not called "WebView" or "System WebView" on my device..?

It is actually called "Android System WebView" in the app list.

HeCorr commented 2 years ago

It is actually called "Android System WebView" in the app list.

Oh... I found it, thanks. v55.0.2883.91

HeCorr commented 2 years ago

Okay, this is weird.. I just opened Google Play to check if I could somehow update WebView and now there is an update... wtf?

I just updated and everything works now, even the camera feed. I'll blame it on Google.

Thanks for the help though!