Cast connection timeout

2020-08-04 09:44发布

I have a custom receiver app (html page + js and css) that contains just an iframe for testing. I load the receiver app locally on the same Wi-Fi network as the ChromeCast. The thing is, it connects fine, then loads the iframe and everything is cool, but after a fix time of 21 secs (everytime), I get a error code 15 timeout. I've tried and set the maxInactivity to 6000 in appConfig, but made no difference. Any ideas what could possibly be wrong?

Worth mentioning is that I've also tried to put the receiver app on a domain and made no difference.

Edit: Adding some receiver logs, as requested. Note that probably half the times the debugger doesn't even show logs, but whatever... Below are all the logs the debugger produced, including some that aren't really useful for the problem at hand.

Failed to load resource: the server responded with a status of 404 (Not Found) - an image url
'HTMLHeadElement.profile' is deprecated. The reflected attribute has no effect.
[ 25.625s] [cast.receiver.CastReceiverManager] Version: 2.0.0.0025   cast_receiver.js:13  
[ 25.644s] [goog.net.WebSocket] Opening the WebSocket on ws://localhost:8008/v2/ipc   cast_receiver.js:13  
[ 26.674s] [goog.net.WebSocket] WebSocket opened on ws://localhost:8008/v2/ipc   cast_receiver.js:13
Received Ready event: {"id":"259E81C4","name":"Name","sessionId":"1B10E7DD-3345-44C1-9919-1086A718BB11","namespaces":["urn:x-cast:com.domain.app.debug"],"launchingSenderId":"1636:com.domain.app.debug-83"}   javascript.js:13 
Failed to load resource: net::ERR_CACHE_MISS  - a facebook url
Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME   about:blank
Failed to load resource: net::ERR_CACHE_MISS  - a google url
Modernizr 2.0.6 detected. This version is known to cause issues with async JavaScript loaders. Please upgrade to at least 2.6: http://modernizr.com/

Later Edit: Finally I could change the debug flag. Got more logs this way. Check below.

Failed to load resource: the server responded with a status of 404 (Not Found)   - an image url
cast.receiver.logger.setLevelValue(cast.receiver.LoggerLevel.DEBUG);  - changed the debug level
'HTMLHeadElement.profile' is deprecated. The reflected attribute has no effect.  -  (program):3
[ 27.075s] [cast.receiver.CastReceiverManager] Version: 2.0.0.0025
cast_receiver.js:13 [ 27.177s] [goog.net.WebSocket] Opening the WebSocket on ws://localhost:8008/v2/ipc   - cast_receiver.js:13
undefined
[ 28.360s] [goog.net.WebSocket] WebSocket opened on ws://localhost:8008/v2/ipc  - cast_receiver.js:13 
[ 28.368s] [cast.receiver.IpcChannel] IpcChannel opened  - cast_receiver.js:13
[ 28.378s] [cast.receiver.CastMessageBus] Dispatching CastMessageBus message  - cast_receiver.js:13
[ 28.391s] [cast.receiver.CastReceiverManager] Underlying message bus is open  - cast_receiver.js:13
[ 28.398s] [cast.receiver.IpcChannel] IPC message sent: {"namespace":"urn:x-cast:com.google.cast.system","senderId":"SystemSender","data":"{\"type\":\"ready\",\"statusText\":\"Ready to cast\",\"activeNamespaces\":[\"urn:x-cast:com.domain.app.debug\"],\"version\":\"2.0.0\",\"messagesVersion\":\"1.0\"}"}  - cast_receiver.js:13
[ 28.415s] [cast.receiver.IpcChannel] IPC message sent: {"namespace":"urn:x-cast:com.google.cast.system","senderId":"SystemSender","data":"{\"type\":\"startheartbeat\",\"maxInactivity\":6000}"}  - cast_receiver.js:13
[ 28.448s] [cast.receiver.IpcChannel] Received message: {"data":"{\"applicationId\":\"259E81C4\",\"applicationName\":\"Name\",\"deviceCapabilities\":\"{\\\"display_supported\\\":true}\",\"launchingSenderId\":\"1715:com.domain.app.debug-85\",\"messagesVersion\":\"1.0\",\"sessionId\":\"E41CEBAC-D938-479E-B278-A468F33EC597\",\"type\":\"ready\",\"version\":\"1.12.27946\"}","namespace":"urn:x-cast:com.google.cast.system","senderId":"SystemSender"}  - cast_receiver.js:13
[ 28.462s] [cast.receiver.CastMessageBus] Dispatching CastMessageBus message  - cast_receiver.js:13
[ 28.483s] [cast.receiver.CastReceiverManager] Dispatching CastReceiverManager system ready event  - cast_receiver.js:13
Received Ready event: {"id":"259E81C4","name":"Name","sessionId":"E41CEBAC-D938-479E-B278-A468F33EC597","namespaces":["urn:x-cast:com.domain.app.debug"],"launchingSenderId":"1715:com.domain.app.debug-85"}  - javascript.js:13
[ 28.509s] [cast.receiver.IpcChannel] IPC message sent: {"namespace":"urn:x-cast:com.google.cast.system","senderId":"SystemSender","data":"{\"type\":\"setappstate\",\"statusText\":\"Application status is ready...\"}"}   - cast_receiver.js:13
Modernizr 2.0.6 detected. This version is known to cause issues with async JavaScript loaders. Please upgrade to at least 2.6: http://modernizr.com/  - rocket.js:4
[ 59.433s] [cast.receiver.CastReceiverManager] Dispatching shutdown event    - cast_receiver.js:13

EDIT: The only logs from the Android sender app:

04-18 23:06:48.373  29127-29127/com.app.debug D/MainActivity﹕ ApplicationConnectionResultCallback.onResult: statusCode15
04-18 23:06:48.373  29127-29127/com.app.debug E/MainActivity﹕ application could not launch
04-18 23:06:48.373  29127-29127/com.app.debug D/MainActivity﹕ teardown

0条回答
登录 后发表回答