Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

"Unknown column group" when generating access token from SSO #128

Closed
rijkvanzanten opened this issue May 11, 2018 · 4 comments
Closed

"Unknown column group" when generating access token from SSO #128

rijkvanzanten opened this issue May 11, 2018 · 4 comments
Labels
bug Something isn't working

Comments

@rijkvanzanten
Copy link
Member

screen shot 2018-05-11 at 2 04 26 pm

@rijkvanzanten rijkvanzanten added the bug Something isn't working label May 11, 2018
@rijkvanzanten rijkvanzanten added this to To do in v2.0.0-alpha.3 via automation May 11, 2018
@wellingguzman
Copy link
Contributor

Can you share the whole log and the schema (if possible)?

@rijkvanzanten
Copy link
Member Author

Whole error output
  {
    "error": {
        "code": 9,
        "message": "Failed generating the SQL query. Statement could not be executed (42S22 - 1054 - Unknown column 'group' in 'where clause')",
        "query": "SELECT `directus_users`.* FROM `directus_users` WHERE `id` = '4' AND `group` IS NULL LIMIT 1",
        "class": "Directus\\Database\\Exception\\InvalidQueryException",
        "file": "/Users/rijkvanzanten/Development/api/src/core/Directus/Database/TableGateway/BaseTableGateway.php",
        "line": 698,
        "trace": [
            {
                "file": "/Users/rijkvanzanten/Development/api/vendor/zendframework/zend-db/src/TableGateway/AbstractTableGateway.php",
                "line": 209,
                "function": "executeSelect",
                "class": "Directus\\Database\\TableGateway\\BaseTableGateway",
                "type": "->",
                "args": [
                    {}
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/src/core/Directus/Authentication/User/Provider/UserTableGatewayProvider.php",
                "line": 37,
                "function": "selectWith",
                "class": "Zend\\Db\\TableGateway\\AbstractTableGateway",
                "type": "->",
                "args": [
                    {}
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/src/core/Directus/Services/AuthService.php",
                "line": 270,
                "function": "findWhere",
                "class": "Directus\\Authentication\\User\\Provider\\UserTableGatewayProvider",
                "type": "->",
                "args": [
                    {
                        "id": 4,
                        "group": null
                    }
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/src/endpoints/Auth.php",
                "line": 253,
                "function": "authenticateWithRequestToken",
                "class": "Directus\\Services\\AuthService",
                "type": "->",
                "args": [
                    "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0eXBlIjoicmVxdWVzdF90b2tlbiIsImlkIjo0LCJleHAiOjE1MjYwNjIxMDZ9.OBFrcXPn10kMbvvoE7J8X6FxbiMXevtFlzmwiDIbknw"
                ]
            },
            {
                "function": "ssoAccessToken",
                "class": "Directus\\Api\\Routes\\Auth",
                "type": "->",
                "args": [
                    {},
                    {},
                    {
                        "env": "_"
                    }
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php",
                "line": 41,
                "function": "call_user_func",
                "args": [
                    [
                        {},
                        "ssoAccessToken"
                    ],
                    {},
                    {},
                    {
                        "env": "_"
                    }
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/vendor/slim/slim/Slim/Route.php",
                "line": 335,
                "function": "__invoke",
                "class": "Slim\\Handlers\\Strategies\\RequestResponse",
                "type": "->",
                "args": [
                    [
                        {},
                        "ssoAccessToken"
                    ],
                    {},
                    {},
                    {
                        "env": "_"
                    }
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/vendor/slim/slim/Slim/MiddlewareAwareTrait.php",
                "line": 117,
                "function": "__invoke",
                "class": "Slim\\Route",
                "type": "->",
                "args": [
                    {},
                    {}
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/vendor/slim/slim/Slim/Route.php",
                "line": 313,
                "function": "callMiddlewareStack",
                "class": "Slim\\Route",
                "type": "->",
                "args": [
                    {},
                    {}
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/vendor/slim/slim/Slim/App.php",
                "line": 513,
                "function": "run",
                "class": "Slim\\Route",
                "type": "->",
                "args": [
                    {},
                    {}
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/src/core/Directus/Application/Http/Middlewares/AuthenticationMiddleware.php",
                "line": 110,
                "function": "__invoke",
                "class": "Slim\\App",
                "type": "->",
                "args": [
                    {},
                    {}
                ]
            },
            {
                "function": "__invoke",
                "class": "Directus\\Application\\Http\\Middlewares\\AuthenticationMiddleware",
                "type": "->",
                "args": [
                    {},
                    {},
                    {}
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/vendor/slim/slim/Slim/DeferredCallable.php",
                "line": 43,
                "function": "call_user_func_array",
                "args": [
                    {},
                    [
                        {},
                        {},
                        {}
                    ]
                ]
            },
            {
                "function": "__invoke",
                "class": "Slim\\DeferredCallable",
                "type": "->",
                "args": [
                    {},
                    {},
                    {}
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/vendor/slim/slim/Slim/MiddlewareAwareTrait.php",
                "line": 70,
                "function": "call_user_func",
                "args": [
                    {},
                    {},
                    {},
                    {}
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/src/core/Directus/Application/Http/Middlewares/CorsMiddleware.php",
                "line": 20,
                "function": "Slim\\{closure}",
                "class": "Slim\\App",
                "type": "->",
                "args": [
                    {},
                    {}
                ]
            },
            {
                "function": "__invoke",
                "class": "Directus\\Application\\Http\\Middlewares\\CorsMiddleware",
                "type": "->",
                "args": [
                    {},
                    {},
                    {}
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/vendor/slim/slim/Slim/DeferredCallable.php",
                "line": 43,
                "function": "call_user_func_array",
                "args": [
                    {},
                    [
                        {},
                        {},
                        {}
                    ]
                ]
            },
            {
                "function": "__invoke",
                "class": "Slim\\DeferredCallable",
                "type": "->",
                "args": [
                    {},
                    {},
                    {}
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/vendor/slim/slim/Slim/MiddlewareAwareTrait.php",
                "line": 70,
                "function": "call_user_func",
                "args": [
                    {},
                    {},
                    {},
                    {}
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/vendor/akrabat/rka-ip-address-middleware/src/IpAddress.php",
                "line": 93,
                "function": "Slim\\{closure}",
                "class": "Slim\\App",
                "type": "->",
                "args": [
                    {},
                    {}
                ]
            },
            {
                "function": "__invoke",
                "class": "RKA\\Middleware\\IpAddress",
                "type": "->",
                "args": [
                    {},
                    {},
                    {}
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/vendor/slim/slim/Slim/DeferredCallable.php",
                "line": 43,
                "function": "call_user_func_array",
                "args": [
                    {},
                    [
                        {},
                        {},
                        {}
                    ]
                ]
            },
            {
                "function": "__invoke",
                "class": "Slim\\DeferredCallable",
                "type": "->",
                "args": [
                    {},
                    {},
                    {}
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/vendor/slim/slim/Slim/MiddlewareAwareTrait.php",
                "line": 70,
                "function": "call_user_func",
                "args": [
                    {},
                    {},
                    {},
                    {}
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/vendor/slim/slim/Slim/MiddlewareAwareTrait.php",
                "line": 117,
                "function": "Slim\\{closure}",
                "class": "Slim\\App",
                "type": "->",
                "args": [
                    {},
                    {}
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/vendor/slim/slim/Slim/App.php",
                "line": 406,
                "function": "callMiddlewareStack",
                "class": "Slim\\App",
                "type": "->",
                "args": [
                    {},
                    {}
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/vendor/slim/slim/Slim/App.php",
                "line": 314,
                "function": "process",
                "class": "Slim\\App",
                "type": "->",
                "args": [
                    {},
                    {}
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/src/core/Directus/Application/Application.php",
                "line": 154,
                "function": "run",
                "class": "Slim\\App",
                "type": "->",
                "args": [
                    false
                ]
            },
            {
                "file": "/Users/rijkvanzanten/Development/api/public/index.php",
                "line": 5,
                "function": "run",
                "class": "Directus\\Application\\Application",
                "type": "->",
                "args": []
            }
        ]
    }
}

@rijkvanzanten
Copy link
Member Author

I'm using a local copy of the demo-api.getdirectus.com schema. It's 60-ish MB so i won't be uploading it here 😉

@wellingguzman
Copy link
Contributor

Okay, Thanks! I will take a look at this

v2.0.0-alpha.3 automation moved this from To do to Done May 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
No open projects
Development

No branches or pull requests

2 participants