在Linux上使用gaction更新Google Home / Assistant软件包时,Golang运行时恐慌? [英] Golang runtime panic when using gaction on Linux to update Google Home/Assistant package?

查看:271
本文介绍了在Linux上使用gaction更新Google Home / Assistant软件包时,Golang运行时恐慌?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用本教程中的指令在Linux 14.04 LTS框(不是Windows)上构建我的第一个Google Home应用程序:

  https://medium.com/google-cloud/building-your-first-action-for-google-home-in-30-minutes-ec6c65b7bd32 

将我的应用程序部署到Google Cloud成功。但是,当我到达使用模拟器测试应用程序的部分时,以下 gactions 命令会失败,并显示消息没有帮助主题进行预览/模拟。

  $ gactions预览--action_package action.json --invocation_name三扇门--preview_mins 1234 

没有帮助主题进行预览

和:

  $ gactions模拟

没有'模拟'的帮助主题



<然后,我尝试切换到模拟器的Google操作说明:

  https://developers.google.com/ actions / tools / simulator 

该文档指示我使用以下命令上传我的Actions项目:

  $ gactions update --action_package action.json --project three-doors-9898 

但是,这会导致Golang恐慌崩溃,下面的堆栈跟踪:

$ $ p $ panic:运行时错误:无效内存地址或nil指针解除引用[已恢复]
panic:运行时错误:无效内存地址或零指针解引用
[信号SIGSEGV:分段违规代码= 0x1 addr = 0x0 pc = 0x506df6]

goroutine 1 [正在运行]:
github.com/urfave/ cli.HandleAction.func1(0xc4200fd208)
/usr/local/google/home/gkal/code/go/src/github.com/urfave/cli/app.go:478 + 0x27a
panic( 0x737b00,0x960720)
/usr/lib/google-golang/src/runtime/panic.go:491 + 0x283
github.com/Jeffail/gabs.(*Container).Bytes(0x0,0x0 ,0x0,0x3000100)
/usr/local/google/home/gkal/code/go/src/github.com/Jeffail/gabs/gabs.go:459 + 0x26
github.com/Jeffail /gabs.(*Container).String(0x0,0xc420123350,0x793672)
/usr/local/google/home/gkal/code/go/src/github.com/Jeffail/gabs/gabs.go:483 + 0x2b
main.getLocaleFromActionPackage(0xc4203a60a0,0xb,0xc4203a60a0)
/ usr / local / google / home / gkal / code / go /src/github.com/gkaldevrel/cli/gactions/gactions.go:605 + 0xdf
main.commandUpdate.func1(0xc42008cf00)
/ usr / local / google / home / gkal / code / go /src/github.com/gkaldevrel/cli/gactions/gactions.go:726 + 0x209
reflect.Value.call(0x717fa0,0x7a9988,0x13,0x793011,0x4,0xc4200fd1c8,0x1,0x1,0xc4200fd150,0x788860, ...)
/usr/lib/google-golang/src/reflect/value.go:434+ 0x906
reflect.Value.Call(0x717fa0,0x7a9988,0x13,0xc4200fd1c8,0x1,0x1, 0x614896,0x7930f1,0x4)
/usr/lib/google-golang/src/reflect/value.go:302 + 0xa4
github.com/urfave/cli.HandleAction(0x717fa0,0x7a9988,0xc42008cf00, 0x0,0x0)
/usr/local/google/home/gkal/code/go/src/github.com/urfave/cli/app.go:487 + 0x17a
github.com/urfave/ cli.Command.Run(0x793732,0x6,0x0,0x0,0x0,0x0,0x0,0x7a4928,0x4b,0x0,...)
/ usr / local / google / home / gkal / code / go / src /github.com/urfave/cli/command.go:191 + 0x9fd
github.com/urfave/cli.(*App).Run(0xc420001080,0xc42000e0c0,0x6,0 x6,0x0,0x0)
/usr/local/google/home/gkal/code/go/src/github.com/urfave/cli/app.go:240+ 0x57d
github.com/ urfave / cli。(* App).RunAndExitOnError(0xc420001080)
/usr/local/google/home/gkal/code/go/src/github.com/urfave/cli/app.go:257 + 0x53
main.main()
/usr/local/google/home/gkal/code/go/src/github.com/gkaldevrel/cli/gactions/gactions.go:157 + 0xa02

