Unable to create device profile

When i am trying to register my device through web UI , am not able to create device profile and when i give submit in device profile it is giving Error object does not exist (code: 5)

Each time when am failed to create device profile am getting some error messages in lora-app-server logs.
Below mentioned logs am getting when am running lora-app-server

INFO[0000] starting LoRa App Server docs=“https://docs.loraserver.io/” version=0.14.2
INFO[0000] connecting to postgresql
INFO[0000] setup redis connection pool
INFO[0000] handler/mqtt: connecting to mqtt broker server=“tcp://localhost:1883”
INFO[0000] applying database migrations
INFO[0000] handler/mqtt: connected to mqtt broker
INFO[0000] handler/mqtt: subscribling to tx topic topic=“application/+/node/+/tx”
INFO[0000] migrations applied count=0
INFO[0000] starting application-server api bind=“” ca-cert= tls-cert= tls-key=
INFO[0000] starting join-server api bind=“” ca_cert= tls_cert= tls_key=
INFO[0000] starting client api server bind=“” tls-cert="/etc/lora-app-server/certs/http.pem" tls-key="/etc/lora-app-server/certs/http-key.pem"
INFO[0000] registering rest api handler and documentation endpoint path="/api"
ERRO[0133] create device-profile error: pq: insert or update on table “device_profile” violates foreign key constraint “device_profile_network_server_id_fkey” device_profile_id=94f1165a-bd62-47dc-8e22-2b41d004ca67

Did you create the network-server entity and did you select it when creating a device-profile?

I have created network server entity. when am creating device-profile am not able to select network server. I am able to see my network server in drop menu but when i click that it is not getting selected.

LoRaWAN MAC version and Regional ParametLoRaWANers revision also am not able to select.

Could this be a browser issue? What browser are you using and which version?

Mozilla Firefox 31.0

Each time when i failed to create device profile am getting some error message in lora-app-server.

ERRO[9085] create device-profile error: pq: insert or update on table “device_profile” violates foreign key constraint “device_profile_network_server_id_fkey” device_profile_id=22fee43f-51de-416e-95f8-0d0604aa892a

what exactly this error is saying?

Please give me some solution .:pensive:

You’re trying to create something in the database which points to non-existing data. I expect because you’re unable to select the network-server from the dropdown. In this case you’re creating an item which does not point to a network-server entity, causing the foreign key constraint error.

Mozilla Firefox 31.0

You might want to update your browser :slight_smile: The current version is 57.0

Thank you for your reply. I will update my browser and check.

I have updated my browser to version 57.0. Now i have created network server instance. when am creating device profile am not able to get my network server, it is showing me nothing. But after update my browser am able to select LoRaWAN MAC version and Regional ParametLoRaWANers revision field.

Are you sure you’ve added a network-server instance to your LoRa App Server instance? See top-right button “network-servers” in the web-interface to create one. https://docs.loraserver.io/lora-app-server/use/network-servers/

Thank you very much for your useful response. My problem solved.:grinning:

1 Like