fix(mobile): patch null headless loader crash in expo-task-manager - #6063
Merged
Conversation
A data-only FCM wake can reach TaskService.executeTask before the React task manager is registered and while the app context is unavailable. getAppLoader() then returns null and the unguarded loadApp() call throws a fatal NullPointerException on the Firebase messaging thread. Patch expo-task-manager 57.0.16 to drop the queued event when the loader is unavailable, matching upstream expo/expo#46449. Fixes KILO-APP-9V
iscekic
enabled auto-merge (squash)
September 10, 2026 19:40
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryReviewed the Files Reviewed (3 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
pandemicsyn
approved these changes
Sep 10, 2026
This was referenced Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix KILO-APP-9V: a fatal
NullPointerExceptioninexpo.modules.taskManager.TaskService.executeTaskon Android.The Android app needs a new build. This is a native patch and cannot ship via OTA.
Root cause
A data-only
active_agents_glanceableFCM wake can reachTaskService.executeTaskbefore the React task manager is registered and while the app context is unavailable.getAppLoader()then returnsnull, and the unguardedloadApp(...)call throws on the Firebase messaging thread.expo-task-manager@57.0.16still contains the unguarded call, so the SDK upgrade does not fix it.executeTaskframe.Change
patches/expo-task-manager@57.0.16.patch: null-guard the loader inexecuteTask; drop the queued event and return instead of crashing.pnpm-workspace.yamlandpnpm-lock.yaml.Verification
git apply -p1 --checkagainst the exact 57.0.16 package passes.pnpm install --lockfile-onlyregenerated the lock with the patch hash.Caveat
The same method has an unsynchronized
sEventscheck-then-act race (expo/expo#41663) that can throw in the same frame. Left unpatched to keep this change minimal.Fixes KILO-APP-9V