403 Error using Turso in local development when running wrangler dev with `--remote` flag

LibsqlError: SERVER_ERROR: Server returned HTTP status 403
at mapHranaError (index.js:12991:12)
at HttpClient2.execute (index.js:13296:13)
at async PreparedQuery.all (index.js:13476:18)
at async index.js:14053:26
at async index.js:2793:5
at async index.js:2695:7
at async index.js:2022:62
at async jsonError (index.js:14078:12) {
code: SERVER_ERROR,
name: LibsqlError,
stack: LibsqlError: SERVER_ERROR: Server returned HTTP st…022:62
at async jsonError (index.js:14078:12),
message: SERVER_ERROR: Server returned HTTP status 403,
cause: HttpServerError: Server returned HTTP status 403
at errorFromResponse (index.js:12380:10)
a…
}
LibsqlError: SERVER_ERROR: Server returned HTTP status 403
at mapHranaError (index.js:12991:12)
at HttpClient2.execute (index.js:13296:13)
at async PreparedQuery.all (index.js:13476:18)
at async index.js:14053:26
at async index.js:2793:5
at async index.js:2695:7
at async index.js:2022:62
at async jsonError (index.js:14078:12) {
code: SERVER_ERROR,
name: LibsqlError,
stack: LibsqlError: SERVER_ERROR: Server returned HTTP st…022:62
at async jsonError (index.js:14078:12),
message: SERVER_ERROR: Server returned HTTP status 403,
cause: HttpServerError: Server returned HTTP status 403
at errorFromResponse (index.js:12380:10)
a…
}
You only get this error when running wrangler dev with --remote flag.
wrangler dev src/index.ts #works
wrangler dev src/index.ts --remote #gets libsql 403 error
wrangler dev src/index.ts #works
wrangler dev src/index.ts --remote #gets libsql 403 error
Here's a repo that demonstrates this: https://github.com/zestsystem/cloudflare-worker-turso/tree/main
GitHub
GitHub - zestsystem/cloudflare-worker-turso: testing turso on cloud...
testing turso on cloudflare worker hono. Contribute to zestsystem/cloudflare-worker-turso development by creating an account on GitHub.
2 Replies
Cyb3r-Jak3
Cyb3r-Jak39mo ago
My guess is the fact you are using an IP address. Workers can’t make requests to IP addresses.
goofysystem
goofysystem9mo ago
@cyb3rjak3 I see so is --remote flag is just not recommended for local development? I use the flag to verify my R2 working and see the file show up on the dashboard. Does wrangler dev without --remote flag persist files being uploaded?