Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zgz757183190 opened this issue Oct 11, 2021 · 4 comments
Open

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

zgz757183190 opened this issue Oct 11, 2021 · 4 comments

Comments

@zgz757183190
Copy link

#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

@brocaar
Copy link
Owner

brocaar commented Oct 11, 2021

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 brocaar changed the title Help ! Help ! Help! (NS----rpc error! AS--- panic: runtime error: index out of range [0] with length 0) panic: runtime error: index out of range [0] with length 0 Oct 11, 2021
@brocaar
Copy link
Owner

brocaar commented Oct 12, 2021

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

@zgz757183190
Copy link
Author

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 ?

@brocaar
Copy link
Owner

brocaar commented Oct 18, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants