surrealdb / surrealist

Surrealist is the ultimate way to visually manage your SurrealDB database
https://surrealist.app/
MIT License
1.06k stars 81 forks source link

The desktop application exhibits abnormal behavior #177

Closed Cheyenne1025 closed 6 months ago

Cheyenne1025 commented 6 months ago

Describe the bug
The desktop application exhibits abnormal behavior and can no longer be used normally after experiencing issues. Initially, executing commands (such as select) results in very slow queries, often terminating due to exceeding 10 seconds. Reconnecting to the database within the application allows for successful queries after the first incident. However, during continued use, query timeouts occurred again. Following the previous steps, the application failed to reconnect to the database, showing a perpetual "connecting" status. Restarting both the application and the database temporarily resolved the issue until it became impossible to start the application normally, displaying the same error despite attempts to uninstall and reinstall.

To Reproduce
Steps to reproduce the behavior:

  1. Execute database queries which then timeout after exceeding 10 seconds.
  2. Disconnect and reconnect to the database within the application after the first query timeout.
  3. On subsequent query timeouts, attempt to reconnect, leading to a failure to connect to the database.
  4. Restart the application and the database to temporarily resolve the issue.
  5. After multiple occurrences, the application fails to start normally, showing an error screen every time it's opened.
  6. Deleting the surrealist.json file from the AppData\Roaming directory allows the application to start normally again, but all configuration data is lost and needs to be set up again.

Expected behavior
Queries should execute within a reasonable time frame without causing the application to crash or fail to reconnect to the database. The application should start normally without requiring the deletion of configuration files.

Environment:

Additional Information
I have also provided the configuration file (surrealist.json) found in the AppData\Roaming directory, which could help in reproducing the error interface and understanding the issue in detail.

7b7dc904af51086a853f48ff4595a62b
macjuul commented 6 months ago

By analyzing your config it appears you're trying to execute the following query

use ns test;
use db test;
select * from person
CREATE person CONTENT {    name: 'Tobie',    company: 'SurrealDB',   skills: ['Rust', 'Go', 'JavaScript']};

However a semicolon is missing after the select statement, causing parsing confusion in SurrealDB itself.

Here's a fixed version of the config which should hopefully allow Surrealist to start up again (surrealist.json)

Cheyenne1025 commented 6 months ago

By analyzing your config it appears you're trying to execute the following query通过分析您的配置,似乎您正在尝试执行以下查询

use ns test;
use db test;
select * from person
CREATE person CONTENT {    name: 'Tobie',    company: 'SurrealDB',   skills: ['Rust', 'Go', 'JavaScript']};

However a semicolon is missing after the select statement, causing parsing confusion in SurrealDB itself.然而,在选择语句之后缺少一个分号,导致SurrealDB本身的解析混乱。

Here's a fixed version of the config which should hopefully allow Surrealist to start up again (surrealist.json)这是一个修复后的配置版本,希望能让Surrealist再次启动起来(surrealist.json)。

It's amazing that it was such a basic error. The reason for doing this was to debug the statement below, which would undergo constant modifications. For the sake of convenience in comparing data within the database, I placed the select all statement before executing the debug statement.

What's speechless is that it worked normally several times after doing so, and I couldn't anticipate that such an occasional small habit could lead to a basic error.

Thank you for your time and handling of the configuration file; it's working properly now. 😄❤