Problems upgrading from 0.26.1 to 3.0.0


#1

I am on Ubuntu and let apt update from 0.26.1 to 3.0.0 and I am seeing some problems that I’m not sure how to get past.

Some devices are reporting in, but most are throwing errors, here is a sample error:

Jun 05 18:50:48 ip-10-200-42-36 loraserver[4679]: time=“2019-06-05T18:50:48Z” level=info msg=“gateway/mqtt: uplink frame received”

Jun 05 18:50:48 ip-10-200-42-36 loraserver[4679]: time=“2019-06-05T18:50:48Z” level=warning msg=“get device-sessions for dev_addr error: gob decode error: gob: wrong type (lorawan.AES128Key) for received field DeviceSession.NwkSKey” dev_addr=4bfda5e2 dev_eui=0e7e346433309dbb

Jun 05 18:50:48 ip-10-200-42-36 loraserver[4679]: time=“2019-06-05T18:50:48Z” level=error msg=“processing uplink frame error” data_base64=QOKl/UuAGRseG/kxe7hFbDYxtRxujRpj error=“get device-session error: device-session does not exist or invalid fcnt or mic”

Jun 05 18:50:52 ip-10-200-42-36 loraserver[4679]: time=“2019-06-05T18:50:52Z” level=error msg=“finished unary call with code Unknown” error=“rpc error: code = Unknown desc = gob: wrong type (lorawan.AES128Key) for received field DeviceSession.NwkSKey” grpc.code=Unknown grpc.method=GetDeviceActivation grpc.service=ns.NetworkServerService grpc.start_time=“2019-06-05T18:50:52Z” grpc.time_ms=0.32 peer.address=“127.0.0.1:43076” span.kind=server system=grpc

It appears that if I can get the device to re-register via OTAA then it is OK, but I have many devices in the field and getting them to re-authenticate will be a problem.


#2

I would not recommend upgrading from 0.x to 3.x directly. Please see the changelog for each component for the steps to upgrade to the next major version. E.g. from latest 0.x -> latest 1.x -> latest 2.x -> latest 3.x. When going straight from 0.x -> latest 3.x, you might miss some data-migrations, causing the errors you are experiencing.