下面是我的包文件( action.json ),我使用JSON进行了验证验证者:

  {
versionLabel:1.0,
agentInfo:{
languageCode:en-US,
projectId:three-doors-9898,
voiceName:male_1
},
行动:[{
description:启动意图,
initialTrigger:{
intent:assistant.intent.action.MAIN
},
httpExecution:{
url:https://us-central1-three-doors-9898.cloudfu nctions.net/three_doors

}]
}

我该如何解决这个问题并让我的Google Home / Assistant应用程序正常工作?

更新 版本 >我使用的是来自这里的:



我使用此页上的 Linux / x86_64 链接获取它:



https://developers.google.com/actions / tools / gactions-cli

这可能是我系统的错误版本吗?我正在运行Ubuntu 14.04 LTS,64位版本。

解决方案

有一个新的gactions版本可用。试试 gactions selfupdate



如果由于版本损坏而无法使用,请下载旧版本并运行它。这个旧版本然后更新到2.1.1,一切都可以再次运行。


I am trying to build my first Google Home app using the instructions in this tutorial, on a Linux 14.04 LTS box (not Windows):

https://medium.com/google-cloud/building-your-first-action-for-google-home-in-30-minutes-ec6c65b7bd32

The deployment of my app to Google Cloud succeeds. However, when I get to the section where you test your app with the simulator, the following gactions commands fail with the message "No help topic for preview/simulate"

$ gactions preview --action_package action.json --invocation_name "three doors" --preview_mins 1234

No help topic for 'preview'

And:

$ gactions simulate

No help topic for 'simulate'

I then tried switching to the Google Actions instructions for the simulator here:

https://developers.google.com/actions/tools/simulator

That document instructs me to use the following command to upload my Actions project:

$ gactions update --action_package action.json --project three-doors-9898

But that leads to a Golang panic crash with the following stack trace:

    panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x506df6]

goroutine 1 [running]:
github.com/urfave/cli.HandleAction.func1(0xc4200fd208)
    /usr/local/google/home/gkal/code/go/src/github.com/urfave/cli/app.go:478 +0x27a
panic(0x737b00, 0x960720)
    /usr/lib/google-golang/src/runtime/panic.go:491 +0x283
github.com/Jeffail/gabs.(*Container).Bytes(0x0, 0x0, 0x0, 0x3000100)
    /usr/local/google/home/gkal/code/go/src/github.com/Jeffail/gabs/gabs.go:459 +0x26
github.com/Jeffail/gabs.(*Container).String(0x0, 0xc420123350, 0x793672)
    /usr/local/google/home/gkal/code/go/src/github.com/Jeffail/gabs/gabs.go:483 +0x2b
main.getLocaleFromActionPackage(0xc4203a60a0, 0xb, 0xc4203a60a0)
    /usr/local/google/home/gkal/code/go/src/github.com/gkaldevrel/cli/gactions/gactions.go:605 +0xdf
main.commandUpdate.func1(0xc42008cf00)
    /usr/local/google/home/gkal/code/go/src/github.com/gkaldevrel/cli/gactions/gactions.go:726 +0x209
reflect.Value.call(0x717fa0, 0x7a9988, 0x13, 0x793011, 0x4, 0xc4200fd1c8, 0x1, 0x1, 0xc4200fd150, 0x788860, ...)
    /usr/lib/google-golang/src/reflect/value.go:434 +0x906
reflect.Value.Call(0x717fa0, 0x7a9988, 0x13, 0xc4200fd1c8, 0x1, 0x1, 0x614896, 0x7930f1, 0x4)
    /usr/lib/google-golang/src/reflect/value.go:302 +0xa4
github.com/urfave/cli.HandleAction(0x717fa0, 0x7a9988, 0xc42008cf00, 0x0, 0x0)
    /usr/local/google/home/gkal/code/go/src/github.com/urfave/cli/app.go:487 +0x17a
github.com/urfave/cli.Command.Run(0x793732, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7a4928, 0x4b, 0x0, ...)
    /usr/local/google/home/gkal/code/go/src/github.com/urfave/cli/command.go:191 +0x9fd
github.com/urfave/cli.(*App).Run(0xc420001080, 0xc42000e0c0, 0x6, 0x6, 0x0, 0x0)
    /usr/local/google/home/gkal/code/go/src/github.com/urfave/cli/app.go:240 +0x57d
github.com/urfave/cli.(*App).RunAndExitOnError(0xc420001080)
    /usr/local/google/home/gkal/code/go/src/github.com/urfave/cli/app.go:257 +0x53
main.main()
    /usr/local/google/home/gkal/code/go/src/github.com/gkaldevrel/cli/gactions/gactions.go:157 +0xa02

Below is my package file (action.json), which I did validate with a JSON validator:

{
    "versionLabel": "1.0",
    "agentInfo": {
        "languageCode": "en-US",
        "projectId": "three-doors-9898",
        "voiceName": "male_1"
    },
    "actions": [{
        "description": "Launch intent",
        "initialTrigger": {
            "intent": "assistant.intent.action.MAIN"
        },
        "httpExecution": {
            "url": "https://us-central1-three-doors-9898.cloudfunctions.net/three_doors"
        }
    }]
}

How can I fix this and get my Google Home/Assistant app working?

UPDATE: The version of gactions I am using came from here:

I used the Linux/x86_64 link on this page to get it:

https://developers.google.com/actions/tools/gactions-cli .

Is it possible that's the wrong version for my system? I'm running Ubuntu 14.04 LTS, 64-bit version.

解决方案

There is a new gactions version available. Try gactions selfupdate.

If that's not working because the version is broken, download the old version and run it. This old version then updates to 2.1.1 and everything works again.

这篇关于在Linux上使用gaction更新Google Home / Assistant软件包时,Golang运行时恐慌?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