Comments (8)
The fix has not been released yet, so that seems right
from directus.
So yeah, issue is resurfacing and I think I know where the problem lies:
After migrations we apply our own schema. When applying this schema the schema diff tells us that it will remove next_token from directus_sessions.
Now I know in the past, that these directus fields should be excluded from the diff alltogether? So definitely seems like a bug
from directus.
Did you run the migration 1 when updating to 10.11.1?
Footnotes
from directus.
Yes I did, happens through our CICD pipeline. This is the migration that got logged:
from directus.
Ok, something weird happened. I looked at the migrations table and the Add Session Window
was there. However the directus_sessions table didn't have a next_token
column.
Reran the migration and not it works. No further action needed. Strange though.
from directus.
Good catch! Thanks @keesvanbemmel!
from directus.
Just updated to 10.11.2
, and confirm the resurfacing. Getting this while trying to log in:
database-1 | 2024-05-31 15:08:54.780 UTC [62] ERROR: column s.next_token does not exist at character 44
database-1 | 2024-05-31 15:08:54.780 UTC [62] STATEMENT: select "s"."expires" as "session_expires", "s"."next_token" as "session_next_token", "u"."id" as "user_id", "u"."first_name" as "user_first_name", "u"."last_name" as "user_last_name", "u"."email" as "user_email", "u"."password" as "user_password", "u"."status" as "user_status", "u"."provider" as "user_provider", "u"."external_identifier" as "user_external_identifier", "u"."auth_data" as "user_auth_data", "r"."id" as "role_id", "r"."admin_access" as "role_admin_access", "r"."app_access" as "role_app_access", "d"."id" as "share_id", "d"."item" as "share_item", "d"."role" as "share_role", "d"."collection" as "share_collection", "d"."date_start" as "share_start", "d"."date_end" as "share_end", "d"."times_used" as "share_times_used", "d"."max_uses" as "share_max_uses" from "directus_sessions" as "s" left join "directus_users" as "u" on "s"."user" = "u"."id" left join "directus_shares" as "d" on "s"."share" = "d"."id" left join "directus_roles" as "r" on "r"."id" in ("u"."role", "d"."role") where "s"."token" = $1 and "s"."expires" >= $2 and ("d"."date_end" is null or "d"."date_end" >= $3) and ("d"."date_start" is null or "d"."date_start" <= $4) limit $5
directus-1 | [15:08:54] POST /auth/refresh 500 115ms
directus-1 | [15:08:54.782] ERROR: select "s"."expires" as "session_expires", "s"."next_token" as "session_next_token", "u"."id" as "user_id", "u"."first_name" as "user_first_name", "u"."last_name" as "user_last_name", "u"."email" as "user_email", "u"."password" as "user_password", "u"."status" as "user_status", "u"."provider" as "user_provider", "u"."external_identifier" as "user_external_identifier", "u"."auth_data" as "user_auth_data", "r"."id" as "role_id", "r"."admin_access" as "role_admin_access", "r"."app_access" as "role_app_access", "d"."id" as "share_id", "d"."item" as "share_item", "d"."role" as "share_role", "d"."collection" as "share_collection", "d"."date_start" as "share_start", "d"."date_end" as "share_end", "d"."times_used" as "share_times_used", "d"."max_uses" as "share_max_uses" from "directus_sessions" as "s" left join "directus_users" as "u" on "s"."user" = "u"."id" left join "directus_shares" as "d" on "s"."share" = "d"."id" left join "directus_roles" as "r" on "r"."id" in ("u"."role", "d"."role") where "s"."token" = $1 and "s"."expires" >= $2 and ("d"."date_end" is null or "d"."date_end" >= $3) and ("d"."date_start" is null or "d"."date_start" <= $4) limit $5 - column s.next_token does not exist
directus-1 | err: {
directus-1 | "type": "DatabaseError",
directus-1 | "message": "select \"s\".\"expires\" as \"session_expires\", \"s\".\"next_token\" as \"session_next_token\", \"u\".\"id\" as \"user_id\", \"u\".\"first_name\" as \"user_first_name\", \"u\".\"last_name\" as \"user_last_name\", \"u\".\"email\" as \"user_email\", \"u\".\"password\" as \"user_password\", \"u\".\"status\" as \"user_status\", \"u\".\"provider\" as \"user_provider\", \"u\".\"external_identifier\" as \"user_external_identifier\", \"u\".\"auth_data\" as \"user_auth_data\", \"r\".\"id\" as \"role_id\", \"r\".\"admin_access\" as \"role_admin_access\", \"r\".\"app_access\" as \"role_app_access\", \"d\".\"id\" as \"share_id\", \"d\".\"item\" as \"share_item\", \"d\".\"role\" as \"share_role\", \"d\".\"collection\" as \"share_collection\", \"d\".\"date_start\" as \"share_start\", \"d\".\"date_end\" as \"share_end\", \"d\".\"times_used\" as \"share_times_used\", \"d\".\"max_uses\" as \"share_max_uses\" from \"directus_sessions\" as \"s\" left join \"directus_users\" as \"u\" on \"s\".\"user\" = \"u\".\"id\" left join \"directus_shares\" as \"d\" on \"s\".\"share\" = \"d\".\"id\" left join \"directus_roles\" as \"r\" on \"r\".\"id\" in (\"u\".\"role\", \"d\".\"role\") where \"s\".\"token\" = $1 and \"s\".\"expires\" >= $2 and (\"d\".\"date_end\" is null or \"d\".\"date_end\" >= $3) and (\"d\".\"date_start\" is null or \"d\".\"date_start\" <= $4) limit $5 - column s.next_token does not exist",
directus-1 | "stack":
directus-1 | error: select "s"."expires" as "session_expires", "s"."next_token" as "session_next_token", "u"."id" as "user_id", "u"."first_name" as "user_first_name", "u"."last_name" as "user_last_name", "u"."email" as "user_email", "u"."password" as "user_password", "u"."status" as "user_status", "u"."provider" as "user_provider", "u"."external_identifier" as "user_external_identifier", "u"."auth_data" as "user_auth_data", "r"."id" as "role_id", "r"."admin_access" as "role_admin_access", "r"."app_access" as "role_app_access", "d"."id" as "share_id", "d"."item" as "share_item", "d"."role" as "share_role", "d"."collection" as "share_collection", "d"."date_start" as "share_start", "d"."date_end" as "share_end", "d"."times_used" as "share_times_used", "d"."max_uses" as "share_max_uses" from "directus_sessions" as "s" left join "directus_users" as "u" on "s"."user" = "u"."id" left join "directus_shares" as "d" on "s"."share" = "d"."id" left join "directus_roles" as "r" on "r"."id" in ("u"."role", "d"."role") where "s"."token" = $1 and "s"."expires" >= $2 and ("d"."date_end" is null or "d"."date_end" >= $3) and ("d"."date_start" is null or "d"."date_start" <= $4) limit $5 - column s.next_token does not exist
directus-1 | at Parser.parseErrorMessage (/directus/node_modules/.pnpm/[email protected]/node_modules/pg-protocol/dist/parser.js:283:98)
directus-1 | at Parser.handlePacket (/directus/node_modules/.pnpm/[email protected]/node_modules/pg-protocol/dist/parser.js:122:29)
directus-1 | at Parser.parse (/directus/node_modules/.pnpm/[email protected]/node_modules/pg-protocol/dist/parser.js:35:38)
directus-1 | at Socket.<anonymous> (/directus/node_modules/.pnpm/[email protected]/node_modules/pg-protocol/dist/index.js:11:42)
directus-1 | at Socket.emit (node:events:517:28)
directus-1 | at addChunk (node:internal/streams/readable:368:12)
directus-1 | at readableAddChunk (node:internal/streams/readable:341:9)
directus-1 | at Readable.push (node:internal/streams/readable:278:10)
directus-1 | at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
directus-1 | "length": 110,
directus-1 | "name": "error",
directus-1 | "severity": "ERROR",
directus-1 | "code": "42703",
directus-1 | "position": "44",
directus-1 | "file": "parse_relation.c",
directus-1 | "line": "3713",
directus-1 | "routine": "errorMissingColumn"
directus-1 | }
from directus.
(reverting to 10.11.0
works fine and I do understand that this is going to be included only from next release, onward 🙂 thanks everyone)
from directus.
Related Issues (20)
- Does anyone have turtorial to intergrate AWS X-ray with Directus on ecs fargate? HOT 1
- `module_bar` in settings doesn't take an array. HOT 1
- Issue still persisting
- `module_bar` in settings doesn't really take an array.
- `useShortcut` hijacks global shortcuts even if targeted to element HOT 2
- Interface display in editting item mode HOT 1
- Inaccuracy on "Data Model" page HOT 1
- Filtering a collection using comparison operators on String fields results in 400 Bad Request Error HOT 2
- Wrong primaryKey & field values on custom interfaces after upgrading Directus HOT 1
- Order of "Related Collection" tables is not alphabetically HOT 3
- Unable to create new user via api HOT 12
- Add more detail on icons used in directus HOT 2
- Directus SDK doesn't return file relational data HOT 2
- Authorization header malformed, unexpected scope: 20240624/auto/s3/aws4_request HOT 1
- create-directus-extension throws "Named export 'parse' not found" error HOT 2
- Table layout queries presentational fields
- System relations appear in schema snapshot HOT 1
- Skip directus version update check HOT 1
- FilesService: filename_disk ignored HOT 1
- Better error messages, for instance on resetting a new password HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from directus.