TheThingsNetwork / lorawan-stack

The Things Stack, an Open Source LoRaWAN Network Server
https://www.thethingsindustries.com/stack/
Apache License 2.0
979 stars 308 forks source link

Batch Import Issue #6410

Closed sascha-hemi closed 1 year ago

sascha-hemi commented 1 year ago

Summary

Hey, I'm currently trying to import 25 devices via JSON and CSV, and I'm encountering the following error:

There was an error and the operation could not be completed An unknown error occurred. Please try again later.

Converting end device templates… { "end_device": { "ids": { "device_id": "lstm230700016", "dev_eui": "2CF7F12042000795", "join_eui": "0000000000000000" }, "name": "lstm230700016", "version_ids": { "band_id": "EU_863_870" }, "supports_class_c": true, "lorawan_version": "MAC_V1_0_2", "lorawan_phy_version": "PHY_V1_0_2_REV_B", "frequency_plan_id": "EU_863_870_TTN", "supports_join": true, "root_keys": { "app_key": { "key": "FF7A514D363D1EE2FFA0D95DF7E74152" } } }, "field_mask": { "paths": [ "ids.device_id", "ids.dev_eui", "ids.join_eui", "name", "frequency_plan_id", "lorawan_version", "lorawan_phy_version", "root_keys.app_key.key", "supports_join", "version_ids.band_id", "supports_class_c" ] } } undefined {}

Import process cancelled due to error.

Steps to Reproduce

Use my JSON or CSV

JSON: { "ids": { "device_id": "lstm230700016", "dev_eui": "2CF7F12042000795", "join_eui": "0000000000000000" }, "name": "lstm230700016", "lorawan_version": "MAC_V1_0_2", "lorawan_phy_version": "RP001_V1_0_2_REV_B", "frequency_plan_id": "EU_863_870_TTN", "supports_join": true, "supports_class_c": true, "root_keys": { "app_key": { "key": "FF7A514D363D1EE2FFA0D95DF7E74152" } } } { "ids": { "device_id": "lstm230700017", "dev_eui": "2CF7F1204200098D", "join_eui": "0000000000000000" }, "name": "lstm230700017", "lorawan_version": "MAC_V1_0_2", "lorawan_phy_version": "RP001_V1_0_2_REV_B", "frequency_plan_id": "EU_863_870_TTN", "supports_join": true, "supports_class_c": true, "root_keys": { "app_key": { "key": "BZEVVH5Z9L9T8ZMDXJ3RDCFQTQLLF6BQ" } } }

CSV: id;dev_eui;join_eui;name;frequency_plan_id;lorawan_version;lorawan_phy_version;app_key;band_id;supports_class_c lstm230700016;2CF7F12042000795;0000000000000000;lstm230700016;EU_863_870_TTN;MAC_V1_0_2;RP001_V1_0_2_REV_B;FF7A514D363D1EE2FFA0D95DF7E74152;EU_863_870;true lstm230700017;2CF7F1204200098D;0000000000000000;lstm230700017;EU_863_870_TTN;MAC_V1_0_2;RP001_V1_0_2_REV_B;BZEVVH5Z9L9T8ZMDXJ3RDCFQTQLLF6BQ;EU_863_870;true

Current Result

Converting end device templates… { "end_device": { "ids": { "device_id": "lstm230700016", "dev_eui": "2CF7F12042000795", "join_eui": "0000000000000000" }, "name": "lstm230700016", "version_ids": { "band_id": "EU_863_870" }, "supports_class_c": true, "lorawan_version": "MAC_V1_0_2", "lorawan_phy_version": "PHY_V1_0_2_REV_B", "frequency_plan_id": "EU_863_870_TTN", "supports_join": true, "root_keys": { "app_key": { "key": "FF7A514D363D1EE2FFA0D95DF7E74152" } } }, "field_mask": { "paths": [ "ids.device_id", "ids.dev_eui", "ids.join_eui", "name", "frequency_plan_id", "lorawan_version", "lorawan_phy_version", "root_keys.app_key.key", "supports_join", "version_ids.band_id", "supports_class_c" ] } } undefined {}

Import process cancelled due to error.

Expected Result

It should import correctly ¯_(ツ)_/¯

Relevant Logs

No response

URL

No response

Deployment

The Things Stack Community Edition

The Things Stack Version

No response

Client Name and Version

Web Browser: Chrome

Other Information

No response

Proposed Fix

No response

Contributing

Code of Conduct

sascha-hemi commented 1 year ago

KEY != Password

https://stackoverflow.com/questions/29354133/how-to-fix-invalid-aes-key-length

Solved!