0

I'm unable load particular url in my webview and getting blank white screen. When I load same url in chrome and chromium, url is loading properly and web notification is displaying like below screenshot. I seen following error message in logs.

I/chromium: [INFO:CONSOLE(2)] "ReferenceError: Notification is not defined"
I/chromium: [INFO:CONSOLE(1)] "Redirect.validateUserSession():Auth.userSession() err: ReferenceError: Notification is not defined"

enter image description here

Following is complete log.

D: bPullDownRefresh:false isTopOverScrolled:true deltaY:-4.9960938 downY:833.235
D: x:0 y:323 clampedX:false clampedY:false
I: shouldOverrideUrlLoading: urlNewString: 
I: onPageStarted: url
E: Unparseable date: "06/30/2021"
E: Unparseable date: "01/07/2022"
D: x:0 y:0 clampedX:false clampedY:false
I: shouldOverrideUrlLoading: urlNewString
I: onPageStarted: url
E: Unparseable date: "06/30/2021"
E: Unparseable date: "01/07/2022"
I: [INFO:audio_latency.cc(179)] audioHardwareBufferSize = 192
I: AAudioStreamBuilder_openStream() called ----------------------------------------
I: privacy sensitive = false, opPackageName = (null), attributionTag = (null)
D: PlayerBase::PlayerBase()
D: configureDataInformation() original HW burst = 96, minMicros = 2000 => SW burst = 96
D: setState(s#2) from 0 to 2
I: configure() source format = 0x00000005, channels = 2, sink format = 0x00000005, channels = 2, useMonoBlend = 0, audioBalance = 0.000000, isExclusive 0
I: AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#2 ----------------
D: AAudioStream_requestStart(s#2) called --------------
D: setState(s#2) from 2 to 3
D: AAudioStream_requestStart(s#2) returned 0 ---------
D: callbackLoop() entering >>>>>>>>>>>>>>>
D: onEventFromServer - got AAUDIO_SERVICE_EVENT_STARTED
D: setState(s#2) from 3 to 4
I: onPageFinished: url
I: [INFO:CONSOLE(2)] "ReferenceError: Notification is not defined", source
I: [INFO:CONSOLE(1)] "Redirect.validateUserSession():Auth.userSession() err: ReferenceError: Notification is not defined", source
I: [INFO:audio_latency.cc(179)] audioHardwareBufferSize = 192
I: AAudioStreamBuilder_openStream() called ----------------------------------------
I: privacy sensitive = false, opPackageName = (null), attributionTag = (null)
D: PlayerBase::PlayerBase()
D: configureDataInformation() original HW burst = 96, minMicros = 2000 => SW burst = 96
D: setState(s#3) from 0 to 2
I: configure() source format = 0x00000005, channels = 2, sink format = 0x00000005, channels = 2, useMonoBlend = 0, audioBalance = 0.000000, isExclusive 0
I: AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#3 ----------------
D: AAudioStream_requestStart(s#3) called --------------
D: setState(s#3) from 2 to 3
I: [INFO:audio_latency.cc(179)] audioHardwareBufferSize = 192
D: AAudioStream_requestStart(s#3) returned 0 ---------
D: AAudioStream_requestStop(s#3) called
D: callbackLoop() entering >>>>>>>>>>>>>>>
D: callbackLoop() exiting, result = 0, isActive() = 1 <<<<<<<<<<<<<<
D: joinThread_l() pthread_join succeeded
D: stop(nanos = 2044212168905) max lateness = 0 micros
D: setState(s#3) from 3 to 9
D: onEventFromServer - got AAUDIO_SERVICE_EVENT_STARTED
D: onEventFromServer - got AAUDIO_SERVICE_EVENT_STOPPED
D: setState(s#3) from 9 to 10
D: AAudioStream_requestStart(s#3) called --------------
D: setState(s#3) from 10 to 3
D: AAudioStream_requestStart(s#3) returned 0 ---------
D: callbackLoop() entering >>>>>>>>>>>>>>>
D: onEventFromServer - got AAUDIO_SERVICE_EVENT_STARTED
D: setState(s#3) from 3 to 4

Seems like android webview doesn't have Notification API support as per Notifications_API Documentation and https://bugs.chromium.org/p/chromium/issues/detail?id=551446. Can anyone suggest solution to fix this?

While inspecting webpage, I seen 'Notification.requestPermission().then()' is causing below exception.

react-dom.production.min.js:216 ReferenceError: Notification is not defined
at notifications.helper.js:30:10
at home_new.js:121:7
at Ou (react-dom.production.min.js:262:359)
at t.unstable_runWithPriority (scheduler.production.min.js:18:343)
at Vi (react-dom.production.min.js:122:325)
at wu (react-dom.production.min.js:261:308)
at fu (react-dom.production.min.js:243:50)
at react-dom.production.min.js:123:115
at t.unstable_runWithPriority (scheduler.production.min.js:18:343)
at Vi (react-dom.production.min.js:122:325)
ss @ react-dom.production.min.js:216
redirect2.js:123 Redirect.validateUserSession():Auth.userSession() err: ReferenceError: Notification is not defined
at notifications.helper.js:30:10
at home_new.js:121:7
at Ou (react-dom.production.min.js:262:359)
at t.unstable_runWithPriority (scheduler.production.min.js:18:343)
at Vi (react-dom.production.min.js:122:325)
at wu (react-dom.production.min.js:261:308)
at fu (react-dom.production.min.js:243:50)
at react-dom.production.min.js:123:115
at t.unstable_runWithPriority (scheduler.production.min.js:18:343)
at Vi (react-dom.production.min.js:122:325)
Srikanth
  • 1,555
  • 12
  • 20
  • You need to focus your question. Is your problem that the webview isn't loading the url? Or is the problem that there's no 'send notifications' option? If it's not loading the url at all, then of course it's not going to give you the notifications popup. Deal with one problem at a time. – TKoL Aug 23 '23 at 10:39
  • @TKoL Issue is webview not loading particular url. As per error message in logs I described about notification issue. – Srikanth Aug 23 '23 at 12:11
  • So what happens to your webpage if you don't try to call the Notification code? Does it load in the webview then? – TKoL Aug 23 '23 at 12:22
  • I don't have access to webpage code to modify @TKoL – Srikanth Aug 23 '23 at 14:05
  • Do you have the ability to modify another webpage and try out the test I'm asking? You have to figure out if it's because of the notification code, or some other reason. – TKoL Aug 23 '23 at 14:16
  • @TKoL Other webpages are loading properly. As per logs it seems like notification issue. – Srikanth Aug 24 '23 at 07:24

0 Answers0