问题描述
我正在尝试在我的服务上运行Google Smarthome自动化测试。我测试可以正确检索服务的设备和特征。但是,当我开始测试时,什么也没有发生。没有超时,没有错误,什么都没有。
在我的网络浏览器开发人员看来,我从Google的测试套件应用中看到以下错误。会导致测试无法启动吗?这是我还是Google的问题?
ERROR a.split is not a function
Yh @ app_compiled.js?523e…-6feac3eecc6b:18199
Zh.handleError @ app_compiled.js?523e…-6feac3eecc6b:18199
next @ app_compiled.js?523e…-6feac3eecc6b:18335
f @ app_compiled.js?523e…-6feac3eecc6b:18316
g.ht @ app_compiled.js?523e…-6feac3eecc6b:18293
g.next @ app_compiled.js?523e…-6feac3eecc6b:18292
g.ba @ app_compiled.js?523e…-6feac3eecc6b:18290
g.next @ app_compiled.js?523e…-6feac3eecc6b:18290
g.next @ app_compiled.js?523e…-6feac3eecc6b:18295
Ln.emit @ app_compiled.js?523e…-6feac3eecc6b:18315
(anonymous) @ app_compiled.js?523e…-6feac3eecc6b:18320
u.vb @ app_compiled.js?523e…-6feac3eecc6b:18086
p.run @ app_compiled.js?523e…-6feac3eecc6b:18078
Nn.Aa @ app_compiled.js?523e…-6feac3eecc6b:18319
Nj @ app_compiled.js?523e…-6feac3eecc6b:18320
u.handleError @ app_compiled.js?523e…-6feac3eecc6b:18086
p.Zo @ app_compiled.js?523e…-6feac3eecc6b:18079
t.gi @ app_compiled.js?523e…-6feac3eecc6b:18088
p @ app_compiled.js?523e…-6feac3eecc6b:18115
q @ app_compiled.js?523e…-6feac3eecc6b:18115
load (async)
ia @ app_compiled.js?523e…-6feac3eecc6b:18108
u.Xg @ app_compiled.js?523e…-6feac3eecc6b:18086
mi @ app_compiled.js?523e…-6feac3eecc6b:18169
u.Xg @ app_compiled.js?523e…-6feac3eecc6b:18086
mi @ app_compiled.js?523e…-6feac3eecc6b:18083
u.Xg @ app_compiled.js?523e…-6feac3eecc6b:18086
p.Xg @ app_compiled.js?523e…-6feac3eecc6b:18080
p.Es @ app_compiled.js?523e…-6feac3eecc6b:18081
(anonymous) @ app_compiled.js?523e…-6feac3eecc6b:18111
(anonymous) @ app_compiled.js?523e…-6feac3eecc6b:18977
Show 36 more frames
解决方法
要在此处进行后续操作-我遇到的问题是,我使用了建议的定义来定义Sync请求(这是字符串的JSON区域)中的availableThermostatModes。
相反,系统要求我实现不赞成使用的表示格式,该格式是用逗号分隔的字符串。切换到不建议使用的格式后,套件即可运行。
请参阅:https://developers.google.com/assistant/smarthome/traits/temperaturesetting
用于两种格式。同样,我不得不使用不推荐使用的格式(不是推荐的最新格式)。