Startup failure on simulator in Profile.swift

RESOLVED FIXED

Status

()

Firefox for iOS
Data Storage
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: mfinkle, Assigned: nalexander)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Pulled latest code and built fine. Tried to launch in iPhone 5 simulator and I get a failure:

"fatal error: unexpectedly found nil while unwrapping an Optional value"

Line 13 of Profile.swift

 let url = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier(ExtensionUtils.sharedContainerIdentifier())!
(Reporter)

Updated

3 years ago
Summary: Startup failure on simulator → Startup failure on simulator in Profile.swift
Sounds like fallout from st3fan's fix for our extensions?
Component: General → Data Storage
Flags: needinfo?(sarentz)
OS: Mac OS X → iOS 8
Hardware: x86 → All
I can't reproduce this issue. Tried with several simulator types and on two devices. Is anyone else seeing this?
Flags: needinfo?(sarentz)
I am pretty sure now that this is happening because Mark has not setup his Mac to do device builds. That means that the provisioning profiles for org.mozilla.ios.Fennec are not present. And those profiles contain the reference to the application group.

As a fallback we can use ~/Documents if containerURLForSecurityApplicationGroupIdentifier() fails, but that has the side effect that the share extension does not work. This may be ok because that is only a situation that can happen when the app is run in the simulator. On a device, containerURLForSecurityApplicationGroupIdentifier, cannot fail. (Famous last words, but it would only fail if the app were packaged incorrectly with wrong or missing entitlements)
Created attachment 8585195 [details] [review]
Link to Github pull-request: https://github.com/mozilla/firefox-ios/pull/288
Attachment #8585195 - Flags: review?(rnewman)
stefan: I think we'll land a work-around to get the simulator back for contributors, but please follow-up with a longer term bug if there's more needed.
Flags: needinfo?(sarentz)
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Comment on attachment 8585195 [details] [review]
Link to Github pull-request: https://github.com/mozilla/firefox-ios/pull/288

Works on device.
Attachment #8585195 - Flags: review?(rnewman) → review+
https://github.com/mozilla/firefox-ios/commit/e674e80b32c0817caded489213e5948a192f3c55
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED

Updated

3 years ago
Duplicate of this bug: 1148698
Flags: needinfo?(sarentz)
You need to log in before you can comment on or make changes to this bug.