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

[Poll] Tauri compatible version #6

Open
ankified opened this issue Feb 12, 2024 · 5 comments
Open

[Poll] Tauri compatible version #6

ankified opened this issue Feb 12, 2024 · 5 comments

Comments

@ankified
Copy link

I'm learning Sveltekit to build a Tauri app and I believe Surrealdb is a good choice for my use case. However, I've not found yet an example of an app that uses these three stacks together. Have you ever tried this before? Would you consider creating a version of your app using Tauri?

@oskar-gmerek
Copy link
Owner

oskar-gmerek commented Feb 12, 2024

I'm personally waiting for Tauri 2 release what should change a lot in the Svelte ecosystem as it looks like we get soon ala' react native quality (or even better) support for mobile (and desktops - all in one) apps in Svelte ecosystem.

I was thinking before to make the version for Tauri + SvelteKit + SurrealDB but I was waiting for some feedback for this starter before, and to be honest I didn't get any, so I still don't know what is good, what is bad, if is used by anyone or not.

As you especially mention that stack I will consider to create it. I currently have several other priorities, so it is difficult for me to estimate a date. I leave this thread open, maybe someone here will join this request and add motivation to set other priorities.

Warning

Want to see the Tauri compatible version of this app? Let me know in a comment.

If you don't want to wait and prefer to do it yourself, then as a simple tip.... to make it work with Tauri, you probably just need to get rid of the server-side code, which should be an easy job since in this example that server-side code is only there for an extra layer of security and DX / UX enhancement.

@oskar-gmerek oskar-gmerek changed the title Would it work as a Tauri app? [Poll] Tauri compatible version Feb 12, 2024
@ankified
Copy link
Author

ankified commented Mar 2, 2024

@oskar-gmerek Thanks! I'm facing some issues when I try to run the app. The database keeps restarting again and again and the Docker app returns the following log (it didn't happen before and I've deleted all the files related to the app and installed again but the problem persists):

2024-03-02 14:10:58 2024-03-02T17:10:58.245406Z  INFO surreal::env: Running 1.1.1+20240116.b261047 for linux on x86_64
2024-03-02 14:10:58 2024-03-02T17:10:58.245573Z  INFO surreal::dbs: ✅🔒 Authentication is enabled 🔒✅
2024-03-02 14:10:58 2024-03-02T17:10:58.245698Z  INFO surrealdb::kvs::ds: Starting kvs store at file:///db/surreal.db
2024-03-02 14:10:59 2024-03-02T17:10:59.679958Z  INFO surrealdb::kvs::ds: Started kvs store at file:///db/surreal.db
2024-03-02 14:10:58 
2024-03-02 14:10:58  .d8888b.                                             888 8888888b.  888888b.
2024-03-02 14:10:58 d88P  Y88b                                            888 888  'Y88b 888  '88b
2024-03-02 14:10:58 Y88b.                                                 888 888    888 888  .88P
2024-03-02 14:10:58  'Y888b.   888  888 888d888 888d888  .d88b.   8888b.  888 888    888 8888888K.
2024-03-02 14:10:58     'Y88b. 888  888 888P'   888P'   d8P  Y8b     '88b 888 888    888 888  'Y88b
2024-03-02 14:10:58       '888 888  888 888     888     88888888 .d888888 888 888    888 888    888
2024-03-02 14:10:58 Y88b  d88P Y88b 888 888     888     Y8b.     888  888 888 888  .d88P 888   d88P
2024-03-02 14:10:58  'Y8888P'   'Y88888 888     888      'Y8888  'Y888888 888 8888888P'  8888888P'
2024-03-02 14:10:58 
2024-03-02 14:10:58 
2024-03-02 14:11:04 
2024-03-02 14:11:04  .d8888b.                                             888 8888888b.  888888b.
2024-03-02 14:11:04 d88P  Y88b                                            888 888  'Y88b 888  '88b
2024-03-02 14:11:04 Y88b.                                                 888 888    888 888  .88P
2024-03-02 14:11:04  'Y888b.   888  888 888d888 888d888  .d88b.   8888b.  888 888    888 8888888K.
2024-03-02 14:11:04     'Y88b. 888  888 888P'   888P'   d8P  Y8b     '88b 888 888    888 888  'Y88b
2024-03-02 14:11:04       '888 888  888 888     888     88888888 .d888888 888 888    888 888    888
2024-03-02 14:11:04 Y88b  d88P Y88b 888 888     888     Y8b.     888  888 888 888  .d88P 888   d88P
2024-03-02 14:11:04  'Y8888P'   'Y88888 888     888      'Y8888  'Y888888 888 8888888P'  8888888P'
2024-03-02 14:11:04 
2024-03-02 14:11:04 
2024-03-02 14:10:59 2024-03-02T17:10:59.680383Z ERROR surreal::cli: There was a problem with the database: There was a problem with a datastore transaction: Corruption: CURRENT file corrupted

@oskar-gmerek
Copy link
Owner

@ankified can you give me more context? Do you mean that error occurs when you trying to get it work with Tauri or have followed exact instructions from this repo readme and then that error occurs?

@ankified
Copy link
Author

ankified commented Mar 2, 2024

@oskar-gmerek The error occours when I follow the instructions from this repo. It didn't happen before when I tried this app for the first time, but now the database keeps restarting.

When I run pnpm run multitaskum:developum the following happens:
image

Also, the LOG file in surreal-sveltekit/db/surreal.db contains the following text:

2024/03/02-18:14:46.731234 1 [WARN] [db/db_impl/db_impl_open.cc:2074] DB::Open() failed: Corruption: CURRENT file corrupted

@oskar-gmerek
Copy link
Owner

oskar-gmerek commented Mar 2, 2024

@ankified You will need to provide repeatable steps to reproduce this error to allow me try to understand what happen there. I have checked, and after cloning repo and following the instructions from readme, everything works as expected. I had before that project running for the fair amount of time (few days), so I think there is everything good on the code side.

and I've deleted all the files related to the app and installed again but the problem persists

As you have deleted files, I think there will be no other way than just start again from scratch. I would suggest you to:

  1. stop and remove Docker containers.
    1a. I would suggest also to remove images to allow download fresh ones.
  2. Stop node.js and remove whole project surreal-sveltekit
  3. Start again steps from instructions, step after step

If you absolutely want to keep and try to fix this setup. Then I can only ask you to provide an exact steps that will allow me to reproduce this behavior. You can also search or ask on SurrealDB discord (https://discord.gg/surrealdb), maybe there was already someone with similar problem. But once again, without reproducible steps it will be hard to help fix this or even understand what might have happened.

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

No branches or pull requests

2 participants