-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
Issue: Author Provided ReproThis issue can be reproduced in Snack or an attached project.This issue can be reproduced in Snack or an attached project.JavaScriptStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
Description
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
react-native 0.47.2
Steps to Reproduce
- Schedule a long-running promise task with InteractionManager.runAfterInteractions
const promise = InteractionManager.runAfterInteractions({
gen: () => {
// do a long fetch and return a promise
}
});
- After the task has started but before it is done, cancel the task
promise.cancel()
- When the task completes TaskQueue will throw an exception
TaskQueue: Error resolving Promise in task undefined: undefined is not an object (evaluating '_this2._queueStack[stackIdx].popable = true')
Expected Behavior
No error would be thrown. InteractionManager (TaskQueue) would ignore the completion of a cancelled task and start the next task.
Actual Behavior
Error was thrown from TaskQueue line 158:
iOS: TaskQueue: Error resolving Promise in task undefined: undefined is not an object (evaluating '_this2._queueStack[stackIdx].popable = true')
Android: TaskQueue: Error resolving Promise in task undefined: Attempted to assign to readonly property.
Reproducible Demo
Metadata
Metadata
Assignees
Labels
Issue: Author Provided ReproThis issue can be reproduced in Snack or an attached project.This issue can be reproduced in Snack or an attached project.JavaScriptStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.