supabase-community/postgres-language-server

tokio-runtime-worker - index out of bounds: the len is 18 but the index is 18

Closed this issue · 3 comments

empz commented

PostgresTools binary 0.15.0 downloaded.

Downloaded PostgresTools 0.15.0 to /Users/empz/Library/Application Support/Code/User/globalStorage/supabase.postgrestools/global-bin/postgrestools

Error logs.

025-09-25 10:43:49.392 [info] [Info  - 10:43:49 AM] Server initialized with PID: 30861
2025-09-25 10:44:30.970 [info] Encountered an unexpected error

This is a bug in Postgres Tools, not an error in your code, and we would appreciate it if you could report it along with the following information to help us fixing the issue:

Source Location: crates/pgt_lexer/src/lexed.rs:97:28
Thread Name: tokio-runtime-worker
Message: index out of bounds: the len is 18 but the index is 18


2025-09-25 10:44:30.993 [info] [Error - 10:44:30 AM] PostgresTools language server closed
2025-09-25 10:44:30.994 [info] [Error - 10:44:30 AM] Server process exited with code 0.

postgrestools.jsonc

{
  "$schema": "https://pgtools.dev/latest/schema.json",
  "vcs": {
    "enabled": false,
    "clientKind": "git",
    "useIgnoreFile": false
  },
  "files": {
    "ignore": []
  },
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true
    }
  },
  "db": {
    "host": "127.0.0.1",
    "port": 54322,
    "username": "postgres",
    "password": "postgres",
    "database": "postgres",
    "connTimeoutSecs": 10,
    "allowStatementExecutionsAgainst": [
      "127.0.0.1/*",
      "localhost/*"
    ]
  }
}

VS Code extension

Name: postgrestools
Id: Supabase.postgrestools
Description: Postgres Language Server right in your IDE.
Version: 1.3.0
Publisher: Supabase
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=Supabase.postgrestools

VS Code

Version: 1.104.1
Commit: 0f0d87fa9e96c856c5212fc86db137ac0d783365
Date: 2025-09-17T23:36:24.973Z
Electron: 37.3.1
ElectronBuildId: 12404162
Chromium: 138.0.7204.235
Node.js: 22.18.0
V8: 13.8.258.31-electron.0
OS: Darwin arm64 24.6.0

thanks for reporting! do you remember what you did before it crashed? maybe you could even share the file you opened?

empz commented

thanks for reporting! do you remember what you did before it crashed? maybe you could even share the file you opened?

Nothing special really. This thing doesn't work at all.

https://cap.link/203j4dy12nqgrdk

found the error, will be fixed with the next release! thank you :)

PR: ref