Closed Bug 1199584 Opened 9 years ago Closed 9 years ago

Licenses/Rights fails to load after a period of inactivity

Categories

(Firefox for iOS :: General, defect)

Other
iOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fxios 1.0.5+ ---

People

(Reporter: mantaroh, Assigned: sleroux)

References

Details

In Japanese environment, Can't access the License Page.

Reproduce Step:
 1. Start Firefox for iOS.
 2. Go to the Home.(Application Launcher)
 3. Sleep the phone. 
 (after 1-2 minutes)
 4. Open the Setting.
 5. Tap the [ライセンス]. ('ライセンス' is meaning that License)

Actually Result: 
 can't load the License page.
 (Displayed 'ページを読み込めませんでした。'. it is meaning that can't load the page.)

Expected Result:
 can load the License page.
Odd, I see the same thing in English too.
Does not affect TestFlight (i.e., v1.0.0). Trying to get logs from v1.0 branch now.
Scratch that, I can repro on v1.0.0.
Seems like either WebServer isn't running, or the URL we're computing for it is wrong. I can't repro this in simulator with v1.0, but I can on device with TF.
Summary: Can't access the Licenses Page → Licenses fails to load after a period of inactivity
Summary: Licenses fails to load after a period of inactivity → Licenses/Rights fails to load after a period of inactivity
So GCDWebServer listens internally for when the application goes into the background/foreground and starts/stops itself. I have a feeling that between the app going into the background and then coming back to the foreground, we drop the 'singleton' instance or the handlers disappear. The other option is the web server isn't getting restarted properly but the code for that looks solid. I'll investigate further.
Assignee: nobody → sleroux
The issue is that the socket connection that accepts requests in GCDWebServer gets terminated when the phone becomes locked. We should not assume that we can keep a socket open indefinitely on iOS. Some more info on why this happens can be found here: https://developer.apple.com/library/ios/technotes/tn2277/_index.html.

:st3fan, I remember you mentioning you had issues with configuring GCDWebServer to suspend on background because of a changing port issue which is why we configured it to not suspend. Do you recall what those issues were?
Flags: needinfo?(sarentz)
Depends on: 1201592
Clearing NI on this bug and moving it to same issue filed under a different bug
Flags: needinfo?(sarentz)
Resolved with the fix from it's dependent bug https://bugzilla.mozilla.org/show_bug.cgi?id=1201592.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.