lileio / lile

Easily generate gRPC services in Go ⚡️
MIT License
1.51k stars 88 forks source link

Fix index out of range #19

Closed baopham closed 7 years ago

baopham commented 7 years ago

I get this error on the subscriber side when a message is received.

panic: runtime error: index out of range

goroutine 132 [running]:
github.com/lileio/lile/pubsub.Client.On.func2(0x1927b60, 0xc4203ba8a0, 0xc4203f2570, 0xf, 0xc4203ba720, 0xc4203f23d0, 0xa, 0xa, 0xc4203f2680, 0xc4203f2690, ...)
        /Users/baopham/Projects/Go/src/github.com/lileio/lile/pubsub/subscribe.go:81 +0x2b8
github.com/lileio/lile/pubsub/google.(*GoogleCloud).subscribe.func1.1(0x1fa5910, 0xc4203ba8a0, 0xc420246850)
        /Users/baopham/Projects/Go/src/github.com/lileio/lile/pubsub/google/google.go:160 +0x575
cloud.google.com/go/pubsub.(*Subscription).receive.func2(0xc4203d8f30, 0xc420409000, 0xc420246850, 0xc420388660, 0x1c90fc0, 0xc42034af00)
        /Users/baopham/Projects/Go/src/cloud.google.com/go/pubsub/subscription.go:392 +0xa2
created by cloud.google.com/go/pubsub.(*Subscription).receive
        /Users/baopham/Projects/Go/src/cloud.google.com/go/pubsub/subscription.go:393 +0x311
exit status 2

My subscriber is standard following README example https://github.com/lileio/lile#subscribing-to-events

baopham commented 7 years ago

Travis error:

No GOOGLE_PUBSUB_PROJECT_ID is set

Should not be related to my changes...

arbarlow commented 7 years ago

Hi @baopham, when would this occur? What function declaration would cause this?

baopham commented 7 years ago

Hi @arbarlow, sorry for not being clear. I updated the description to describe the error.