Skip to content

[pull] main from expo:main#647

Merged
pull[bot] merged 6 commits intocode:mainfrom
expo:main
Mar 4, 2026
Merged

[pull] main from expo:main#647
pull[bot] merged 6 commits intocode:mainfrom
expo:main

Conversation

@pull
Copy link

@pull pull bot commented Mar 4, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

…`getInstallReferrerAsync` (#43419)

# Why

#43094

As OP mentioned, this issue is not consistently reproducible but from
the stack it looks like something (`doDeath` callback) is triggering the
`onInstallReferrerServiceDisconnected` on an already settled promise.

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

Return early if the promise was already settled.
<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

No crash repro, but existing functionality should not be affected.

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
-->

- [ ] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why

Replace copying `Uint8Array` with zero-copy `ArrayBuffer.`

# How

- Replaced native argument and return types 
  - In C++ replaced `JArrayByte` with direct `JByteBuffer` - reduces JNI overhead
  - Used `JavaScriptArrayBuffer` for sync and `NativeArrayBuffer` (copying but thread-safe) for async function arguments.
- Kept user-facing JS types untouched
- For web module, transformed back to Uint8Array

# Test Plan

- SQLite test suite - both Android and iOS
- Manual testing of all updated functions

# Checklist

- [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why

Replace copying `Uint8Array` with native`ArrayBuffer`.

# How

- Replaced native argument types
  - Used JavaScriptArrayBuffer for sync variant 
  - Used NativeArrayBuffer (copying but thread-safe) for async variant.
- Kept user-facing JS types untouched - both `Uint8Array` and `ArrayBuffer` are supported
- Updated mocks to translate back to Uint8Array and TS unit tests for the helper func

# Test Plan

- SQLite test suite - both Android and iOS
- Manual testing
- TS Unit tests

# Checklist

- [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why

Replace copying `Uint8Array` with `NativeArrayBuffer` on Android.
Only one copy is done instead of two: 1. sqlite3 -> ArrayBuffer;  2. returning ArrayBuffer is now zero-copy

iOS is handled later

# How

- Updated native code to use `ByteBuffer` / `ArrayBuffer`
- Updated JS to convert back `ArrayBuffer` columns to `Uint8Array` (backwards compat)

# Test Plan

- Android test suite
- iOS test suite - to make sure it's not broken and backward compatible

# Checklist

- [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why

Follow up #42640. Replace copying `Uint8Array` with `NativeArrayBuffer`.

# How

- Updated native code to return `ArrayBuffer`

# Test Plan

- iOS test suite
- Manual testing

# Checklist

- [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
@pull pull bot locked and limited conversation to collaborators Mar 4, 2026
@pull pull bot added the ⤵️ pull label Mar 4, 2026
@pull pull bot merged commit f7e1446 into code:main Mar 4, 2026
3 of 10 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants