chirpstack-network-server icon indicating copy to clipboard operation
chirpstack-network-server copied to clipboard

panic: runtime error: index out of range [0] with length 0

Open zgz757183190 opened this issue 3 years ago • 4 comments

#NS----rpc error!

time level=info msg="sent uplink meta-data to network-controller" ctx_id=7756f497-a079-488c-9907-989b29e068e7 dev_eui=5b00000000000036 time level=info msg="pending mac-command deleted" cid=LinkADRReq ctx_id=7756f497-a079-488c-9907-989b29e068e7 dev_eui=5b00000000000036 time level=info msg="2021/10/09 05:44:34maccommand/maccommand" block="{LinkADRReq false [{LinkADRReq 0xc0004f8250}]}" time level=warning msg="link_adr request not acknowledged" channel_mask_ack=false ctx_id=7756f497-a079-488c-9907-989b29e068e7 data_rate_ack=true dev_eui=5b00000000000036 power_ack=true time level=info msg="device gateway rx-info meta-data saved" ctx_id=7756f497-a079-488c-9907-989b29e068e7 dev_eui=5b00000000000036 time level=info msg=storage/device_session/SaveDeviceSession exp/ms=2678400000 time level=info msg="device-session saved" ctx_id=7756f497-a079-488c-9907-989b29e068e7 dev_addr=5b000036 dev_eui=5b00000000000036 time level=warning msg="finished client unary call" ctx_id=7756f497-a079-488c-9907-989b29e068e7 error="rpc error: code = Unavailable desc = transport is closing" grpc.code=Unavailable grpc.ctx_id=360fda0c-b0d4-4732-b572-7084239e4281 grpc.duration=19.507603ms grpc.method=HandleUplinkData grpc.service=as.ApplicationServerService span.kind=client system=grpc time level=error msg="publish uplink data to application-server error" ctx_id=7756f497-a079-488c-9907-989b29e068e7 error="rpc error: code = Unavailable desc = transport is closing" time level=warning msg="grpc: addrConn.createTransport failed to connect to {127.0.0.1:8001 0 }. Err :connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:8001: connect: connection refused". Reconnecting..."

#AS-panic: runtime error: index out of range [0] with length 0

time="2021-10-09T17:44:34+08:00" level=info msg="device last-seen and dr updated" ctx_id=360fda0c-b0d4-4732-b572-7084239e4281 dev_eui=5b00000000000036 time="2021-10-09T17:44:34+08:00" level=info msg="events/uplink/uplink decryptPayload" data="[]" decrypted_data="[]" panic: runtime error: index out of range [0] with length 0

zgz757183190 avatar Oct 11 '21 05:10 zgz757183190

I appreciate that you are posting a bugreport, but could you please use the provided bug-report template? That saves us a lot of time in reproducing the issue and fixing the bug. E.g. which versions are you using and how can this be re-produces?

As well, a panic usually causes a stacktrace to be printed. Could you please share this too?

brocaar avatar Oct 11 '21 09:10 brocaar

Did you make any modifications to the code? As far as I'm aware of, there is no such log in the brocaar/chirpstack-application-server code:

time="2021-10-09T17:44:34+08:00" level=info msg="events/uplink/uplink decryptPayload" data="[]" decrypted_data="[]"

https://github.com/brocaar/chirpstack-application-server/search?q=decryptPayload

brocaar avatar Oct 12 '21 10:10 brocaar

vsersion:

chirpstack-application-server_3.9.0 chirpstack-gateway-bridge_3.8.0 chirpstack-network-server_3.8.0

OMG, Is this problem caused by inconsistent versions ?

zgz757183190 avatar Oct 13 '21 08:10 zgz757183190

Thanks for providing the versions. Couple of questions:

  1. I can not find any log in the code that prints msg="events/uplink/uplink decryptPayload". Did you make modifications to the code?
  2. A panic usually causes a stacktrace to be printed. Could you please share this too? Your log doesn't provide enough information about what is causing the panic. Also you didn't provide any steps how this can be reproduced.

brocaar avatar Oct 18 '21 10:10 brocaar