surrealist icon indicating copy to clipboard operation
surrealist copied to clipboard

Bug: "Export database" function does not work

Open OTheNonE opened this issue 1 year ago • 18 comments

Describe the bug

The "Export database" function of Surrealist does not work. I press "Save export" on the modal and get prompted by a "location" selector, but after i've selected a location to store my backup, i get an error-toast displaying; "Export failed".

Steps to reproduce

  1. Navigate to "Explorer"
  2. Press "Export database".
  3. In the modal, press the "Save export" button.
  4. Select a location from the directory selector.

Expected behaviour

I expect a file of name "project-name-date.surql" file to be created, accordingly to the location selector. But instead, i receive and toast error message.

Surrealist Environment

Version: 3.1.9 Flags: feature_flags: true, query_view: true, explorer_view: true, graphql_view: true, designer_view: true, auth_view: true, functions_view: true, models_view: true, sidekick_view: true, apidocs_view: true, themes: true, syntax_themes: false, newsfeed: true, database_version_check: true, highlight_tool: false, legacy_serve: false, cloud_enabled: true, cloud_endpoints: production, cloud_access: true, cloud_killswitch: true, changelog: auto

Contact Details

[email protected]

Is there an existing issue for this?

  • [X] I have searched the existing issues

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

OTheNonE avatar Jan 04 '25 18:01 OTheNonE

I tested some of the previous versions:

  • The export function works in 3.0.8
  • The export function does not work in 3.1.0
  • Additionally, i receive an error toast message in 3.1.9, but not in 3.1.4 when using the export function.

OTheNonE avatar Jan 04 '25 18:01 OTheNonE

I cannot reproduce this issue myself. Could you try opening the developer console to see if there are any errors which could point to a cause?

macjuul avatar Jan 06 '25 15:01 macjuul

I notice now that database exports works with the latest surrealdb version. I was on version v2.0.1 and at that time did not notice the message displayed when pressing "Export database":

Notice: The remote database does not support export customization

image

But when upgrading surrealdb to version v.2.1.4, exporting works!

But the error is still happening when using latest version of Surrealist and v2.0.1 of surrealdb. I press "Save export" and select a location to save the export, and after this, the export fails.

OTheNonE avatar Jan 09 '25 09:01 OTheNonE

I have the same issue; the error message is:

Image

PlkMarudny avatar Jan 29 '25 13:01 PlkMarudny

Using Surrealist 3.2.4 and SurrealDB 2.2.1 I can replicate this problem.

P.S. Logs show nothing of interest.

PSmouz avatar Feb 23 '25 15:02 PSmouz

Exporting from Surrealist depends on the availability of the POST /export or GET /export endpoints. I can't personally reproduce any issues, as these should be exposed by SurrealDB by default.

Are you running SurrealDB behind some kind of proxy or disallowing the endpoint with --deny-http?

macjuul avatar Feb 24 '25 11:02 macjuul

I run in in a Docker container, if this helps.

On Mon, Feb 24, 2025, 15:05 Julian @.***> wrote:

Exporting from Surrealist depends on the availability of the POST /export or GET /export endpoints. I can't personally reproduce any issues, as these should be exposed by SurrealDB by default.

Are you running SurrealDB behind some kind of proxy or disallowing the endpoint with --deny-http?

— Reply to this email directly, view it on GitHub https://github.com/surrealdb/surrealist/issues/640#issuecomment-2678085991, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBI25ZALD5PUXIB6GBYFP32RL4G3AVCNFSM6AAAAABUTKASK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZYGA4DKOJZGE . You are receiving this because you commented.Message ID: @.***> [image: macjuul]macjuul left a comment (surrealdb/surrealist#640) https://github.com/surrealdb/surrealist/issues/640#issuecomment-2678085991

Exporting from Surrealist depends on the availability of the POST /export or GET /export endpoints. I can't personally reproduce any issues, as these should be exposed by SurrealDB by default.

Are you running SurrealDB behind some kind of proxy or disallowing the endpoint with --deny-http?

— Reply to this email directly, view it on GitHub https://github.com/surrealdb/surrealist/issues/640#issuecomment-2678085991, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBI25ZALD5PUXIB6GBYFP32RL4G3AVCNFSM6AAAAABUTKASK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZYGA4DKOJZGE . You are receiving this because you commented.Message ID: @.***>

PlkMarudny avatar Feb 24 '25 11:02 PlkMarudny

@macjuul Me too. I run it in docker. and using the cli command surreal export --conn http://localhost:8800 --user xx --pass xx --ns test --db test export.surql works just fine.

PSmouz avatar Feb 24 '25 15:02 PSmouz

But I mean export from Surrealist, not the command line.

On Mon, Feb 24, 2025, 19:43 Pascal Sitter @.***> wrote:

@macjuul https://github.com/macjuul Me too. I run it in docker. and using the cli command surreal export --conn http://localhost:8800 --user xx --pass xx --ns test --db test export.surql works just fine.

