Skip to content

[pull] main from expo:main#762

Merged
pull[bot] merged 7 commits intocode:mainfrom
expo:main
Apr 10, 2026
Merged

[pull] main from expo:main#762
pull[bot] merged 7 commits intocode:mainfrom
expo:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Apr 10, 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 : )

alanjhughes and others added 7 commits April 10, 2026 12:50
…44663)

# Why

Android task registration can run again during app startup or headless
restore while the unique WorkManager worker is already enqueued or
running.

Previously, registration always cancelled and replaced the existing
worker. If this happened during headless task execution, it could cancel
the active run and create a cancel/reschedule loop. If it happened
during normal startup, it could reset an already scheduled pending run.

Fixes #44581

# How

Check the existing unique worker state before cancel-and-replace
scheduling.

If the worker is already ENQUEUED or RUNNING, skip replacing it and
treat the schedule request as successful. This keeps the existing
pending or active worker intact while preserving the existing behavior
for absent, completed, failed, or cancelled work.

# Test-plan

- Reproduced the Android background task flow in the issue repro app.
- Verified app startup registration no longer replaces an already
enqueued worker.
- Verified headless restore logs `Worker is already scheduled, skipping
cancel-and-replace scheduling.`
- Verified the background task can complete successfully and enqueue the
next worker.
- Confirmed changes are limited to expo-background-task scheduler logic
plus changelog.

# 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)
- [x] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
# Why
Change the tile of the document
<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How
Update the title
<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan
Simple change. Just updated the text.
<!--
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)
- [x] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why
Concurrent background task rescheduling can call into BGTaskScheduler
cancellation at the same time from multiple threads. The stack trace in
#44583 shows overlapping calls through
BackgroundTaskScheduler.tryScheduleWorker(), which can crash inside
BGTaskScheduler.cancelTaskRequestWithIdentifier.

Fixes #44583

# How
Serialize ExpoBackgroundTask scheduler state and the cancel-submit
sequence on a private queue. Add a small BackgroundTaskScheduling seam
so the scheduler behavior can be tested without calling the system
BGTaskScheduler directly. Wire ExpoBackgroundTask into native-tests and
add a focused XCTest that starts two concurrent tryScheduleWorker()
calls, then verifies cancellation does not overlap. Exclude the new
Tests directory from the production CocoaPods and SPM source targets.

# Test-plan

Added test to apps/Native-tests project, verified that XCTest goes red
without the fix, and green with it.

# 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)
- [x] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
…4661)

# Why

Changes in `expo-modules-gradle-plugin` shouldn't trigger iOS build
#44654

# How

Excluded `expo-module-gradle-plugin` from `common-paths` and added it to
`android-paths` in both build and e2e detection steps in test-suite.yml.

# Test Plan
Make a change to `expo-module-gradle-plugin` and verify that `ios-build`
job is skipped and `android-build` job runs.
@pull pull bot locked and limited conversation to collaborators Apr 10, 2026
@pull pull bot added the ⤵️ pull label Apr 10, 2026
@pull pull bot merged commit 48b23c1 into code:main Apr 10, 2026
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.

6 participants