调试 Chromecast 应用程序时显示错误消息

use*_*094 5 javascript google-chrome google-cast chromecast google-cast-sdk

我有一个定制的 Chromecast 接收器无法工作,我正在尝试找出原因。当我从桌面上的 Chrome 投射到它时,我的应用程序在 Chromecast 上启动,但 Chromecast 对话框只显示Connecting...

\n\n

在此输入图像描述

\n\n

尽管我的应用程序确实在电视上正确启动,但发送者最终似乎超时并杀死了它。我收到以下错误消息:

\n\n
chrome.cast.Error\xc2\xa0{code: "session_error", description: null, details: null}\n
Run Code Online (Sandbox Code Playgroud)\n\n

所以我决定尝试通过转到 来调试它http://192.168.x.x:9222。该页面加载正常,但是当我单击Remote Debugging (AppEngine)链接时,我会被发送到一个空白页面https://chrome-devtools-frontend.appspot.com/serve_rev/........。在 Chrome 开发工具中我可以看到以下错误:

\n\n
\nshell.js:3123 Uncaught TypeError: document.registerElement is not a function\n    at Object.UI.registerCustomElement (shell.js:3123)\n    at shell.js:3135\n    at shell.js:3137\nUI.registerCustomElement @ shell.js:3123\n(anonymous) @ shell.js:3135\n(anonymous) @ shell.js:3137\ndevtools_app.js:2 Uncaught ReferenceError: SDK is not defined\n    at devtools_app.js:2\n(anonymous) @ devtools_app.js:2\ninspector.js:2 Uncaught ReferenceError: SDK is not defined\n    at inspector.js:2\n
Run Code Online (Sandbox Code Playgroud)\n\n

我使用的是具有固件版本的第一代 Chromecast1.36.159268\xe2\x80\x8b

\n\n

该错误似乎与此处描述的相同: Unable to Open Chrome Inspector & Debug Chromecast Custom Receiver

\n

小智 0

您可以使用旧版本的 Chromium - 找不到旧版本的 Chrome。

https://www.chromium.org/getting-involved/download-chromium (在“下载 Chrome / Chromium 的旧版本”下)

以下是其中一个示例(macOS 版本为 77): https: //www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Mac%2F668249%2Fchrome-mac.zip ? Generation =1560304902825342&alt=媒体