Render process crashing webview Android Pie (9) - android

Trying to load the HTML files from assets folder, app working fine up to Android v8.1 and getting crash in Android Pie (9) devices.
Seems like WebView render process getting crash according the debug logs, finding the ways to resolve this issue.
Please help and suggest...Thanks in advance.
From the logcat:
2019-09-19 15:37:13.967 3313-3342/? E/libc: failed to connect to tombstoned: Operation not permitted
2019-09-19 15:37:14.100 4499-4499/? E/audit: type=1701 audit(1568887634.098:9979): auid=4294967295 uid=99281 gid=99281 ses=4294967295 subj=u:r:isolated_app:s0:c25,c257,c512,c768 pid=3313 comm="CrRendererMain" exe="/system/bin/app_process32" sig=5
2019-09-19 15:37:14.129 4924-4978/? E/libprocessgroup: Error encountered killing process cgroup uid 99281 pid 3313: No such file or directory
2019-09-19 15:37:14.147 3131-3131/? E/chromium: [ERROR:aw_browser_terminator.cc(125)] Renderer process (3313) crash detected (code 5).
2019-09-19 15:37:14.148 3131-3131/? A/chromium: [FATAL:crashpad_client_linux.cc(494)] Render process (3313)'s crash wasn't handled by all associated webviews, triggering application crash.
--------- beginning of crash
2019-09-19 15:37:14.149 3131-3131/? A/libc: Fatal signal 5 (SIGTRAP), code 1 (TRAP_BRKPT), fault addr 0x726bc83a50 in tid 3131 (s.ultrasyncplus), pid 3131 (s.ultrasyncplus)
2019-09-19 15:37:14.227 3410-3410/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2019-09-19 15:37:14.227 3410-3410/? A/DEBUG: Build fingerprint: 'samsung/crownltexx/crownlte:9/PPR1.180610.011/N960FXXS3CSFC:user/release-keys'
2019-09-19 15:37:14.227 3410-3410/? A/DEBUG: Revision: '28'
2019-09-19 15:37:14.227 3410-3410/? A/DEBUG: ABI: 'arm64'
2019-09-19 15:37:14.227 3410-3410/? A/DEBUG: pid: 3131, tid: 3131, name: s.ultrasyncplus >>> com.uhssystems.ultrasyncplus <<<
2019-09-19 15:37:14.227 3410-3410/? A/DEBUG: signal 5 (SIGTRAP), code 1 (TRAP_BRKPT), fault addr 0x726bc83a50
2019-09-19 15:37:14.227 3410-3410/? A/DEBUG: Abort message: '[FATAL:crashpad_client_linux.cc(494)] Render process (3313)'s crash wasn't handled by all associated webviews, triggering application crash.

method 1 :This method works for all domains also with Android 9. Add this property to your Manifest like this:
<application
...
android:usesCleartextTraffic="true"
...>
</application>
method 2.1 : Add #xml/network_security_config into your resources:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">www.rcub.ac.in/</domain>
</domain-config>
</network-security-config>
2.2 : Add this security config to your Manifest like this:
<application
...
android:networkSecurityConfig="#xml/network_security_config"
...>
...
</application>
You can read more in https://developer.android.com/training/articles/security-config#CleartextTrafficPermitted

Related

Converting a Unity Android Studio project into a Dynamic Feature without having to copy its assets into the base project from the start

