Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/43.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iOS应用程序获得一个;设备身份验证错误“;扫描Chromecast设备时_Ios_Iphone_Chromecast_Google Cast - Fatal编程技术网

iOS应用程序获得一个;设备身份验证错误“;扫描Chromecast设备时

iOS应用程序获得一个;设备身份验证错误“;扫描Chromecast设备时,ios,iphone,chromecast,google-cast,Ios,Iphone,Chromecast,Google Cast,我正在为Chromecast开发iOS sender应用程序。我安装了两台Chromecast设备,能够检测并连接到这两台设备,直到我切换到另一台测试iPhone,现在当我尝试扫描Chromecast设备时,deviceDidComeOnline消息从未发送 我能够通过GoogleCast框架的2.5.1版示例应用程序重现这个问题。以下是示例应用程序未能检测到Chromecast时的控制台输出: 2015-01-17 07:52:37.314 CastVideos[411:33216] Star

我正在为Chromecast开发iOS sender应用程序。我安装了两台Chromecast设备,能够检测并连接到这两台设备,直到我切换到另一台测试iPhone,现在当我尝试扫描Chromecast设备时,deviceDidComeOnline消息从未发送

我能够通过GoogleCast框架的2.5.1版示例应用程序重现这个问题。以下是示例应用程序未能检测到Chromecast时的控制台输出:

