gingerbeur / google-cast-sdk

Automatically exported from code.google.com/p/google-cast-sdk
0 stars 0 forks source link

Cannot run apps with own app id #449

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Set up a sample app (like https://github.com/googlecast/CastHelloText-chrome) 
on your own server
2.Set up a new app in your developer console, pointing to your own hosting of 
the above sample app
3.Change the app id used in the sample app from the provided Google one to your 
own, from your own chromecast dev console
4.Cast the app to your chromecast

What is the expected output? What do you see instead?
Expected: the app works correctly, as it does when using the provided google 
app id
Actual: the app does not work correctly, and if I remote debug I get a bunch of 
errors (pasted below). The app works fine if I use the google app id. 

What version of the product are you using? On what operating system?
Using the latest Chrome 64-bit (39.0.2171.95) for OSX 10.10.1
Tried using the latest (14.1113.0.4) Chomecast extension beta and stable, same 
results with both
Please provide any additional information below.
Chromecast logs:
XMLHttpRequest cannot load 
chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js. Cross 
origin requests are only supported for HTTP. chromehellotext.html:1
XMLHttpRequest cannot load 
chrome-extension://dliochdbjfkdbacpmhlcpmleaejidimm/cast_sender.js. Cross 
origin requests are only supported for HTTP. chromehellotext.html:1
XMLHttpRequest cannot load 
chrome-extension://hfaagokkkhdbgiakmmlclaapfelnkoah/cast_sender.js. Cross 
origin requests are only supported for HTTP. chromehellotext.html:1
XMLHttpRequest cannot load 
chrome-extension://fmfcbgogabcbclcofgocippekhfcmgfj/cast_sender.js. Cross 
origin requests are only supported for HTTP. chromehellotext.html:1
XMLHttpRequest cannot load 
chrome-extension://enhhojjnijigcajfphajepfemndkmdlo/cast_sender.js. Cross 
origin requests are only supported for HTTP. chromehellotext.html:1
No cast extension found
Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to 
load 'chrome-extension://enhhojjnijigcajfphajepfemndkmdlo/cast_sender.js'. 
cast_sender.js:27
Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to 
load 'chrome-extension://fmfcbgogabcbclcofgocippekhfcmgfj/cast_sender.js'. 
cast_sender.js:27
Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to 
load 'chrome-extension://hfaagokkkhdbgiakmmlclaapfelnkoah/cast_sender.js'. 
cast_sender.js:27
Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to 
load 'chrome-extension://dliochdbjfkdbacpmhlcpmleaejidimm/cast_sender.js'. 
cast_sender.js:27
Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to 
load 'chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js'. 
cast_sender.js:27
Uncaught ReferenceError: chrome is not defined chromehellotext.html:56

From the beta Chromecast extension log window:
[1088.206s] [cv.TabMessenger] [INFO] Client disconnected client-20118
[1089.334s] [cv2.CastService] [INFO] Client init request
[1089.335s] [cv2.CastService] [INFO] Sending message to client 
client-5980:receiver_availability
[1090.936s] [cv2.CastService] [INFO] Request session
[1091.012s] [cv.PopupMenuService] [INFO] Popup request: init
[1091.023s] [cv2.CastService] [INFO] there are 1 receivers for cast protocol
[1092.149s] [cv.PopupMenuService] [INFO] Popup request: create_session
[1092.153s] [cv2.CastService] [INFO] Sending message to client 
client-5980:receiver_action
[1092.160s] [cv2.CastChannelService] [INFO] Channel is sending message
[1092.236s] [cv2.CastChannelService] [INFO] Got message LAUNCH_ERROR from 
rJMJtLjhIi8NsXmJ9DYjE2lNRqK0.
[1092.239s] [cv2.CastService] [INFO] Invalid destination
[1092.239s] [cv2.CastChannelService] [INFO] Got message RECEIVER_STATUS from 
rJMJtLjhIi8NsXmJ9DYjE2lNRqK0.
[1092.519s] [cv.RampDiscoveryService] [INFO] Discovering DIAL/RAMP activity 
now...
[1097.534s] [cv2.CastService] [INFO] Popup window closed.
[1097.540s] [cv2.CastService] [INFO] User closed popup menu; canceling request 
session
[1097.540s] [cv2.CastService] [INFO] Sending message to client client-5980:error
[1102.170s] [cv.BrowserIconManager] [INFO] Set icon to data/icon38_issue.png
[1102.172s] [cv2.CastService] [INFO] Sending message to client client-5980:error
[1102.177s] [browser] [SEVERE] Error: Uncaught Error: Timeout 
(chrome-extension://dliochdbjfkdbacpmhlcpmleaejidimm/background_script.js @ 
Line: 1742)

Original issue reported on code.google.com by ionpu...@gmail.com on 12 Dec 2014 at 3:59

GoogleCodeExporter commented 9 years ago
How are you loading cast_sender.js?  You can try doing this

<script type="text/javascript" 
src="//www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script>

Original comment by vadi...@google.com on 12 Dec 2014 at 11:33

GoogleCodeExporter commented 9 years ago
I'm using the exact same code from 
https://github.com/googlecast/CastHelloText-chrome, which uses what you are 
suggesting. The only change I make is to use my own app id.

Original comment by ionpu...@gmail.com on 13 Dec 2014 at 8:44

GoogleCodeExporter commented 9 years ago
Since you say that you see this output on your Chromecast:

XMLHttpRequest cannot load 
chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js. Cross 
origin requests are only supported for HTTP. chromehellotext.html:1

it tells me that your receiver app is pointing to a sender URL instead of a 
receiver. Please go to the Cast SDK developer console and make sure that the 
Receiver URL is pointing to a receiver application for your app id.

Original comment by vadi...@google.com on 15 Dec 2014 at 5:38

GoogleCodeExporter commented 9 years ago
Thanks - that was it. I didn't read the fine print, nor did I understand all 
the differences between the receiver and sender apps with regard to the 
samples. I was trying to set up the sender app as both the receiver and the 
sender. 

Thanks for decoding that error message for me :)

Original comment by ionpu...@gmail.com on 16 Dec 2014 at 4:41

GoogleCodeExporter commented 9 years ago
Feel free to close this :)

Original comment by ionpu...@gmail.com on 16 Dec 2014 at 4:43

GoogleCodeExporter commented 9 years ago

Original comment by and...@google.com on 16 Dec 2014 at 4:19