Timers don't work in headless tasks and may break in the application when headless tasks are used #47495
Labels
p: Software Mansion
Partner: Software Mansion
Partner
Resolution: Fixed
A PR that fixes this issue has been merged.
Resolution: PR Submitted
A pull request with a fix has been provided.
Type: New Architecture
Issues and PRs related to new architecture (Fabric/Turbo Modules)
Description
JavaTimerManager
is being registered to receive headless tasks events in theTimingModule
, which isn't used on Bridgeless. Due to this, timers don't work in headless tasks unless the app is in the foreground, and minimizing/reopening the app may entirely break the timers.Steps to reproduce
SetTimeout
buttonStartService
(the app will close)SetTimeout
buttonReact Native Version
0.76.1
Affected Platforms
Runtime - Android
Areas
Bridgeless - The New Initialization Flow
Output of
npx react-native info
Reproducer
https://github.com/j-piasecki/timer-headless-task-issue
Screenshots and Videos
Screen.Recording.2024-11-07.at.16.51.40.mov
The text was updated successfully, but these errors were encountered: