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

Support connecting to local Cloudflare D1 #179

Open
vladinator1000 opened this issue Nov 1, 2024 · 3 comments
Open

Support connecting to local Cloudflare D1 #179

vladinator1000 opened this issue Nov 1, 2024 · 3 comments

Comments

@vladinator1000
Copy link

Hi y'all, I have a bug report. When I connect to a local Cloudflare D1 database, I don't see any tables.

Steps:

  1. Clone a d1 project like this one https://github.com/vladinator1000/remix-drizzle-d1
  2. Set up: npm i npm run db-reset
  3. Create a new sqlite file connection in Outerbase
  4. Select this sqlite file relative to the project folder ./.wrangler/state/v3/d1/miniflare-D1DatabaseObject/someLongName.sqlite
  5. Observe how tables don't load in Outerbase

I can open this file in VSCode with https://marketplace.visualstudio.com/items?itemName=qwtel.sqlite-viewer

Also it's worth noting the Outerbase sqlite file connection doesn't work in Firefox dev edition for some reason. I had to open it in chrome.

@invisal
Copy link
Collaborator

invisal commented Nov 1, 2024

Thanks for reporting. I will check this problem.

@invisal
Copy link
Collaborator

invisal commented Dec 4, 2024

With browser, there is limitation of how much we can access with user file. We heavily rely on FileSystemFileHandle which I believe Firefox does not support it by default.

Currently, I have implemented a thin Electron wrapper that bridge what it is not possible to do from browser and it is avaliable on Mac and Windows. https://github.com/outerbase/studio-desktop/releases/

Does the desktop app solving your problem?

@vladinator1000
Copy link
Author

vladinator1000 commented Dec 20, 2024

@invisal just tried it with this repo https://github.com/vladinator1000/remix-drizzle-d1. Freshly cloned, npm i npm run db-reset, nothing using the database.

Nothing happened when I clicked the connection, but when I used "connect with debugger" I saw an error:

Error invoking remote method 'transaction': LibsqlError: SQLITE_BUSY: database is locked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants