apache / apache/cordova-ios

Failing to broadcast 'pause' event when app enters background

Open
#1,384 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.2k
Forks
1k
Avg merge
12h 11m
Merged PRs (30d)
18

Description

# Bug Report
## Problem
We've noticed on at least one reported occasion, Cordova is failing to broadcast the 'pause' event as the application enters the background.
### What is expected to happen?
We would expect this 'pause' event to trigger. This allows the application to close its open websocket(s).

### What does actually happen?
No 'pause' event is broadcast to the web layer. Likewise, we keep the websocket(s) open. We will however see the 'resume' even when the application is brought into the foreground. This spins up a new websocket(s). The outcome is inconsistent behavior in the application as it concerns communication to the domain layer; this can timeout or be non-functional when in this state.

## Information
This is for an iOS application. It's unknown when this behavior was first introduced, but it was only recently identified on our end. It was reported using an iPad Pro 2nd Gen (12.9"). The iOS version was not reported.

### Command or Code
n/a

### Environment, Platform, Device
iOS, iPad Pro 2nd Gen (12.9")

### Version information
rel/6.0.0

## Checklist

- [x] I searched for existing GitHub issues
- [x] I included all the necessary information above

Contributor guide

Open the contributing guide

Research direction

The report identifies the iOS background transition and the missing 'pause' event as the entry point, while 'resume' is still observed. Start by reproducing the behavior on the reported iPad Pro 2nd Gen with rel/6.0.0, then trace the background and foreground event path. Done means the web layer receives 'pause' reliably when the app enters the background.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, javascript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.