【发布时间】:2017-12-27 18:19:17
【问题描述】:
我正在尝试让sample auth linking Roku channel 工作。我已经在我的 Roku 棒上安装了通道,设置了用于生成和验证令牌的端点,但无法使断开连接端点工作。 Roku Developer Documentation on Authentication and Linking 也无用,因为该页面上的响应与我必须从我的应用程序实际返回的响应不匹配。
我的断开连接代码如下所示:
sub parseDis(job as object)
result = job.context.context.response
json = parseJSON(result.content)
if json.success = "no"
m.top.disconnect = false
else
m.top.disconnect = true
end if
end sub
所以从我的应用程序中,我返回了一个如下所示的 JSON 响应:
{
"success": "yes"
}
但在 Telnet 调试控制台会话中,我得到以下输出:
Suspending threads...
Thread selected: 2* ...:/components/RegistryTask.xml(55)
Current Function:
052: sec.Write(key, val)
Function RegWrite(key, val, section=invalid)
053: if section = invalid then section = "Default"
054: sec = CreateObject("roRegistrySection", section)
055:* sec.Write(key, val)
056: sec.Flush() 'commit it
057: End Function
Type Mismatch. (runtime error &h18) in pkg:/components/RegistryTask.xml(55)
055: sec.Write(key, val)
Backtrace:
#1 Function regwrite(key As Dynamic, val As Dynamic) As Dynamic
file/line: pkg:/components/RegistryTask.xml(55)
#0 Function go() As Void
file/line: pkg:/components/RegistryTask.xml(35)
Local Variables:
key roString refcnt=3 val:"UNIQUE_ID_HERE3500X"
val Invalid
section String (VT_STR_CONST) val:"Default"
global Interface:ifGlobal
m roAssociativeArray refcnt=3 count:3
sec bsc:roRegistrySection refcnt=1
Threads:
ID Location Source Code
0 pkg:/source/main.brs(15) msg = wait(0, m.port)
1 pkg:/components/SimpleScene.brs(78) oauth_token: invalid
2* ...:/components/RegistryTask.xml(55) sec.Write(key, val)
3[u] ??
*selected [u]unattached(not debuggable)
任何人都可以帮助我破译发生了什么和出了什么问题?
【问题讨论】:
标签: roku brightscript