remote-android / redroid-doc

redroid (Remote-Android) is a multi-arch, GPU enabled, Android in Cloud solution. Track issues / docs here
3.91k stars 285 forks source link

Webview crashes in local build - A12 #688

Open Nostras opened 1 month ago

Nostras commented 1 month ago

Describe the bug Hi, in an attempt to get FGO Automata to work (https://github.com/Fate-Grand-Automata/FGA) I had to do a manual build of redroid as this patch is not in the distributed version. I applied neppure's fix as mentioned here (https://github.com/remote-android/redroid-doc/issues/453). I had to "fix" webview as it got incorrectly pulled. I manually downloaded it and put it where it's missing. https://android.googlesource.com/platform/external/chromium-webview/+/refs/heads/main adb shell dumpsys webviewupdate outputs version 95.0.4638.74

make sure the required kernel modules present

Collect debug logs curl -fsSL https://raw.githubusercontent.com/remote-android/redroid-doc/master/debug.sh | sudo bash -s -- [CONTAINER] omit CONTAINER if not exist any more. 如容器已退出,可忽略CONTAINER参数(ZH_CN) redroid-debug.MTmqGfE6.tgz

Screenshots Not much to see.

Specifically FGO opens a webview once you log in, causing the app to instantly crash. If helpful I attempted to trace the webview logs through adb logcat chromium:I *:S

05-22 22:19:55.452  3142  3142 E chromium: [ERROR:network_service_instance_impl.cc(179)] Failed to grant sandbox access to network context data for /data/user/0/com.aniplex.fategrandorder/app_webview/Default with result 7: No such file or directory (2)
05-22 22:19:55.466  3142  5974 W chromium: [WARNING:minidump_to_upload_parameters.cc(67)] duplicate annotation name ptype, discarding value browser
05-22 22:19:55.509  3142  3142 E chromium: [ERROR:platform_shared_memory_region_android.cc(190)] Ashmem region has a wrong protection mask: it is not read-only but it should be
05-22 22:19:55.512  5953  5989 E chromium: [ERROR:platform_shared_memory_region_android.cc(190)] Ashmem region has a wrong protection mask: it is not read-only but it should be
05-22 22:19:55.698  6012  6012 E chromium: [0522/221955.697994:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: Permission denied (13)
05-22 22:19:55.699  6012  6012 E chromium: [0522/221955.699490:ERROR:system_snapshot_linux.cc(126)] Couldn't read property ro.product.board
05-22 22:19:55.702  6015  6015 E chromium: [0522/221955.702837:ERROR:exception_handler_server.cc(192)] Handler Client SetPtracer: Operation not permitted (1)
05-22 22:19:55.846  6015  6015 E chromium: [0522/221955.846219:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: Permission denied (13)
05-22 22:19:55.846  6015  6015 E chromium: [0522/221955.846762:ERROR:ptrace_client.cc(358)] Broker Open: access denied
05-22 22:19:55.846  6015  6015 E chromium: [0522/221955.846809:ERROR:system_snapshot_linux.cc(126)] Couldn't read property ro.product.board
05-22 22:19:55.880  6015  6015 E chromium: [0522/221955.880546:ERROR:socket.cc(182)] incorrect payload size 0
05-22 22:19:56.934  6139  6139 E chromium: [6139:6139:20240522,221956.912415:ERROR ptracer.cc:422] ptrace: Invalid argument (22)
05-22 22:19:56.940  6139  6139 E chromium: [6139:6139:20240522,221956.938702:ERROR ptracer.cc:476] Unexpected registers size 0 != 272, 72

Just opening webview shell created near identical logs, so I didn't bother adding these.

Please advice.

On another note, if it's possible to get FGO Automata to work with a released docker image that would work as well, but at this point I think I've invested over 20 hours in trying to get this to work.

zhouziyang commented 1 month ago

The legacy (from AOSP) possible require ashmem; Try get ashmem back or update to use a recent webview.

Check https://github.com/remote-android/local_manifests/tree/12.0.0 to get a recent webview.

Nostras commented 1 month ago

The legacy (from AOSP) possible require ashmem; Try get ashmem back or update to use a recent webview.

Check https://github.com/remote-android/local_manifests/tree/12.0.0 to get a recent webview.

Hi, could you elaborate on how exactly I need to add this? Specifically, where and how does this need to happen here https://github.com/remote-android/redroid-doc/blob/master/android-builder-docker/README.md