Hi! I’m using SDK 46 and an expo-dev-build, I have built an Android internal distribution build and installed the app in my Android Emulator (Nexus 6P API 31, Android 12 x86_64).
After tap in the app icon, the app immediately crashes, this is the log excerpt I found with adb logcat, it seems that the issue is with some UTF8 characters…¿¿??
09-06 19:27:17.476 14940 14988 F r_de_tecnologi: java_vm_ext.cc:579] JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal continuation byte 0x25
09-06 19:27:17.057 14940 14940 I r_de_tecnologi: Late-enabling -Xcheck:jni
09-06 19:27:17.092 14940 14940 W r_de_tecnologi: Unexpected CPU variant for X86 using defaults: x86_64
09-06 19:27:17.153 14940 14940 V GraphicsEnvironment: ANGLE Developer option for ‘com.mgscreativa.demostrador_de_tecnologia’ set to: ‘default’
09-06 19:27:17.323 14940 14940 V fb-UnpackingSoSource: locked dso store /mnt/expand/37952af6-2ccc-4bd6-91f6-fe38ab96fb79/user/0/com.mgscreativa.demostrador_de_tecnologia/lib-main
09-06 19:27:17.325 14940 14940 I fb-UnpackingSoSource: dso store is up-to-date: /mnt/expand/37952af6-2ccc-4bd6-91f6-fe38ab96fb79/user/0/com.mgscreativa.demostrador_de_tecnologia/lib-main
09-06 19:27:17.325 14940 14940 V fb-UnpackingSoSource: releasing dso store lock for /mnt/expand/37952af6-2ccc-4bd6-91f6-fe38ab96fb79/user/0/com.mgscreativa.demostrador_de_tecnologia/lib-main
09-06 19:27:17.417 14940 14988 D SoLoader: libfbjni.so not found on /mnt/expand/37952af6-2ccc-4bd6-91f6-fe38ab96fb79/user/0/com.mgscreativa.demostrador_de_tecnologia/lib-main
09-06 19:27:17.417 14940 14988 D SoLoader: libfbjni.so found on /mnt/expand/37952af6-2ccc-4bd6-91f6-fe38ab96fb79/app/~~e6VBcfu_Pl1R0BSl0T6_Lw==/com.mgscreativa.demostrador_de_tecnologia-lvur7wrFE_dWjTIJpT6ETw==/lib/x86_64
09-06 19:27:17.422 14940 14988 D SoLoader: libflipper.so not found on /mnt/expand/37952af6-2ccc-4bd6-91f6-fe38ab96fb79/user/0/com.mgscreativa.demostrador_de_tecnologia/lib-main
09-06 19:27:17.422 14940 14988 D SoLoader: libflipper.so found on /mnt/expand/37952af6-2ccc-4bd6-91f6-fe38ab96fb79/app/~~e6VBcfu_Pl1R0BSl0T6_Lw==/com.mgscreativa.demostrador_de_tecnologia-lvur7wrFE_dWjTIJpT6ETw==/lib/x86_64
09-06 19:27:17.456 14940 14990 W unknown:ReconnectingWebSocket: Couldn’t connect to “ws://localhost:8081/message?device=sdk_gphone64_x86_64%20-%2012%20-%20API%2031&app=com.mgscreativa.demostrador_de_tecnologia&clientid=DevLauncherDevSupportManager”, will silently retry
09-06 19:27:17.461 14940 14940 W r_de_tecnologi: Accessing hidden field Landroid/view/View;->mKeyedTags:Landroid/util/SparseArray; (unsupported, reflection, allowed)
09-06 19:27:17.461 14940 14940 W r_de_tecnologi: Accessing hidden field Landroid/view/View;->mListenerInfo:Landroid/view/View$ListenerInfo; (unsupported, reflection, allowed)
09-06 19:27:17.461 14940 14940 W r_de_tecnologi: Accessing hidden field Landroid/view/View$ListenerInfo;->mOnClickListener:Landroid/view/View$OnClickListener; (unsupported, reflection, allowed)
09-06 19:27:17.464 14940 14940 I flipper : flipper: FlipperClient::addPlugin Inspector
09-06 19:27:17.464 14940 14940 I flipper : flipper: FlipperClient::addPlugin React
09-06 19:27:17.465 14940 14940 I flipper : flipper: FlipperClient::addPlugin Databases
09-06 19:27:17.467 14940 14940 I flipper : flipper: FlipperClient::addPlugin Preferences
09-06 19:27:17.467 14940 14940 I flipper : flipper: FlipperClient::addPlugin CrashReporter
09-06 19:27:17.469 14940 14940 I flipper : flipper: FlipperClient::addPlugin Network
09-06 19:27:17.471 362 410 W RanchuHwc: validateDisplay: layer 156 CompositionType 1, fallback
09-06 19:27:17.473 362 410 W RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer.
09-06 19:27:17.476 14940 14988 F r_de_tecnologi: java_vm_ext.cc:579] JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal continuation byte 0x25
09-06 19:27:17.476 14940 14988 F r_de_tecnologi: java_vm_ext.cc:579] string: ‘ws://localhost:9089?medium=1&sdk_version=4&app=Demostrador%20De%20Tecnolog�%ADa&device_id=unknown&device=sdk_gphone64_x86_64%20-%2012%20-%20API%2031&os=Android’
Thanks for sharing the dependencies list. This doesn’t seem like an issue with expo-dev-client. One thing I can suggest is that if you are using a custom font, try removing it and re-build the app to test it on the device that it is crashing. Maybe the Android Emulator you are using does not support a specific character.
It is indeed quite weird. I also use the Android emulator with similar AVD settings. My suggestion here is to create another AVD and use a different device (other than nexus 6P), and then test on it.
What changed between when it was working and when it was crashing? Does it work on iOS? Or other Android devices? Or other Android versions? Or did it work before upgrading to SDK 46? Or did you previously build a different way?
Also, can you create a new app and build that to test if it also crashes in the same way?
Thanks @wodin!
1- Didn’t change anything because the binary worked before I reinstalled my Linux mint box
2- The very same binary does work on iOS and my Android physical device (Xiaomi Mi A2), didn’t tried another android SDK, will try.
3- It worked on SDK 46 before I reinstalled my Linux Mint box, didn’t do a backup of my Android Studio emu settings…
4- Will try
OK. I am not sure why that would be, but it looks like some sort of character encoding issue.
It seems like the app name is written in some character encoding other than UTF-8, but something in the emulator is trying to interpret it as a UTF-8 string:
I am guessing this part “�%AD” is supposed to be an “i”? Any idea where the weird characters are coming from?
Hi @wodin thanks for pointing that out! My app name is Demostrador de tecnología (technology demonstrator), maybe that accented í is causing the issue. But it worked before I reinstalled LM from 20.3 to LM 21.
Any hints on that accented í?
Edit1: Rebuilt the very same app, no changes, for android internal distribution and no luck, the same error in logcat
Edit2: Excerpt from app.json
{
"expo": {
"name": "Demostrador De Tecnología",
...
...
Edit3: Reviewing my git history on app.json and app.config.js, the accented í is there since the initial commit, done on 2022 Jul 05!
Edit 4: Found this screenshot form my backup before fresh installing LM 21, will try with API 30 to see what happens
Edit 5: Mi manigfest file is ok it seems:
{
"name":"Demostrador De Tecnología",
...
...
"sdkVersion":"46.0.0",
...
...
"description":"Demostrador De Tecnología companion app",
If I take that string and encode it as UTF-8, then the bytes representing the accented “i” are:
0xc3, 0xad
So the “%AD” part in the error makes sense. But the “�” part is wrong and implies that something mangled that byte for some reason. And given that it works on your phone, it seems like it must be something on the emulator.
Edit1: Seems to be a mention to flipper in the Run gradlew expo build step:
> Task :react-native-webview:javaPreCompileDebug
> Task :react-native-webview:compileDebugJavaWithJavac
> Task :react-native-webview:bundleLibCompileToJarDebug
[stderr] Note: Some input files use or override a deprecated API.
[stderr] Note: Recompile with -Xlint:deprecation for details.
[stderr] Note: /home/expo/workingdir/build/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java uses unchecked or unsafe operations.
[stderr] Note: Recompile with -Xlint:unchecked for details.
> Task :app:compileDebugJavaWithJavac
[stderr] Note: /home/expo/workingdir/build/android/app/src/debug/java/com/mgscreativa/demostrador_de_tecnologia/ReactNativeFlipper.java uses or overrides a deprecated API.
[stderr] Note: Recompile with -Xlint:deprecation for details.
> Task :app:compressDebugAssets
> Task :app:processDebugJavaRes NO-SOURCE
> Task :expo:processDebugJavaRes NO-SOURC
Edit2: Tested wit AVD devices with API 29, 30 and 31 and the result is the same, app crashes. I’m starting to think that maybe the issue is some change in Expo SDK 46 that triggers some Flipper usage in development builds, maybe the flipper version bump workaround should help, but I don’t know how to tell expo to do that.