-
wrote on Feb 21, 2024, 1:08 PM last edited by
Hi guys..
I have a huge error, that I can´t find a solution yet.
When I create a new instance of directus, everything works fine, Users are created trough Cloudron Loogin with no problem. But after a few days it stop working and returning an Error.Looking to the logs, I saw this error. There are something I missing ?
Feb 21 09:59:41[12:59:41.587] WARN: [OpenID] Unexpected error during OpenID login Feb 21 09:59:41err: { Feb 21 09:59:41"type": "DatabaseError", Feb 21 09:59:41"message": "insert into \"directus_users\" (\"auth_data\", \"email\", \"external_identifier\", \"first_name\", \"id\", \"last_name\", \"provider\", \"role\") values (DEFAULT, $1, $2, $3, $4, $5, $6, $7) returning \"id\" - invalid input syntax for type uuid: \"\"", Feb 21 09:59:41"stack": Feb 21 09:59:41error: insert into "directus_users" ("auth_data", "email", "external_identifier", "first_name", "id", "last_name", "provider", "role") values (DEFAULT, $1, $2, $3, $4, $5, $6, $7) returning "id" - invalid input syntax for type uuid: "" Feb 21 09:59:41at Parser.parseErrorMessage (/app/code/node_modules/pg-protocol/dist/parser.js:287:98) Feb 21 09:59:41at Parser.handlePacket (/app/code/node_modules/pg-protocol/dist/parser.js:126:29) Feb 21 09:59:41at Parser.parse (/app/code/node_modules/pg-protocol/dist/parser.js:39:38) Feb 21 09:59:41at Socket.<anonymous> (/app/code/node_modules/pg-protocol/dist/index.js:11:42) Feb 21 09:59:41at Socket.emit (node:events:517:28) Feb 21 09:59:41at addChunk (node:internal/streams/readable:335:12) Feb 21 09:59:41at readableAddChunk (node:internal/streams/readable:308:9) Feb 21 09:59:41at Readable.push (node:internal/streams/readable:245:10) Feb 21 09:59:41at TCP.onStreamRead (node:internal/stream_base_commons:190:23) Feb 21 09:59:41"length": 129, Feb 21 09:59:41"name": "error", Feb 21 09:59:41"severity": "ERROR", Feb 21 09:59:41"code": "22P02", Feb 21 09:59:41"where": "unnamed portal parameter $7 = ''", Feb 21 09:59:41"file": "uuid.c", Feb 21 09:59:41"line": "134", Feb 21 09:59:41"routine": "string_to_uuid" Feb 21 09:59:41}```
-
-
Was your app instance updated in between? If you create a new test user, can that one log in?
wrote on Feb 21, 2024, 4:01 PM last edited by pedrocm Feb 21, 2024, 4:04 PMUsers who already had an account continue to be able to log in without any problems. I keep automatic updates enabled.
App Info
App Title and VersionDirectus 10.9.2
App xxx
Package Versionio.directus9.cloudronapp@1.39.2
Last Updated02/16/2024 -
From my reading of the error message, it seems the id variable was not set correctly for the MySQL insert query (it is empty). @pedrocm so this happens only when you do OIDC login and not when you login as admin? Also, can you also confirm which Cloudron version you are on (this is listed in Settings)?
-
wrote on Feb 22, 2024, 2:36 PM last edited by
Yes, new users are not allowed to be admin at first login. I change the original role privileges to a more basic access. And move me to another role with admin powers.
Cloudron version.
Platform versionv7.6.4 (Ubuntu 22.04.3 LTS) -
wrote on Feb 22, 2024, 4:17 PM last edited by
I change back original role to admin, and put an enviroment variable link
export AUTH_LDAP_DEFAULT_ROLE_ID=<id of role> export AUTH_OPENID_DEFAULT_ROLE_ID=<id of role>
but it still returning the same error. only people are admin in cloudron can login if they not already did in the first day.
-
If only Cloudron admins can login, this may indicate that your access restrictions set for the app within Cloudron may be off? Cloudron admins can always log into all apps, regardless of access controls, so maybe that is a clue?
-
wrote on Feb 23, 2024, 12:43 PM last edited by
it is not true, because I set up to "Allow all users from this Cloudron"
-
wrote on Feb 23, 2024, 12:47 PM last edited by
And sorry... I thought it was possible to login with an admin user. I did create a new user as admin to try, but return the same error
-
@pedrocm Can you report this upstream at https://github.com/directus/directus/issues and link the issue here so we can follow up ?
-
wrote on Feb 26, 2024, 9:16 PM last edited by
of course...
https://github.com/directus/directus/issues/21572 -
wrote on Mar 8, 2024, 4:19 PM last edited by
I also have this problem. The error is that I can't use Login with cloudron because their default authentication source (provider) is set to 'default'. I can change that to 'cloudron'. But still while logging in, it will say 'invalid_provider'. Once I locked my admin account out by changing the source to 'cloudron' then changed the provider using postgres query. Issue still remains unsolved, but since all users have their passwords it's not been an urgent problem. But still.. worth looking into it.
-
-
wrote on May 14, 2024, 3:12 PM last edited by
the new version of Directus on cloudron dos not use LDAP and you cannot use OPENID but CLOUDRON as variable.
Just put
export AUTH_CLOUDRON_DEFAULT_ROLE_ID="xxx"@nebulon can you update the directus documentation to avoid this error?
-
the new version of Directus on cloudron dos not use LDAP and you cannot use OPENID but CLOUDRON as variable.
Just put
export AUTH_CLOUDRON_DEFAULT_ROLE_ID="xxx"@nebulon can you update the directus documentation to avoid this error?
@nennogabriel said in Directus fail to create an user from Cloudron Open ID:
the new version of Directus on cloudron dos not use LDAP and you cannot use OPENID but CLOUDRON as variable.
what do you mean by this? Why can we not use OPENID?