Skip to content

fix(mobile): patch null headless loader crash in expo-task-manager - #6063

Merged
iscekic merged 1 commit into
mainfrom
fix/KILO-APP-9V-null-headless-loader
Sep 10, 2026
Merged

fix(mobile): patch null headless loader crash in expo-task-manager#6063
iscekic merged 1 commit into
mainfrom
fix/KILO-APP-9V-null-headless-loader

Conversation

@iscekic

@iscekic iscekic commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix KILO-APP-9V: a fatal NullPointerException in expo.modules.taskManager.TaskService.executeTask on 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_glanceable 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 on the Firebase messaging thread.

Change

  • Add patches/expo-task-manager@57.0.16.patch: null-guard the loader in executeTask; drop the queued event and return instead of crashing.
  • Register the patch in pnpm-workspace.yaml and pnpm-lock.yaml.

Verification

  • git apply -p1 --check against the exact 57.0.16 package passes.
  • pnpm install --lockfile-only regenerated the lock with the patch hash.

Caveat

The same method has an unsynchronized sEvents check-then-act race (expo/expo#41663) that can throw in the same frame. Left unpatched to keep this change minimal.

Fixes KILO-APP-9V

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 iscekic self-assigned this Sep 10, 2026
@iscekic
iscekic enabled auto-merge (squash) September 10, 2026 19:40
@kilo-code-bot

kilo-code-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed the expo-task-manager@57.0.16 null headless-loader patch together with its pnpm patch registration and lockfile updates; the null-guard is internally consistent and the regenerated lockfile only repairs pre-existing catalog drift, with no high-confidence defects found.

Files Reviewed (3 files)
  • patches/expo-task-manager@57.0.16.patch
  • pnpm-lock.yaml
  • pnpm-workspace.yaml

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants