edgedb-js icon indicating copy to clipboard operation
edgedb-js copied to clipboard

Auth-core throws weird errors when used with edgedb deploys on my own server

Open Huliiiiii opened this issue 1 year ago • 2 comments

Describe the bug A clear and concise description of what the bug is.

Authentication failed: InvalidDataError: Missing query parameter: code
    at decodeError (D:\...\node_modules\@edgedb\auth-core\dist\utils.js:117:16)
    at requestGET (D:\...\node_modules\@edgedb\auth-core\dist\utils.js:47:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async GET (D:/.../node_modules/edge-auth-solid-start/src/server/index.ts:293:27)    
    at async eval (D:/.../node_modules/@solidjs/start/dist/server/handler.js:38:23)        
    at async _callHandler (file:///D:/.../node_modules/h3/dist/index.mjs:1821:16)
    at async _callHandler (file:///D:/.../node_modules/h3/dist/index.mjs:1821:16)
    at async file:///D:/.../node_modules/h3/dist/index.mjs:1962:19
    at async Object.callAsync (file:///D:/.../node_modules/unctx/dist/index.mjs:72:16)     
    at async Server.toNodeHandle (file:///D:/.../node_modules/h3/dist/index.mjs:2249:7) 

QQ_1721620240738

QQ_1721620213733 Reproduction Include the code that is causing the error:

// code here

Expected behavior A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • OS: Windows 11 & Ubuntu 24.04 LTS
  • EdgeDB version (e.g. 2.0): 5.6+0d677a5
  • EdgeDB CLI version (e.g. 2.0):
  • edgedb-js version (e.g. 0.20.10;): 1.5.4
  • Node/Deno version:

Additional context Add any other context about the problem here.

Huliiiiii avatar Jul 22 '24 04:07 Huliiiiii

Hmmm, I can't think of what might be going on here based on the code you've provided in your screenshot. Do you mind linking to more of the code, and any details about the runtime (node, deno, bun, something else?)? Maybe there is a weird binding issue with this.core, or maybe some strange runtime garbage collection issue where the valid is present at call time, but somehow isn't getting closed over correctly? This seems far fetched, but not entirely impossible.

scotttrinh avatar Jul 22 '24 13:07 scotttrinh

node version: v20.15.0

It happened here:

https://github.com/Huliiiiii/edgedb-js/blob/438101f371c09d9f22a281b636882dd4d9cf6568/packages/auth-solid-start/src/server/index.ts#L417-L424

Huliiiiii avatar Jul 22 '24 14:07 Huliiiiii