Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insight : Definition object should contain 'type' property: Object({ type: undefined, resolve: [function resolve] }) #22553

Open
GhosTHaise opened this issue May 23, 2024 · 3 comments

Comments

@GhosTHaise
Copy link

GhosTHaise commented May 23, 2024

Describe the Bug

I am trying to build insight with supabase + directus . I have import all tables from supapase as a collection model on directus. When i try add list that include any collections i got this error :
image

To Reproduce

Create new directus project and link this to supabase postgres. I have a user table which have relationship to auth.users used to supabase auth .

Directus Version

v 10.11.0

Hosting Strategy

Self-Hosted (Custom)

Database

PostgreSQL 16.

@br41nslug
Copy link
Member

br41nslug commented May 23, 2024

I have a user table which have relationship to auth.users used to supabase auth .

Have you configured this auth.users collection and the relationship properly in directus? Because the error looks like it is trying to relate to a non-existent table.

have you tried adding the auth schema to directus search_path? DB_SEARCH_PATH="public,auth"

@GhosTHaise
Copy link
Author

auth.users is not available on directus but if i try to add DB_SEARCH_PATH, i got this error :
image

@GhosTHaise
Copy link
Author

GhosTHaise commented May 24, 2024

I have a user table which have relationship to auth.users used to supabase auth .

Have you configured this auth.users collection and the relationship properly in directus? Because the error looks like it is trying to relate to a non-existent table.

have you tried adding the auth schema to directus search_path? DB_SEARCH_PATH="public,auth"

my full log :

   ╭───────────────────────────────────────────────────╮
   │                                                   │
   │                 Update available!                 │
   │                                                   │
   │                 10.11.0 → 10.11.1                 │
   │                 1 version behind                  │
   │                                                   │
   │                 More information:                 │
   │   https://github.com/directus/directus/releases   │
   │                                                   │
   ╰───────────────────────────────────────────────────╯

error: WITH geometries as (
                                        select * from geometry_columns
                                        union
                                        select * from geography_columns
                                )
                                SELECT f_table_name as table_name
                                        , f_geometry_column as column_name
                                        , type as data_type
                                FROM geometries g
                                JOIN information_schema.tables t
                                        ON g.f_table_name = t.table_name
                                        AND t.table_type = 'BASE TABLE'
                                WHERE f_table_schema in ($1,$2)
                                 - relation "geometry_columns" does not exist
    at Parser.parseErrorMessage (/home/ghosthaise/dev/tottem-project/node_modules/pg-protocol/dist/parser.js:283:98)
    at Parser.handlePacket (/home/ghosthaise/dev/tottem-project/node_modules/pg-protocol/dist/parser.js:122:29)
    at Parser.parse (/home/ghosthaise/dev/tottem-project/node_modules/pg-protocol/dist/parser.js:35:38)
    at Socket.<anonymous> (/home/ghosthaise/dev/tottem-project/node_modules/pg-protocol/dist/index.js:11:42)
    at Socket.emit (node:events:517:28)
    at addChunk (node:internal/streams/readable:335:12)
    at readableAddChunk (node:internal/streams/readable:308:9)
    at Readable.push (node:internal/streams/readable:245:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
  length: 115,
  severity: 'ERROR',
  code: '42P01',
  detail: undefined,
  hint: undefined,
  position: '41',
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'parse_relation.c',
  line: '1392',
  routine: 'parserOpenTable'
}
[15:02:46.784] WARN: Couldn't load extensions
[15:02:46.784] WARN: WITH geometries as (
                                        select * from geometry_columns
                                        union
                                        select * from geography_columns
                                )
                                SELECT f_table_name as table_name
                                        , f_geometry_column as column_name
                                        , type as data_type
                                FROM geometries g
                                JOIN information_schema.tables t
                                        ON g.f_table_name = t.table_name
                                        AND t.table_type = 'BASE TABLE'
                                WHERE f_table_schema in ($1,$2)
                                 - relation "geometry_columns" does not exist
    err: {
      "type": "DatabaseError",
      "message": "WITH geometries as (\n\t\t\t\t\tselect * from geometry_columns\n\t\t\t\t\tunion\n\t\t\t\t\tselect * from geography_columns\n\t\t\t\t)\n\t\t\t\tSELECT f_table_name as table_name\n\t\t\t\t\t, f_geometry_column as column_name\n\t\t\t\t\t, type as data_type\n\t\t\t\tFROM geometries g\n\t\t\t\tJOIN information_schema.tables t\n\t\t\t\t\tON g.f_table_name = t.table_name\n\t\t\t\t\tAND t.table_type = 'BASE TABLE'\n\t\t\t\tWHERE f_table_schema in ($1,$2)\n\t\t\t\t - relation \"geometry_columns\" does not exist",
      "stack":
          error: WITH geometries as (
                                                select * from geometry_columns
                                                union
                                                select * from geography_columns
                                        )
                                        SELECT f_table_name as table_name
                                                , f_geometry_column as column_name
                                                , type as data_type
                                        FROM geometries g
                                        JOIN information_schema.tables t
                                                ON g.f_table_name = t.table_name
                                                AND t.table_type = 'BASE TABLE'
                                        WHERE f_table_schema in ($1,$2)
                                         - relation "geometry_columns" does not exist
              at Parser.parseErrorMessage (/home/ghosthaise/dev/tottem-project/node_modules/pg-protocol/dist/parser.js:283:98)
              at Parser.handlePacket (/home/ghosthaise/dev/tottem-project/node_modules/pg-protocol/dist/parser.js:122:29)
              at Parser.parse (/home/ghosthaise/dev/tottem-project/node_modules/pg-protocol/dist/parser.js:35:38)
              at Socket.<anonymous> (/home/ghosthaise/dev/tottem-project/node_modules/pg-protocol/dist/index.js:11:42)
              at Socket.emit (node:events:517:28)
              at addChunk (node:internal/streams/readable:335:12)
              at readableAddChunk (node:internal/streams/readable:308:9)
              at Readable.push (node:internal/streams/readable:245:10)
              at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
      "length": 115,
      "name": "error",
      "severity": "ERROR",
      "code": "42P01",
      "position": "41",
      "file": "parse_relation.c",
      "line": "1392",
      "routine": "parserOpenTable"
    }
[15:02:47.027] WARN: "PUBLIC_URL" should be a full URL```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 Needs Triage
Development

No branches or pull requests

2 participants