Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

astrojs/db doesn't work on cloudflare pages #12019

Open
1 task
zeshhaan opened this issue Sep 18, 2024 · 0 comments
Open
1 task

astrojs/db doesn't work on cloudflare pages #12019

zeshhaan opened this issue Sep 18, 2024 · 0 comments
Labels
- P2: nice to have Not breaking anything but nice to have (priority) pkg: db

Comments

@zeshhaan
Copy link

zeshhaan commented Sep 18, 2024

Astro Info

$ astro info
Astro                    v5.0.0-beta.1
Node                     v20.10.0
System                   macOS (arm64)
Package Manager          bun
Output                   server
Adapter                  @astrojs/cloudflare
Integrations             @astrojs/react
                         @astrojs/tailwind
                         astro:db

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

@astrojs/db when used with libsql credentials doesn't work on cloudflare pages. it works fine on local but when accessing a page with astro db query on preview/production env, it breaks with 500. The console gives the following error message:
LibsqlError: SERVER_ERROR: Server returned HTTP status 401

What's the expected result?

When interacting with Astro DB using libsql credentials in a Cloudflare deployed site, say for example, querying a db, we're expected to see it return a result. But instead, it breaks and returns 500 error.

Link to Minimal Reproducible Example

https://github.com/zeshhaan/error-astrodb-cf-repro

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Sep 18, 2024
@zeshhaan zeshhaan changed the title astrojs/db with libsql connection fails on production astrojs/db doesn't work on cloudflare pages Sep 18, 2024
@Fryuni Fryuni added - P2: nice to have Not breaking anything but nice to have (priority) pkg: db and removed needs triage Issue needs to be triaged labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P2: nice to have Not breaking anything but nice to have (priority) pkg: db
Projects
None yet
Development

No branches or pull requests

2 participants