— Reply to this email directly, view it on GitHub https://github.com/surrealdb/surrealist/issues/640#issuecomment-2678862115, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBI25Z62EQ7SPYWIAACGBD2RM4YTAVCNFSM6AAAAABUTKASK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZYHA3DEMJRGU . You are receiving this because you commented.Message ID: @.***> [image: PSmouz]PSmouz left a comment (surrealdb/surrealist#640) https://github.com/surrealdb/surrealist/issues/640#issuecomment-2678862115

@macjuul https://github.com/macjuul Me too. I run it in docker. and using the cli command surreal export --conn http://localhost:8800 --user xx --pass xx --ns test --db test export.surql works just fine.

— Reply to this email directly, view it on GitHub https://github.com/surrealdb/surrealist/issues/640#issuecomment-2678862115, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBI25Z62EQ7SPYWIAACGBD2RM4YTAVCNFSM6AAAAABUTKASK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZYHA3DEMJRGU . You are receiving this because you commented.Message ID: @.***>

PlkMarudny avatar Feb 24 '25 15:02 PlkMarudny

I get the same error. Surrealist 3.3.2 (20250415.144545), SurrealDB 2.3.2 for macos on x86_64. Using surreal cli on my local machine. Developer console errors:

Image

beddows avatar May 19 '25 19:05 beddows

This was silently fixed, but the current version 3.3.2 again stopped importing anything, without any log messages this time.

Tomasz Plonka

On Mon, May 19, 2025, 23:21 Michael Beddows @.***> wrote:

beddows left a comment (surrealdb/surrealist#640) https://github.com/surrealdb/surrealist/issues/640#issuecomment-2892044265

I get the same error. Surrealist 3.3.2 (20250415.144545), SurrealDB 2.3.2 for macos on x86_64. Using surreal cli on my local machine. Developer console errors: image.png (view on web) https://github.com/user-attachments/assets/f3e7dfae-d81f-49ac-9758-b5e4b1dc852f

— Reply to this email directly, view it on GitHub https://github.com/surrealdb/surrealist/issues/640#issuecomment-2892044265, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBI254TA4KI7GJAU5FZCT327IVNDAVCNFSM6AAAAABUTKASK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQOJSGA2DIMRWGU . You are receiving this because you commented.Message ID: @.***>

PlkMarudny avatar May 21 '25 09:05 PlkMarudny

And in the version 3.3.3 export/import is gone.

PlkMarudny avatar May 23 '25 13:05 PlkMarudny

Actually it reappeared, but import fails with:

Image

PlkMarudny avatar May 23 '25 13:05 PlkMarudny

We've been able to reproduce this issue and we are currently looking into a fix. Thanks!

ItsMateo avatar May 23 '25 14:05 ItsMateo

I am using: https://app.surrealdb.com/ with version 2.1.8 I want to export database but I get:

Image Image
TypeError: Failed to fetch
    at Xt.req_post (https://app.surrealdb.com/assets/surreal-D5PBqSLz.js:9:33445)
    at Xt.export (https://app.surrealdb.com/assets/surreal-D5PBqSLz.js:9:38623)
    at b0.export (https://app.surrealdb.com/assets/surreal-D5PBqSLz.js:9:45039)
    at async Iz (https://app.surrealdb.com/assets/index-reQ3Hw7m.js:51:7182)

In console log I have: Image

mjablecnik avatar Jul 16 '25 05:07 mjablecnik

There are multiple different causes for this issue.

  1. The exporting capability is disabled. For cloud instances, go to the Dashboard > Configure instance > Capabilities > HTTP Endpoints > Export
  2. The other has to do with the expiration of tokens. This problem will be fixed with the release of https://github.com/surrealdb/surrealdb.js 2.0.

I will leave this issue open for now until SurrealDB.js 2.0 releases and is implemented within Surrealist

ItsMateo avatar Jul 23 '25 16:07 ItsMateo

I see this issue hasn't been closed, yet. I wanted to ping here before filing a new bug report.

Similarly, I'm unable to perform a database export from Surrealist connected to a free-tier cloud instance. I click export database (see image), ensure everything is ticked, and save export. Image

I receive the little "Export Failed, click for details toast, which provides the following...

Image

I verified the export capabilities, as noted above.

Platform: Desktop
OS: macos
Architecture: aarch64
WebView: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)
Version: 3.5.4
Flags: feature_flags: false, query_view: true, explorer_view: true, graphql_view: true, designer_view: true, auth_view: true, functions_view: true, parameters_view: true, apidocs_view: true, themes: true, syntax_themes: false, newsfeed: true, database_version_check: true, highlight_tool: false, legacy_serve: false, cloud_enabled: true, cloud_endpoints: production, cloud_access: true, cloud_killswitch: true, changelog: auto, newsfeed_base: production, sidebar_customization: false, gtm_debug: false, organization_archiving: false, sidekick_ai: true

My workaround was to log in via the web application, following the same steps.

storskegg avatar Sep 16 '25 01:09 storskegg

@ItsMateo - I'm getting this error on Surreal Cloud. I have logged in and back out, and exports is NOT disabled under Manage Instance. Is there a work around here for now?

J

jdgamble555 avatar Nov 01 '25 15:11 jdgamble555