Mobile AR - Android System WebView causes my application to crash

181 views Asked by At

I am developing for the platforms Android and iOS using AR Foundation in Unity. In this application I spawn multiple webviews from Vuplex. My application works fine on iOS, but I have issues with Android. I did some profiling on my application with some webviews to monitor cpu, memory, energy usage and realized that my application crashes randomly, but within 10 minutes.

What I do in my application:

  • Scan the environment by using AR Plane Detection from AR Foundation
  • Instantiate 5 Vuplex webviews via touch gesture on the planes
  • Wait for 10 minutes and make a note of useful profiler data.

After such a crash I get sometimes a notification/popup on the device that sounds like (translated):
“The installed version of WebView has caused “MyApplicationName” to crash.
Uninstall WebView updates and restart “MyApplicationName”.”
This is the only hint I have. There are no messages in the output/logcat.

I have already tried the usual solutions, such as uninstalling the Chrome updates and Android System Webview updates, clearing the cache of Chrome. Unfortunately, it didn't help. You also can't uninstall those, because they count as system components, so only the updates are removable. What I also encountered was that I can't find the Android System Webview under Settings>Applications. I can only remove/update it in the Google Playstore.

The last thing I will try is to factory reset my device. But that does not make any sense because the device I am using is new. I just unpacked it, updated it and start developing a week ago.

--- Edit ----
I have the subjective perception that the crash only happens when I have 4-5 webviews. If I only have one or two webviews, my application does not crash. Since I have not done any long-term tests (>10min), I cannot guarantee this. However, there is no crash within 10 minutes if I only have 1-2 webviews open.

News since I made the post:

  • the lasts output in logcat I get before the crash is: enter image description here
  • factory reset didnt fix the problem
  • I inspected web content with Chrome DevTools and one web page, that I instantiate twice shows this messages in the console: enter image description here
  • [Important] I missed a memory warning. It says that the device is low on memory. In the profiler, my application consumes 950-1050MB. The same application consumes ~300MB on iOS. Might this be the reason? At the beginning the application uses ~500MB and after setting up 5 webviews I am around 1GB. [Important]

-- End Edit--

Device:

  • Samsung Tab S9 FE
  • One UI-Version: 6.0
  • Android-Version: 14
  • Android System WebView (removed updates): 117.0.5938.60
  • Android System WebView (updated): 120.0.6099.43

Vuplex:

  • packages for iOS and Android

Unity:

  • 2023.1.18f1
  • AR Foundation 6.0.0-pre.3
  • Apple ARKit 6.0.0-pre.3
  • Google ARCore 6.0.0-pre.3
0

There are 0 answers