Create new user using API, Cannot add row: missing value! - SQLException

abdo444446 days ago

Hello,

I use API to create new user
in v5.11
Server generate error in:

Cannot add row: missing value! - SQLException (... < QueryBuilder: 469 < DatabaseStorage: 96 < UserResource: 113 < ...)

{
  "id": -1,
  "name": "Okaaaa",
  "email": "vjgch@jhbkj.com",
  "phone": 132120000,
  "readonly": false,
  "administrator": false,
  "map": "<string>",
  "latitude": 35.56,
  "longitude": 20.56,
  "zoom": 11,
  "password": "<string>",
  "twelveHourFormat": true,
  "coordinateFormat": "DD",
  "disabled": false,
  "expirationTime": null,
  "deviceLimit": 20,
  "userLimit": 5,
  "deviceReadonly": false,
  "limitCommands": false,
  "fixedEmail": false,
  "poiLayer": "<string>",
  "attributes": {}
}

What I miss??

Anton Tananaev6 days ago

It doesn't look like you're using the official Traccar 5.11.

abdo444446 days ago

hii Anton,

this is server response:

{
"id": 1,
"attributes": {},
"registration": false,
"readonly": false,
"deviceReadonly": false,
"map": null,
"bingKey": null,
"mapUrl": null,
"overlayUrl": null,
"latitude": 0,
"longitude": 0,
"zoom": 0,
"twelveHourFormat": false,
"forceSettings": false,
"coordinateFormat": null,
"limitCommands": false,
"disableReports": false,
"fixedEmail": false,
"poiLayer": null,
"announcement": null,
"emailEnabled": false,
"geocoderEnabled": false,
"textEnabled": false,
"storageSpace": null,
"newServer": false,
"openIdEnabled": false,
"openIdForce": false,
"version": "5.11"
}
abdo444446 days ago

Sorry Anton, this my fault.

please close this topic

Anton Tananaev6 days ago

Do you care to elaborate?

abdo444446 days ago

I create trigger in DB, to check some data entry before accept insert and update values.

that "missing value! - SQLException" came from it.

abdo444446 days ago

I create trigger in DB, to check some data entry before accept insert and update values.

That "missing value! - SQLException" came from it. I was forget about it.

When upgrade server libraries I facing some issues, Like "attributes.values" not parsing at server (nodejs), the values missing.

So I must solve this issue.

Thanks