Usually one has to turn it into a Library to embed it into another app. However, now I want to convert it into a Dynamic Feature instead.
I've put this in the Unity project's manifest:
<dist:module
dist:onDemand="true"
dist:title="#string/title_gamejam_as_dynamic_feature">
<dist:fusing dist:include="true" />
</dist:module>
In addition, I've commented out the bundle{} part of its Gradle file. If I didn't comment that out I end up getting the following error:
Could not find method bundle() for arguments [build_9piysgasfu4pgl4v1ppx46cyn$_run_closure3$_closure12#44175a08] on object of type com.android.build.gradle.AppExtension.
I've also made sure that the UnityPlayerActivity there extends my custom AppCompatActivity that uses SplitCompat.install(this) [though it extends Activity].
Right now my problem is that for some reason the Assets in that Unity project aren't registered in the base APK, so the UnityPlayerActivity ends up crashing on launching.
What am I doing wrong?
EDIT: The error stacktrace is below:
01-15 03:48:18.343 15446-15522/? E/mono: The assembly mscorlib.dll was not found or could not be loaded.
01-15 03:48:18.343 15446-15522/? E/mono: It should have been installed in the `/data/app/test.com.ondemandtest-1/base.apk/assets/bin/Data/Managed/mono/4.5/mscorlib.dll' directory.
01-15 03:48:18.343 15446-15446/? E/CRASH: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
01-15 03:48:18.343 15446-15446/? E/CRASH: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-15 03:48:18.343 15446-15446/? E/CRASH: Build type 'Release', Scripting Backend 'mono', CPU 'armeabi-v7a'
01-15 03:48:18.343 15446-15446/? E/CRASH: Build fingerprint: 'Huawei/ALE-L21/hwALE-H:5.0.1/HuaweiALE-L21/C636B150:user/release-keys'
01-15 03:48:18.343 15446-15446/? E/CRASH: Revision: '0'
01-15 03:48:18.343 15446-15446/? E/CRASH: pid: 15446, tid: 15446, name: om.ondemandtest >>> test.com.ondemandtest <<<
01-15 03:48:18.343 15446-15446/? E/CRASH: r0 00000000 r1 ffc2fb10 r2 6f5aec60 r3 00000000
01-15 03:48:18.343 15446-15446/? E/CRASH: r4 ffc2fb10 r5 e22c0250 r6 00000000 r7 6f5aec60
01-15 03:48:18.343 15446-15446/? E/CRASH: r8 ffc2fad4 r9 ab3f7930 sl ffc2fa9f fp ffc2fa50
01-15 03:48:18.343 15446-15446/? E/CRASH: ip e1fafee8 sp ffc2fa40 lr e1fb0040 pc e1fafca8 cpsr 00003c56
01-15 03:48:18.343 15446-15446/? E/CRASH: backtrace:
EDIT 2:
Upon further inspection, I found out that mscorlib.dll isn't in the mono .so file, but the Assets folder. Copying assets/bin/Data/... of the Unity project into the base project (into the exact same path) works... but that just defeats the point of modularity.
Is there any way the Unity project can use the Assets it brings without having to copy it into the Base APK before deploying?
Unity is searching your .dll in the base.apk, which is not what you want since you are using Dynamic Features
I solved it by overiding the getPackageCodePath() of my UnityPlayerActivity to something like this:
override fun getPackageCodePath(): String {
return super.getPackageCodePath().replace("base.apk", "split_unity_module.apk")
}
PS: My module is named unity_module so the name of the .apk is something like split_{{your_module_name}}.apk

Error signal 11 (SIGSEGV), code 2 in a Unity App

I'm working on and Android game in Unity 2018.1.0f2. Some builds of the App lead to a crash. The log contains then the following:
05-20 18:52:17.993: A/libc(26270): Fatal signal 11 (SIGSEGV), code 2, fault addr 0xef97cffc in tid 26284 (UnityMain)
05-20 18:52:17.993: A/libc(26270): [ 05-20 18:52:17.993 3095: 3095 W/ ]
05-20 18:52:17.993: A/libc(26270): debuggerd: handling request: pid=26270 uid=10367 gid=10367 tid=26284
05-20 18:52:18.094: A/DEBUG(26286): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-20 18:52:18.094: A/DEBUG(26286): Build fingerprint: 'samsung/heroltexx/herolte:7.0/NRD90M/G930FXXS2DRDI:user/release-keys'
05-20 18:52:18.094: A/DEBUG(26286): Revision: '8'
05-20 18:52:18.094: A/DEBUG(26286): ABI: 'arm'
05-20 18:52:18.095: A/DEBUG(26286): pid: 26270, tid: 26284, name: UnityMain >>> de.zoomapp.zoom <<<
05-20 18:52:18.095: A/DEBUG(26286): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xef97cffc
05-20 18:52:18.095: A/DEBUG(26286): r0 e9c93908 r1 f0f805c0 r2 e42c70e0 r3 00000008
05-20 18:52:18.095: A/DEBUG(26286): r4 00000000 r5 e42c70e0 r6 00000010 r7 00000008
05-20 18:52:18.095: A/DEBUG(26286): r8 e42c7000 r9 e9c93908 sl f0f805c0 fp 00000000
05-20 18:52:18.095: A/DEBUG(26286): ip f1200948 sp ef97d020 lr f11e6bc1 pc f11cbf00 cpsr 60070030
05-20 18:52:18.098: A/DEBUG(26286): backtrace:
05-20 18:52:18.098: A/DEBUG(26286): #00 pc 00053f00 /system/lib/libc.so (arena_purge_to_limit+1151)
05-20 18:52:18.098: A/DEBUG(26286): #01 pc 00064095 /system/lib/libc.so (imemalign+428)
05-20 18:52:18.098: A/DEBUG(26286): #02 pc 0000002f <unknown>
05-20 18:52:19.028: E/audit(4563): type=1701 audit(1526835139.011:7135): auid=4294967295 uid=10367 gid=10367 ses=4294967295 subj=u:r:untrusted_app:s0:c512,c768 pid=26284 comm="UnityMain" exe="/system/bin/app_process32" sig=11
05-20 18:52:19.054: E/lowmemorykiller(3180): Error writing /proc/26270/oom_score_adj; errno=22
05-20 18:52:19.059: E/InputDispatcher(4902): channel ~ Channel is unrecoverably broken and will be disposed!
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL
05-20 18:52:21.967: E/OpenGLRenderer(4902): Error:glDeleteShader::<shader> is not a value generated by OpenGL
As I said, I don't get this problem every time, only in some builds. The crash occurs even before the Unity splash screen is shown. It seems like none of my scripts is called (not even Awake()) before it crashes. Also it only occured in the release build which I wanted to upload into the Google Play Store. This release build is splitted into APK and OBB file by Unity, so maybe there is some kind of problem? I don't know if there is much I can do to avoid this, as I don't see how my code or scene might lead to this error.
Maybe someone saw this kind of error before or even had some similiar problem and can give me a hint on how to fix this.
Thank you guys.
Regards, Michael
Any crash inside malloc, realloc, free, or memalign is a 99.99% indication that you have heap corruption (which is the result of overflowing a heap-allocated buffer, freeing unallocated memory, freeing memory twice, etc. etc.)
I don't get this problem every time, only in some builds
Yes: these are all quite characteristic of heap corruption problems.
I don't see how my code or scene might lead to this error.
Unfortunately, heap corruption errors are often very hard to debug without tool support.
On Linux and Mac OSX, you could use valgrind or (better) Address Sanitizer. Looks like the Address Sanitizer is available on Android as well.

JNI crashlog: source file line determination with stacktrace output

Crashes & ANR section of google play developer console provides this kind of feedback when native code crashes on user's device:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: '...'
Revision: '...'
ABI: 'arm'
pid: ...., tid: ...., name: .... >>> com.package <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
<registers>
backtrace:
#00 pc 003ba9be /data/app/com.package/lib/arm/libx.so (sl_setVolumeSound(unsigned int, float)+105)
#01 pc 003b9db7 /data/app/com.package/lib/arm/libx.so (Audio::setVolumeSound(unsigned int, float)+106)
so far, so good. But how could one determine a source code line out of bytecode offset(?), such as +105 for the sl_setVolumeSound function in the sample output above?
I would especially appreciate a solution which would work completely in macosx command line, with no IDEs engaged.
ndk-stack is specially suited for this purpose. Note, that to get it working you need a non-stripped versions of your native libraries. More details here.

Android M Preview 3 emulator Native Browser crash

I have created an Android emulator with OS(6.0) and when the emulator starts i launch directly the "Browser" app and get a crash.
Here are some logs :
W/System(1617): ClassLoader referenced unknown path: /system/app/webview/lib/arm
E/ActivityThread(1617): Failed to find provider info for com.google.settings
### WebView Version 44.0.2403.119 (code 246011900)
Fatal signal 6 (SIGABRT), code -6 in tid 1667 (GpuThread)
SELinux: Loaded file_contexts contexts from /file_contexts.
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'generic/sdk_phone_armv7/generic:6.0/MRA44C/2166767:eng/test-keys'
Revision: '0'
ABI: 'arm'
pid: 1617, tid: 1667, name: GpuThread >>> com.android.browser <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:gl_surface_android.cc(58)] Check failed: kGLImplementationNone != GetGLImplementation() (0 vs. 0)
does anyone know something about that?
Please find the tombstone file that contains the full crash log :
Tombstone01
Resolved by checking "Use GPU Host" when creating the emulator.

Did someone give a try the Http Live Streaming in Android V3.0?

As you should know, Google annonced that Apple Http Live Streaming is now supported in the SDK V3.0 via the mediaPlayer Framework.
So I wrote some lines to test this. I started with a "3gp" movie that is correclty displayed on the emulator (a tablet). When I feed the source with a working m3u8 URL nothing is displayed and the debugger reports an error
Can someone lead me from darkness to light ???
I guess it has something to do with codec but...
Many thanks for any clue.
Zbb
02-15 09:49:31.284: INFO/avc_utils(33): found AVC codec config (320 x 180, Main-profile level 1.3)
02-15 09:49:31.444: INFO/ESQueue(33): found AAC codec config (24000 Hz, 2 channels)
02-15 09:49:31.444: INFO/ESQueue(33): [ 02-15 09:49:31.454 33:0x1b9 F/ACodec ]
02-15 09:49:31.444: INFO/ESQueue(33): frameworks/base/media/libstagefright/ACodec.cpp:1594
CHECK_EQ( omx->allocateNode(componentName.c_str(), observer, &node),(status_t)OK) failed: -2147483648 vs. 0
02-15 09:49:31.605: INFO/DEBUG(31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-15 09:49:31.605: INFO/DEBUG(31): Build fingerprint: 'generic/sdk/generic:Honeycomb/HPI20B/eng.xav.20110125.162619:eng/test-keys'
02-15 09:49:31.605: INFO/DEBUG(31): pid: 33, tid: 441 >>> /system/bin/mediaserver <<<
02-15 09:49:31.615: INFO/DEBUG(31): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad

Categories

Resources