S
SolidJS3mo ago
Bit

Server Action Invalid URL

Deployed solidstart in a lambda and GET requests to pages work. However when I make a POST request via actions I see it does everything correctly on the server side (logs a message) the response on the client is:
;0x000002f2;
((self.$R = self.$R || {})["server-fn:0"] = [],
($R => $R[0] = Object.assign(new TypeError("Invalid URL"), {
stack: "TypeError: Invalid URL\n at new URL (node:internal/url:797:36)\n at j$2 (file:///var/task/server/chunks/runtime.mjs:6850:7705)\n at ke$2 (file:///var/task/server/chunks/runtime.mjs:6850:6433)\n at async _callHandler (file:///var/task/server/chunks/runtime.mjs:6272:16)\n at async file:///var/task/server/chunks/runtime.mjs:3002:19\n at async Object.callAsync (file:///var/task/server/chunks/runtime.mjs:5386:16)\n at async toNodeHandle (file:///var/task/server/chunks/runtime.mjs:3273:7)\n at async Runtime.handler (file:///var/task/server/chunks/runtime.mjs:8052:13)",
code: "ERR_INVALID_URL",
input: "null"
}))($R["server-fn:0"]))
;0x000002f2;
((self.$R = self.$R || {})["server-fn:0"] = [],
($R => $R[0] = Object.assign(new TypeError("Invalid URL"), {
stack: "TypeError: Invalid URL\n at new URL (node:internal/url:797:36)\n at j$2 (file:///var/task/server/chunks/runtime.mjs:6850:7705)\n at ke$2 (file:///var/task/server/chunks/runtime.mjs:6850:6433)\n at async _callHandler (file:///var/task/server/chunks/runtime.mjs:6272:16)\n at async file:///var/task/server/chunks/runtime.mjs:3002:19\n at async Object.callAsync (file:///var/task/server/chunks/runtime.mjs:5386:16)\n at async toNodeHandle (file:///var/task/server/chunks/runtime.mjs:3273:7)\n at async Runtime.handler (file:///var/task/server/chunks/runtime.mjs:8052:13)",
code: "ERR_INVALID_URL",
input: "null"
}))($R["server-fn:0"]))
I have no clue how to resolve this.
2 Replies
Bit
BitOP3mo ago
Looks like it has something to do with wrapping my action with import { action, useAction } from "@solidjs/router"; Am I misunderstanding what this is for? When I remove it from wrapping my action it works as expected.
Madaxen86
Madaxen863mo ago
Can share the whole component which uses the action? And did you use the preset aws_lambda in the app.config.tsß
Want results from more Discord servers?
Add your server