欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

session could not be started error domain=dtiphonesimulatorerrordomain code=2 有大用

shiping1 的头像
http://jingyan.baidu.com/article/647f011591a9eb7f2148a8c2.html
http://jingyan.baidu.com/article/359911f570b41757fe0306c2.html
google "session could not be started error domain=dtiphonesimulatorerrordomain code=2"

Suddenly this morning I can't launch the iPhone simulator. I have the most recent Titanium continuous build, and haven't changed anything else to cause the problem. Cleaning my project does not help. Here is my Studio console log:

[INFO] One moment, building ...
[DEBUG] Detecting modules in /Users/micahalcorn/Dropbox/Titaniums/MyApp/modules
[DEBUG] Detecting modules in /Library/Application Support/Titanium/modules
[INFO] Titanium SDK version: 1.7.3.v20110826161351
[INFO] iPhone Device family: iphone
[INFO] iPhone SDK version: 4.2
[INFO] iPhone simulated device: iphone
[DEBUG] executing command: /usr/bin/killall iPhone Simulator
[DEBUG] No matching processes belonging to you were found
[DEBUG] finding old log files
[DEBUG] executing command: mdfind -onlyin /Users/micahalcorn/Library/Application Support/iPhone Simulator/4.2 -name 83c74cc6-ca73-452d-b0a8-fbe2eceb0d2b.log
[INFO] Launching application in Simulator
[DEBUG] App Spec: <DTiPhoneSimulatorApplicationSpecifier 0x100303b50> specified by path /Users/micahalcorn/Dropbox/Titaniums/MyApp/build/iphone/build/Debug-iphonesimulator/MyApp.app
[DEBUG] SDK Root: <DTiPhoneSimulatorSystemRoot 0x100301c20> path=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk version=4.2 name=Simulator - iOS 4.2
[DEBUG] using device family iphone
[DEBUG] Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=2 UserInfo=0x100109d20 "Simulator session timed out."
Thanks for any suggestions.
— asked 3 years ago by Micah Alcorn
1 Comment
  • I restarted my machine and it warned me of an apparent simulator process that could not close and needed to be forced. This solved the problem, but I'm still not clear on why it was happening. Let me know if you have any ideas. Thanks!

    — commented 3 years ago by Micah Alcorn

3 Answers

Accepted Answer


下面的红字确实有大用

This fixed the problem for me:

1) Open simulator directly
2) From the menu: iOS Simulator -> Reset Content and Settings... then hit Reset 
3) re-run your project

好像 最好还是配置使用 ios 6.0的版本 又好像不需要

 

Have your restarted the system? I know it sounds weird (macs don't need to be rebooted!) but someone had a similar problem 5 months ago and that was his solution.

 

'reset content and settings' worked for me, no need to restart

— answered 2 years ago by Dan Orange
answer permalink
1 Comment
  • Didn't need to restart the system. Reset the simulator worked very well. Thanks, Dan.

    — commented 1 year ago by Filipa Faria

 

This seems to be a problem with the terminal. I had the same error message when I used iTerm or was running a tmux session. You have to run this from a vinilla Terminal.app instance. I don't know why. Seems to be a bug in ios-sim as well.

来自  https://developer.appcelerator.com/question/125275/simulator-session-timed-out
普通分类: