Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Directus
  3. Directus fail to create an user from Cloudron Open ID

Directus fail to create an user from Cloudron Open ID

Scheduled Pinned Locked Moved Unsolved Directus
14 Posts 5 Posters 2.0k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pedrocm
    wrote on last edited by
    #1

    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}```
    1 Reply Last reply
    1
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      Was your app instance updated in between? If you create a new test user, can that one log in?

      P 1 Reply Last reply
      0
      • nebulonN nebulon marked this topic as a question on
      • nebulonN nebulon

        Was your app instance updated in between? If you create a new test user, can that one log in?

        P Offline
        P Offline
        pedrocm
        wrote on last edited by pedrocm
        #3

        @nebulon

        Users 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

        1 Reply Last reply
        0
        • girishG Do not disturb
          girishG Do not disturb
          girish
          Staff
          wrote on last edited by
          #4

          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)?

          1 Reply Last reply
          0
          • P Offline
            P Offline
            pedrocm
            wrote on last edited by
            #5

            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)

            1 Reply Last reply
            0
            • P Offline
              P Offline
              pedrocm
              wrote on last edited by
              #6

              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.

              1 Reply Last reply
              0
              • nebulonN Offline
                nebulonN Offline
                nebulon
                Staff
                wrote on last edited by
                #7

                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?

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  pedrocm
                  wrote on last edited by
                  #8

                  it is not true, because I set up to "Allow all users from this Cloudron"

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    pedrocm
                    wrote on last edited by
                    #9

                    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

                    1 Reply Last reply
                    0
                    • girishG Do not disturb
                      girishG Do not disturb
                      girish
                      Staff
                      wrote on last edited by
                      #10

                      @pedrocm Can you report this upstream at https://github.com/directus/directus/issues and link the issue here so we can follow up ?

                      1 Reply Last reply
                      0
                      • P Offline
                        P Offline
                        pedrocm
                        wrote on last edited by
                        #11

                        of course...
                        https://github.com/directus/directus/issues/21572

                        1 Reply Last reply
                        1
                        • njN Offline
                          njN Offline
                          nj
                          wrote on last edited by
                          #12

                          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.

                          Founder / Coder • My Apps

                          1 Reply Last reply
                          2
                          • girishG girish moved this topic from Support on
                          • nennogabrielN Offline
                            nennogabrielN Offline
                            nennogabriel
                            wrote on last edited by
                            #13

                            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?

                            girishG 1 Reply Last reply
                            1
                            • nennogabrielN nennogabriel

                              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?

                              girishG Do not disturb
                              girishG Do not disturb
                              girish
                              Staff
                              wrote on last edited by
                              #14

                              @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?

                              1 Reply Last reply
                              0
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              • Login

                              • Don't have an account? Register

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Bookmarks
                              • Search