ErrorEvent

Open
#126 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
docker, javascript, next.js, postgresql

Research direction

No repository file or test is named. Start by reproducing the query with the supplied Pool configuration in the stated Next.js Edge/serverless and Docker environment, then inspect the WebSocket connection failure. Done means the query connects successfully and returns rows instead of throwing ErrorEvent.

Written by the indexing model from the issue text.

Description

Steps to reproduce

import { Pool, neonConfig } from '@neondatabase/serverless';

...
const pool = new Pool({ connectionString: 'postgresql://postgres:password@localhost:54320/postgres' });
const result = await pool.query('SELECT id, name FROM sauna_location LIMIT 1');

Expected result

Returns rows from the database

Actual result

Throws ErrorEvent

Environment

Running in locally in MacOS, M2
ghcr.io/neondatabase/wsproxy:latest in Docker
"@neondatabase/serverless": "^0.10.4",
next.js 14.2.19
Vercel Edge runtime, servlerless function

Logs, links

ErrorEvent {
  [Symbol(type)]: 'error',
  [Symbol(kTarget)]: WebSocket {
  [Symbol(kEvents)]: SafeMap(4) {
  'error' => <ref *1> {
  size: 1,
  next: Listener {
  next: undefined,
  previous: [Circular *1],
  listener: [Function],
  flags: 0,
  callback: [Function]
},
  resistStopPropagation: false
},
  'message' => <ref *2> {
  size: 1,
  next: Listener {
  next: undefined,
  previous: [Circular *2],
  listener: [Function],
  flags: 0,
  callback: [Function]
},
  resistStopPropagation: false
},
  'close' => <ref *3> {
  size: 1,
  next: Listener {
  next: undefined,
  previous: [Circular *3],
  listener: [Function],
  flags: 0,
  callback: [Function]
},
  resistStopPropagation: false
},
  'open' => <ref *4> {
  size: 1,
  next: Listener {
  next: undefined,
  previous: [Circular *4],
  listener: [Function: handleWebSocketOpen],
  flags: 0,
  callback: [Function: handleWebSocketOpen]
},
  resistStopPropagation: false
}
},
  [Symbol(events.maxEventTargetListeners)]: 10,
  [Symbol(events.maxEventTargetListenersWarned)]: false,
  [Symbol(kHandlers)]: SafeMap(0) {},
  [Symbol(url)]: URL {  },
  [Symbol(controller)]: Fetch {
  _events: [Object: null prototype] {},
  _eventsCount: 0,
  _maxListeners: 21,
  dispatcher: Agent {
  _events: [Object: null prototype] {},
  _eventsCount: 0,
  _maxListeners: undefined,
  [Symbol(shapeMode)]: false,
  [Symbol(kCapture)]: false,
  [Symbol(destroyed)]: false,
  [Symbol(onDestroyed)]: null,
  [Symbol(closed)]: false,
  [Symbol(onClosed)]: [],
  [Symbol(dispatch interceptors)]: [ [Function] ],
  [Symbol(options)]: { connect: undefined, interceptors: undefined },
  [Symbol(maxRedirections)]: 0,
  [Symbol(factory)]: [Function: defaultFactory],
  [Symbol(clients)]: Map(1) { 'https://localhost' => WeakRef {  } },
  [Symbol(finalizer)]: { register: [Function: register] },
  [Symbol(onDrain)]: [Function],
  [Symbol(onConnect)]: [Function],
  [Symbol(onDisconnect)]: [Function],
  [Symbol(onConnectionError)]: [Function],
  [Symbol(Intercepted Dispatch)]: [Function: Intercept]
},
  connection: { abort: null, destroyed: true, destroy: [Function: destroy] },
  dump: false,
  state: 'terminated',
  [Symbol(shapeMode)]: false,
  [Symbol(kCapture)]: false
},
  [Symbol(ready state)]: 0,
  [Symbol(binary type)]: 'arraybuffer'
},
  [Symbol(kIsBeingDispatched)]: false
}
Dominant language
JavaScript
Stars
548
Forks
81
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from neondatabase/serverless

All issues in neondatabase/serverless

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.