VGO error, and go-app-sdk error

I’t trying to get go working to access TTN’s application server. According to instructions, vgo is recommended:
To avoid issues with incompatible dependencies, we recommend using vgo.
I’m on Ubuntu 18.04:

go version
go version go1.11.1 linux/amd64
Following instructions:
go get -u The Go Programming Language
However, typing
vgo -v
go requires Go 1.10 but VGOROOT=/usr/lib/go-1.11 is not a Go 1.10 source tree

Is vgo broken for go1.11.1? I then attempted without vgo which also failed (see below). Are there any suggestions on how to get started using go for accessing applications? Thank you.

go get -u GitHub - TheThingsArchive/go-app-sdk: The Things Network V2 Application SDK for Go

github.com/TheThingsNetwork/api/protocol/lorawan

…/…/TheThingsNetwork/api/protocol/lorawan/message_conversion.go:57:26: cannot use cmd.MACCommand() (type lorawan.MACCommand) as type lorawan.Payload in append:
lorawan.MACCommand does not implement lorawan.Payload (UnmarshalBinary method has pointer receiver)
…/…/TheThingsNetwork/api/protocol/lorawan/message_conversion.go:83:58: cannot use cmd (type lorawan.Payload) as type lorawan.MACCommand in argument to MACCommandFromMACCommand
…/…/TheThingsNetwork/api/protocol/lorawan/message_conversion.go:101:5: mac.AppEUI undefined (type lorawan.JoinRequestPayload has no field or method AppEUI)
…/…/TheThingsNetwork/api/protocol/lorawan/message_conversion.go:103:33: cannot convert m.DevNonce (type “github.com/TheThingsNetwork/ttn/core/types”.DevNonce) to type lorawan.DevNonce
…/…/TheThingsNetwork/api/protocol/lorawan/message_conversion.go:110:40: payload.AppEUI undefined (type *lorawan.JoinRequestPayload has no field or method AppEUI)
…/…/TheThingsNetwork/api/protocol/lorawan/message_conversion.go:112:36: cannot convert payload.DevNonce (type lorawan.DevNonce) to type “github.com/TheThingsNetwork/ttn/core/types”.DevNonce
…/…/TheThingsNetwork/api/protocol/lorawan/message_conversion.go:124:5: mac.AppNonce undefined (type lorawan.JoinAcceptPayload has no field or method AppNonce)
…/…/TheThingsNetwork/api/protocol/lorawan/message_conversion.go:124:17: undefined: lorawan.AppNonce
…/…/TheThingsNetwork/api/protocol/lorawan/message_conversion.go:125:5: mac.NetID undefined (type lorawan.JoinAcceptPayload has no field or method NetID)
…/…/TheThingsNetwork/api/protocol/lorawan/message_conversion.go:132:17: cannot use m.CFList.Freq[0] (type uint32) as type lorawan.Payload in field value:
uint32 does not implement lorawan.Payload (missing MarshalBinary method)
…/…/TheThingsNetwork/api/protocol/lorawan/message_conversion.go:132:17: too many errors

This is a known issue. On Github I suggested the following go.mod. Others have had success with it.

module yourmodule

replace github.com/brocaar/lorawan => github.com/ThethingsIndustries/legacy-lorawan-lib v0.0.0-20190212122748-b905ab327304

require github.com/TheThingsNetwork/go-app-sdk v0.0.0-20190212125043-3c550464b536

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.