I’m getting the all-too popular “Invalid device state” error, even after applying the permissions fixes that so many others have had success with. I’ve also removed the platforms folder and re-added, clicked “reset content and settings” in the simulator menu, and reinstalled XCode and the command line tools. Still stuck.
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=163):
Invalid device state
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=163):
Invalid device state
Sometimes, but not always, the following error shows up:
Error: ENOENT: no such file or directory, stat ‘/Users/cam/Library/Logs/CoreSimulator/E995BA98-A0AF-4ABA-B6E7-E2C7CB5F406A/system.log’
Even more curiously, running the simulator from XCode will successfully launch, but the first angular template I see shows up without any rendering applied (i.e., all the {{ expressions }} are rendered literally, conditionals are not respected, etc).
Further, console.log statements don’t appear in the XCode console despite having installed cordova-plugin-console
. I even put a console.log in index.html
above all script tags to test whether or not there was an error in executing one of them, and it doesn’t show up.
Here’s the output of the XCode console when I build/run from XCode:
objc[62725]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x1100c4910) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x10fe57210). One of the two will be used. Which one is undefined.
2016-11-10 11:29:32.008185 psiq[62725:8652253] subsystem: com.apple.UIKit, category: HIDEventFiltered, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-11-10 11:29:32.014647 psiq[62725:8652253] subsystem: com.apple.UIKit, category: HIDEventIncoming, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-11-10 11:29:32.027596 psiq[62725:8652249] subsystem: com.apple.BaseBoard, category: MachPort, enable_level: 1, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0
2016-11-10 11:29:32.034 psiq[62725:8652175] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/cam/Library/Developer/CoreSimulator/Devices/129D8D68-6391-4D0B-9625-892577A10FA5/data/Containers/Data/Application/7E47B51D-6E85-409D-8D32-4B33B9C08B06/Library/Cookies/com.ionicframework.psiq611323.binarycookies
2016-11-10 11:29:32.036710 psiq[62725:8652175] subsystem: com.apple.libsqlite3, category: logging, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-11-10 11:29:32.057149 psiq[62725:8652175] subsystem: com.apple.UIKit, category: StatusBar, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-11-10 11:29:32.113 psiq[62725:8652175] Apache Cordova native platform version 4.2.1 is starting.
2016-11-10 11:29:32.114 psiq[62725:8652175] Multi-tasking → Device: YES, App: YES
2016-11-10 11:29:32.140054 psiq[62725:8652175] subsystem: com.apple.SystemConfiguration, category: SCNetworkReachability, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 2, enable_private_data: 0
2016-11-10 11:29:32.167830 psiq[62725:8652175] subsystem: com.apple.UIKit, category: GestureEnvironment, enable_level: 0, persist_level: 0, default_ttl: 1, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-11-10 11:29:32.171 psiq[62725:8652175] Using UIWebView
2016-11-10 11:29:32.174 psiq[62725:8652175] [CDVTimer][handleopenurl] 0.243008ms
2016-11-10 11:29:32.179 psiq[62725:8652175] [CDVTimer][intentandnavigationfilter] 3.718019ms
2016-11-10 11:29:32.180 psiq[62725:8652175] [CDVTimer][gesturehandler] 0.243008ms
2016-11-10 11:29:32.225 psiq[62725:8652175] [CDVTimer][splashscreen] 45.333982ms
2016-11-10 11:29:32.240 psiq[62725:8652175] [CDVTimer][statusbar] 14.760017ms
2016-11-10 11:29:32.242 psiq[62725:8652175] [CDVTimer][keyboard] 1.033962ms
2016-11-10 11:29:32.242 psiq[62725:8652175] [CDVTimer][TotalPluginStartup] 68.188965ms
2016-11-10 11:29:32.390707 psiq[62725:8652175] subsystem: com.apple.siri, category: Intents, enable_level: 1, persist_level: 1, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0
2016-11-10 11:29:32.431281 psiq[62725:8652175] subsystem: com.apple.BackBoardServices.fence, category: App, enable_level: 1, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0
2016-11-10 11:29:32.639 psiq[62725:8652175] Resetting plugins due to page load.
2016-11-10 11:29:32.994 psiq[62725:8652175] Finished load of: file:///Users/cam/Library/Developer/CoreSimulator/Devices/129D8D68-6391-4D0B-9625-892577A10FA5/data/Containers/Bundle/Application/ABC48EF0-B0C9-4F99-8324-B98AEFCE51B6/psiq.app/www/index.html#/signup
I would be dearly grateful for some suggestions here