Reputation: 261
Webview loads but contains drop-down.When I click on that app crashes
Webview was working fine till last month but now it's crashing on clicking dropdown in webview in all the devices. Dependencies used are:
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation('com.google.android.material:material:1.0.0')
Below is attached log:
--------- beginning of crash
2021-06-30 16:08:03.423 19438-19438/com.dogmasystems.myrentcarbooking A/libc: Fatal signal 5 (SIGTRAP), code -6 (SI_TKILL) in tid 19438 (yrentcarbooking), pid 19438 (yrentcarbooking)
2021-06-30 16:08:03.541 21456-21456/? E/crash_dump32: unknown process state: t
2021-06-30 16:08:03.611 21456-21456/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-06-30 16:08:03.612 21456-21456/? A/DEBUG: Build fingerprint: 'samsung/gta3xlwifixx/gta3xlwifi:10/QP1A.190711.020/T510XXS5BUC4:user/release-keys'
2021-06-30 16:08:03.612 21456-21456/? A/DEBUG: Revision: '4'
2021-06-30 16:08:03.612 21456-21456/? A/DEBUG: ABI: 'arm'
2021-06-30 16:08:03.613 21456-21456/? A/DEBUG: Timestamp: 2021-06-30 16:08:03+0530
2021-06-30 16:08:03.613 21456-21456/? A/DEBUG: pid: 19438, tid: 19438, name: yrentcarbooking >>> com.dogmasystems.myrentcarbooking <<<
2021-06-30 16:08:03.613 21456-21456/? A/DEBUG: uid: 10316
2021-06-30 16:08:03.613 21456-21456/? A/DEBUG: signal 5 (SIGTRAP), code -6 (SI_TKILL), fault addr --------
2021-06-30 16:08:03.614 21456-21456/? A/DEBUG: Abort message: '[FATAL:jni_android.cc(306)] Please include Java exception stack in crash report
'
2021-06-30 16:08:03.614 21456-21456/? A/DEBUG: r0 00000000 r1 00000000 r2 00000000 r3 c52df784
2021-06-30 16:08:03.614 21456-21456/? A/DEBUG: r4 fff713a4 r5 c8934400 r6 fff70f5c r7 fff70f78
2021-06-30 16:08:03.614 21456-21456/? A/DEBUG: r8 eabea260 r9 0000004f r10 fff713ac r11 fff70f5c
2021-06-30 16:08:03.614 21456-21456/? A/DEBUG: ip c88d691c sp fff70f48 lr c6d5c90f pc c69045a2
2021-06-30 16:08:03.616 21456-21456/? A/DEBUG: backtrace:
2021-06-30 16:08:03.616 21456-21456/? A/DEBUG: #00 pc 017e55a2 /data/app/com.google.android.trichromelibrary_443021030-3FjkooxbSPI7iFUAICEe6A==/base.apk!libmonochrome.so (offset 0x645000) (BuildId: ea1d73db0ecf7ba0450e8051b6491bc520fd7df9)
2021-06-30 16:08:04.553 3687-3687/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_08
2021-06-30 16:08:04.578 3534-3534/? E/audit: type=1701 audit(1625049484.575:48919): auid=4294967295 uid=10316 gid=10316 ses=4294967295 subj=u:r:untrusted_app:s0:c60,c257,c512,c768 pid=19438 comm="yrentcarbooking" exe="/system/bin/app_process32" sig=5
2021-06-30 16:08:04.624 21463-21463/? E/Zygote: isWhitelistProcess - Process is Whitelisted
2021-06-30 16:08:04.626 21463-21463/? E/Zygote: accessInfo : 1
2021-06-30 16:08:04.646 21463-21463/? E/ng.android.loo: Not starting debugger since process cannot load the jdwp agent.
2021-06-30 16:08:04.660 3993-4773/? E/InputDispatcher: channel '379536b com.dogmasystems.myrentcarbooking/com.dogmasystems.myrentcarbooking.ui.activities.WebViewActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2021-06-30 16:08:04.664 3993-4773/? E/InputDispatcher: channel 'b3e576b com.dogmasystems.myrentcarbooking/com.dogmasystems.myrentcarbooking.ui.activities.DashboardActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2021-06-30 16:08:04.725 3993-4017/? E/WindowManager: RemoteException occurs on reporting focusChanged, w=Window{379536b u0 com.dogmasystems.myrentcarbooking/com.dogmasystems.myrentcarbooking.ui.activities.WebViewActivity EXITING}
android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:575)
at android.view.IWindow$Stub$Proxy.windowFocusChanged(IWindow.java:829)
at com.android.server.wm.WindowState.reportFocusChangedSerialized(WindowState.java:3691)
at com.android.server.wm.WindowManagerService$H.handleMessage(WindowManagerService.java:5262)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.os.HandlerThread.run(HandlerThread.java:67)
at com.android.server.ServiceThread.run(ServiceThread.java:44)
Upvotes: 0
Views: 975
Reputation: 261
Issue- I was extending BaseActivity class instead of AppCompat Activity.
Since I added phrase recently for my app in Base Activity, web view dropdown was crashing.
I just used below code
WebViewActivity extends AppCompatActivity
Upvotes: 0
Reputation: 992
Since I'm not having the URL which you are using at your end but tried with several URLs that is having a dropdown in their response and my WebView
is working fine on the devices.
The device which I tested on is PIXEL 2, Samsung Galaxy S20+, S10+
here is the dependency I have used for the AndroidX in my Project.
Especially, I suggest updating the dependency first.
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.5.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
and the code for the WebView
is pretty much normal.
binding.webView.settings.apply {
// TODO Depending upon your requirement you can use these setting to be applied before loading the URL.
// javaScriptEnabled = true
// loadWithOverviewMode = true
// javaScriptCanOpenWindowsAutomatically = true
}
binding.webView.apply {
webViewClient = object : WebViewClient() {
override fun shouldOverrideUrlLoading(
view: WebView,
url: String
): Boolean {
Log.e("url coming from server", url)
view.loadUrl(url)
return false;
}
}
loadUrl("The URL you want to load here")
}
If it still not work at your end, then possibly can you share your's activity code.
Upvotes: 2
Reputation: 25
The object you are calling has died because its hosting process no longer exists. refer to this thread
Upvotes: 0