2015-01-17 07:52:37.314 CastVideos[411:33216] Start Scan
2015-01-17 07:52:37.315 CastVideos[411:33216] -[GCKDeviceScanner startNetServiceScan]  startNetServiceScan
2015-01-17 07:52:37.341 CastVideos[411:33216] -[GCKNetworkReachability updateStatus]  updateStatus
2015-01-17 07:52:37.345 CastVideos[411:33216] -[GCKDeviceScanner networkReachabilityStatusDidChange:]  networkReachabilityStatusDidChange:1
2015-01-17 07:52:37.345 CastVideos[411:33216] -[GCKDeviceScanner purgeAllOnlineDevices]  purgeAllOnlineDevices
2015-01-17 07:52:37.489 CastVideos[411:33216] -[GCKDeviceScanner startFilteringDevice:]  starting filter for device: <0x1780b0b60:GCKDevice> ChromecastDev2 (be1be9dcbaa4cb82678b977203c3ef91)
2015-01-17 07:52:37.494 CastVideos[411:33216] -[GCKDeviceScanner startFilteringDevice:]  starting filter for device: <0x1700a38a0:GCKDevice> ChromecastDev (3df5a88f22a974661a8a3556acafdd2f)
2015-01-17 07:52:37.629 CastVideos[411:33216] -[GCKCastSecureSocket continueHandshake]  Peer trust certificate invalid; disconnecting
2015-01-17 07:52:37.630 CastVideos[411:33216] -[GCKCastSecureSocket doTeardownWithErrorCode:]  doTeardownWithErrorCode:3
2015-01-17 07:52:37.630 CastVideos[411:33216] __42-[GCKCastSecureSocket initWithBufferSize:]_block_invoke18  Error reading from SSL buffer to stream buffer, status: -50
2015-01-17 07:52:37.630 CastVideos[411:33216] -[GCKCastSecureSocket doTeardownWithErrorCode:]  doTeardownWithErrorCode:1
2015-01-17 07:52:37.631 CastVideos[411:33216] -[GCKDeviceManager castSocket:didDisconnectWithError:]  castSocket:didDisconnectWithError:Error Domain=com.google.GCKError Code=3 "Device authentication failure" UserInfo=0x170272180 {NSLocalizedDescription=Device authentication failure}
2015-01-17 07:52:37.631 CastVideos[411:33216] -[GCKDeviceManager handleConnectionError:]  handleConnectionError error=Error Domain=com.google.GCKError Code=3 "Device authentication failure" UserInfo=0x170272180 {NSLocalizedDescription=Device authentication failure}, _appConnectionState=0
2015-01-17 07:52:37.631 CastVideos[411:33216] -[GCKDeviceManager handleConnectionError:]  giving up on reconnect; _pausedAppID=(null), _wasConnected=0
2015-01-17 07:52:37.632 CastVideos[411:33216] -[GCKDeviceManager unregisterForAppStateNotifications]  unregisterForAppStateNotifications
2015-01-17 07:52:37.634 CastVideos[411:33216] -[GCKDeviceManager disconnectWithError:isExplicit:]  disconnectWithError:(null)
2015-01-17 07:52:37.634 CastVideos[411:33216] -[GCKDeviceScanner filteringFailedForDevice:withError:]  Filter failed for device <0x1700a38a0:GCKDevice> ChromecastDev (3df5a88f22a974661a8a3556acafdd2f) with error Error Domain=com.google.GCKError Code=3 "Device authentication failure" UserInfo=0x170272180 {NSLocalizedDescription=Device authentication failure}
2015-01-17 07:52:37.634 CastVideos[411:33216] -[GCKDeviceScanner filteringFailedForDevice:withError:]  Marking device <0x1700a38a0:GCKDevice> ChromecastDev (3df5a88f22a974661a8a3556acafdd2f) invalid
2015-01-17 07:52:37.635 CastVideos[411:33216] -[GCKDeviceManager unregisterForAppStateNotifications]  unregisterForAppStateNotifications
2015-01-17 07:52:37.635 CastVideos[411:33216] -[GCKDeviceManager disconnectWithError:isExplicit:]  disconnectWithError:(null)
2015-01-17 07:52:37.635 CastVideos[411:33216] -[GCKCastSecureSocket disconnectWithError:]  disconnect
2015-01-17 07:52:37.314视频[411:33216]开始扫描
2015-01-17 07:52:37.315视频[411:33216]-[GCKDeviceScanner startNetServiceScan]startNetServiceScan
2015-01-17 07:52:37.341视频[411:33216]-[GCKNetworkReachability updateStatus]updateStatus
2015-01-17 07:52:37.345卡斯特视频[411:33216]-[GCKDeviceScanner networkReachabilityStatusDidChange:]networkReachabilityStatusDidChange:1
2015-01-17 07:52:37.345卡斯特视频[411:33216]-[GCKDeviceScanner PurgeAllonline设备]PurgeAllonline设备
2015-01-17 07:52:37.489 CastVideos[411:33216]-[GCKDeviceScanner startFilteringDevice:]启动设备的过滤器:ChromecastDev2(be1be9dcbaa4cb82678b977203c3ef91)
2015-01-17 07:52:37.494 CastVideos[411:33216]-[GCKDeviceScanner startFilteringDevice:]启动设备过滤器:ChromecastDev(3df5a88f22a974661a8a3556acafdd2f)
2015-01-17 07:52:37.629 CastVideos[411:33216]-[GCKCastSecureSocket continueHandshake]对等信任证书无效;断开
2015-01-17 07:52:37.630视频[411:33216]-[GCKCastSecureSocket doTeardownWithErrorCode:]doTeardownWithErrorCode:3
2015-01-17 07:52:37.630 CastVideos[411:33216]uu42-[GCKCastSecureSocket initWithBufferSize:][U block_invoke18从SSL缓冲区读取到流缓冲区时出错,状态:-50
2015-01-17 07:52:37.630视频[411:33216]-[GCKCastSecureSocket doTeardownWithErrorCode:]doTeardownWithErrorCode:1
2015-01-17 07:52:37.631 CastVideos[411:33216]-[GCKDeviceManager castSocket:didDisconnectWithError:]castSocket:didDisconnectWithError:Error Domain=com.google.GCKError Code=3“设备身份验证失败”UserInfo=0x170272180{NSLocalizedDescription=设备身份验证失败}
2015-01-17 07:52:37.631 CastVideos[411:33216]-[GCKDeviceManager handleConnectionError:]handleConnectionError=error Domain=com.google.GCKError Code=3“设备身份验证失败”UserInfo=0x170272180{NSLocalizedDescription=Device authentication failure},_appConnectionState=0
2015-01-17 07:52:37.631视频[411:33216]-[GCKDeviceManager handleConnectionError:]放弃重新连接_pausedAppID=(null),\u wasConnected=0
2015-01-17 07:52:37.632卡斯特视频[411:33216]-[GCKDeviceManager注销AppStateNotifications]注销AppStateNotifications
2015-01-17 07:52:37.634视频[411:33216]-[GCKDeviceManager disconnectWithError:isExplicit:]disconnectWithError:(空)
2015-01-17 07:52:37.634 CastVideos[411:33216]-[GCKDeviceScanner FilteringFailedfordice:withError:]设备ChromecastDev(3DF5A88F22A974661A8A3556AFDD2F)的过滤器失败,错误域=com.google.gckeror代码=3“设备身份验证失败”用户信息=0x170272180{本地化描述=设备身份验证失败}
2015-01-17 07:52:37.634 CastVideos[411:33216]-[GCKDeviceScanner filteringFailedForDevice:withError:]标记设备ChromecastDev(3DF5A88F22A974661A8A3556AFDD2F)无效
2015-01-17 07:52:37.635视频[411:33216]-[GCKDeviceManager注销AppStateNotifications]注销AppStateNotifications
2015-01-17 07:52:37.635视频[411:33216]-[GCKDeviceManager disconnectWithError:isExplicit:]disconnectWithError:(空)
2015-01-17 07:52:37.635卡斯特视频[411:33216]-[GCKCastSecureSocket disconnect WitherRor:]断开
这发生在运行iOS 8.0的iPhone 6+上。当我在此手机上打开其他与Chromecast兼容的应用程序(Chromecast、YouTube)时,两个Chromecast设备都被成功检测到。只是我在Xcode上运行的应用程序,就在这个特定的测试手机上,似乎有这个问题

我在其他几个测试设备上尝试了相同的示例应用程序,看看它是否与设备/操作系统有关。在以下iPhone/iPad上检测到两款Chromecast设备均未出现问题:

  • iOS 8.1.2上的iPhone 6
  • iOS 8.1.2上的iPhone 5
  • iOS 8.0.2上的iPhone 6+
  • iOS 8.0上的iPhone 5
  • iOS 8.0上的iPad Air
知道这是什么原因吗?
提前谢谢。

显然我使用的iPhone有证书问题

转到设置->常规->重置->重置所有设置修复了问题。
起初我尝试重置网络设置,但似乎没有帮助。不确定两者的结合是否是原因。

证书问题可能是由于手机上的无效日期造成的。检查日期时间是否正确,因为这可能会导致证书颁发,然后是Chromecast颁发

当设备上的时间和时间不正确时,我会遇到这种情况

当我更正日期时,它按预期工作