Xcode Error: The service is invalid (0XE8000022) 解决方法

Xcode Error: The service is invalid (0XE8000022)

真机调试时遇上如下情况:

The service is invalid

Please check your setup and try again

(0XE8000022)

这个未越狱设备的解决方法, 很不凑效,未越狱的可能要抹掉数据恢复设置了:

解决办法:

Xcode and the GDB connection is quite temperamental. The device and your Mac can become unsynchronised with each other. My checklist for this sort of thing:

  • Restart Xcode.
  • Delete the .app from your iOS device, do a Clean then Rebuild.
  • Disconnect, reconnect device.
  • Restart iOS device (90% of the time it fixes things)
  • If all else fails, restart your Mac (unlikely but it did fix an issue once for me).

参考:http://stackoverflow.com/questions/2160299/error-the-service-is-invalid

 

但是对于恢复设备这种最有效却很弱的方法是很坑的,要折腾很久,还要担心资料损失

下面介绍我的解决方法,

设备连接Mac,Xcode的Organizer中找到设备,

然后在设备的Console里面就有设备连接不上的报错日志:

Apr 5 14:14:38 shoukaikokorotobira installd[47] <Error>: 0x1583000 filter_attributes: Info.plist keys requested via MobileInstallationLookup/Browse in client Xcode (via mobile_installation_proxy) were not found in MobileInstallation's cache. Please file a bug requesting that these keys be added: <CFBasicHash 0x1ee75da0 [0x39d76100]>{type = mutable set, count = 18, entries => 0 : <CFString 0x39d629f4 [0x39d76100]>{contents = "CFBundlePackageType"} 1 : <CFString 0x1ee2da20 [0x39d76100]>{contents = "BuildMachineOSBuild"} 2 : <CFString 0x39d63a44 [0x39d76100]>{contents = "CFBundleResourceSpecification"} 3 : <CFString 0x1ee75880 [0x39d76100]>{contents = "DTPlatformBuild"} 4 : <CFString 0x39d60794 [0x39d76100]>{contents = "DTCompiler"} 5 : <CFString 0x39d62564 [0x39d76100]>{contents = "CFBundleSignature"} 6 : <CFString 0x39d63224 [0x39d76100]>{contents = "DTSDKName"} 7 : <CFString 0x1ee75920 [0x39d76100]>{contents = "NSBundleResolvedPath"} 8 : <CFString 0x39d5feb4 [0x39d76100]>{contents = "UISupportedInterfaceOrientations"} 10 : <CFString 0x39d67e84 [0x39d76100]>{contents = "DTXcode"} 13 : <CFString 0x39d67eb4 [0x39d76100]>{contents = "CFBundleInfoDictionaryVersion"} 16 : <CFString 0x39d65304 [0x39d76100]>{contents = "CFBundleSupportedPlatforms"} 17 : <CFString 0x1ee758c0 [0x39d76100]>{contents = "DTXcodeBuild"} 18 : <CFString 0x1ee75a80 [0x39d76100]>{contents = "UIStatusBarTintParameters"} 19 : <CFString 0x39d63e54 [0x39d76100]>{contents = "DTPlatformVersion"} 20 : <CFString 0x39d66bf4 [0x39d76100]>{contents = "DTPlatformName"} 21 : <CFString 0x39d67c84 [0x39d76100]>{contents = "CFBundleDevelopmentRegion"} 22 : <CFString 0x1ee758a0 [0x39d76100]>{contents = "DTSDKBuild"} }

Apr 5 14:14:38 shoukaikokorotobira lockbot[525] <Notice>: 3b6eeb88 __spawn_agent_block_invoke_0: Unable to spawn /Developer/Library/Daemons/DTFetchSymbols:13 Permission denied

Apr 5 14:14:38 shoukaikokorotobira lockdownd[45] <Notice>: 01581000 lockbot_spawn_agent: lockbot returned an error: SpawnFailed

Apr 5 14:14:38 shoukaikokorotobira lockdownd[45] <Notice>: 01581000 spawn_service_agent: Could not spawn service agent via lockbot

Apr 5 14:14:38 shoukaikokorotobira lockdownd[45] <Notice>: 01581000 spawn_and_handle_checkin: Could not spawn the com.apple.dt.fetchsymbols service agent:InvalidService

 

 

看到这里就知道原因了,是连接Gdb服务获取设备号的可执行文件的权限变了,Deamon进程启动不了, 

我的iPad是越狱的很容易就修复了,无需重启

在iPad终端(越狱的可以去Cydia安装)里面进入终端输入命令即可

(无终端的话可以用ssh连接iPhone, 用户名:root,密码:alpine)

chmod  a+x  /Developer/Library/Daemons/*

收工可以继续连Xcode调试玩了,

posted on 2014-04-05 14:48  不追浮云的人  阅读(1797)  评论(0编辑  收藏  举报

导航