Skip to content

Android demo 0.1.1

Choose a tag to compare

@millw14 millw14 released this 03 Aug 11:01
· 72 commits to main since this release

⚠️ Broken — do not install

This build also aborts on launch on every Android 14+ device.

Use Android demo 0.1.2 instead.

These notes originally claimed this release fixed the 0.1.0 crash. That was
wrong.
The TextDecoder polyfill problem described below is real and the fix
is kept, but it was never the cause of the crash.

The actual cause was android.permission.DETECT_SCREEN_CAPTURE being blocked
in app.json while expo-screen-capture was installed. That library
registers a screen-capture callback at module creation on Android 14+, with no
permission check, so the missing permission threw a SecurityException before
the JS runtime was ready and aborted the process. Fixed in 0.1.2.


The TextDecoder issue (real, but not the crash)

polyfills.ts asserts TextDecoder exists and throws if it does not. The
text-codec shim ends with E || (TextDecoder = …, TextEncoder = …),
all-or-nothing on the environment's existing TextEncoder. Hermes ships
TextEncoder and not TextDecoder, so the guard short-circuited and the shim
installed neither. Browsers have both natively, so no web check could see it.

Fixed by hiding TextEncoder so the shim installs both, then restoring the
engine's own. Covered by a test that reproduces the Hermes shape.