zed icon indicating copy to clipboard operation
zed copied to clipboard

Cannot delete remote projects

Open sophiawisdom opened this issue 1 year ago • 2 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

After using remote projects for a while there come to be remote projects that I can't delete. When I try I get an error that says "Failed to delete dev server": "RPC request DeleteDevServer failed: Execution Error: error returned from database: update or delete on table "dev_server_projects" violates foreign key constraint "projects_dev_server_project_id_fkey" on table "projects". Please try again."

Environment

Zed: v0.155.2 (Zed) OS: macOS 14.2.0 Memory: 24 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log

2024-10-08T15:58:05.390833-07:00 [INFO] set status on client 204919: Connected { peer_id: PeerId { owner_id: 563, id: 25163 }, connection_id: ConnectionId { owner_id: 0, id: 0 } }
2024-10-08T15:58:07.102857-07:00 [INFO] Initializing default prettier with plugins {}
2024-10-08T15:58:07.120863-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:07.222772-07:00 [ERROR] RPC request SynchronizeContexts failed: no such connection: 545/10978631
2024-10-08T15:58:07.246476-07:00 [ERROR] RPC request CreateContext failed: no such connection: 545/10978631
2024-10-08T15:58:09.190559-07:00 [ERROR] RPC request OpenBufferByPath failed: no such connection: 545/10978631
2024-10-08T15:58:13.979656-07:00 [INFO] ========== starting zed ==========
2024-10-08T15:58:13.980284-07:00 [INFO] Opening main db
2024-10-08T15:58:13.980928-07:00 [INFO] Opening main db
2024-10-08T15:58:14.002561-07:00 [INFO] Using git binary path: Some("/Applications/Zed.app/Contents/MacOS/git")
2024-10-08T15:58:14.116112-07:00 [INFO] set environment variables from shell:/bin/zsh, path:/Users/sophiawisdom/Downloads/google-cloud-sdk/bin:/Users/sophiawisdom/Library/Python/3.9/bin:/Users/sophiawisdom/.bun/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/sophiawisdom/.cargo/bin:/Users/sophiawisdom/.orbstack/bin
2024-10-08T15:58:14.120255-07:00 [INFO] initializing context server client
2024-10-08T15:58:14.120362-07:00 [INFO] Registering built-in prompt template: content_prompt
2024-10-08T15:58:14.120651-07:00 [INFO] Registering built-in prompt template: edit_workflow
2024-10-08T15:58:14.120816-07:00 [INFO] Registering built-in prompt template: project_slash_command
2024-10-08T15:58:14.120879-07:00 [INFO] Registering built-in prompt template: step_resolution
2024-10-08T15:58:14.121178-07:00 [INFO] Registering built-in prompt template: terminal_assistant_prompt
2024-10-08T15:58:14.121315-07:00 [INFO] No prompt template overrides directory found at /Users/sophiawisdom/.config/zed/prompt_overrides. Using built-in prompts.
2024-10-08T15:58:14.121551-07:00 [INFO] extensions updated. loading 3, reloading 0, unloading 0
2024-10-08T15:58:14.155035-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.155104-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.155162-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.155208-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.155745-07:00 [INFO] Opening main db
2024-10-08T15:58:14.155888-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.155935-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.155971-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.156007-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.156048-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.157118-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.184404-07:00 [INFO] Opening main db
2024-10-08T15:58:14.184463-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.184545-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.184593-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.198951-07:00 [INFO] Initializing default prettier with plugins {}
2024-10-08T15:58:14.199152-07:00 [INFO] set status on client 0: Authenticating
2024-10-08T15:58:14.200441-07:00 [INFO] Initializing default prettier with plugins {}
2024-10-08T15:58:14.200954-07:00 [INFO] Opening main db
2024-10-08T15:58:14.201072-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.201265-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.201983-07:00 [ERROR] no worktrees when constructing LocalLspAdapterDelegate
2024-10-08T15:58:14.204499-07:00 [INFO] set status on client 204919: Connecting
2024-10-08T15:58:14.210642-07:00 [INFO] Initializing default prettier with plugins {}
2024-10-08T15:58:14.211148-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.268585-07:00 [INFO] Initializing default prettier with plugins {}
2024-10-08T15:58:14.269308-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.336929-07:00 [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2024-10-08T15:58:14.37205-07:00 [INFO] starting language server process. binary path: "/opt/homebrew/bin/node", working directory: "/", args: ["/Users/sophiawisdom/Library/Application Support/Zed/copilot/copilot-v0.5.0/dist/agent.js", "--stdio"]
2024-10-08T15:58:14.418943-07:00 [INFO] Initializing default prettier with plugins {}
2024-10-08T15:58:14.419578-07:00 [WARN] request completed with error: failed to connect to the server
2024-10-08T15:58:14.586679-07:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-10-08T22:58:14.584Z] Agent service starting",
  "metadataStr": "[DEBUG] [agent] [2024-10-08T22:58:14.584Z]",
  "extra": [
    "Agent service starting"
  ]
}
2024-10-08T15:58:14.58778-07:00 [INFO] Language server with id 0 sent unhandled notification client/registerCapability:
{
  "registrations": [
    {
      "id": "9c650e87-5e45-4d0a-bf62-ed9b41bd92b2",
      "method": "workspace/didChangeWorkspaceFolders",
      "registerOptions": {}
    }
  ]
}
2024-10-08T15:58:14.60274-07:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-10-08T22:58:14.591Z] Telemetry initialized",
  "metadataStr": "[DEBUG] [agent] [2024-10-08T22:58:14.591Z]",
  "extra": [
    "Telemetry initialized"
  ]
}
2024-10-08T15:58:14.778662-07:00 [INFO] add connection to peer
2024-10-08T15:58:14.778735-07:00 [INFO] add_connection;
2024-10-08T15:58:14.77881-07:00 [INFO] waiting for server hello
2024-10-08T15:58:14.81355-07:00 [INFO] got server hello
2024-10-08T15:58:14.81365-07:00 [INFO] set status to connected (connection id: ConnectionId { owner_id: 0, id: 0 }, peer id: PeerId { owner_id: 563, id: 25195 })
2024-10-08T15:58:14.813793-07:00 [INFO] set status on client 204919: Connected { peer_id: PeerId { owner_id: 563, id: 25195 }, connection_id: ConnectionId { owner_id: 0, id: 0 } }
2024-10-08T15:58:18.105297-07:00 [ERROR] RPC request DeleteDevServer failed: Execution Error: error returned from database: update or delete on table "dev_server_projects" violates foreign key constraint "projects_dev_server_project_id_fkey" on table "projects"
2024-10-08T15:58:20.460437-07:00 [ERROR] RPC request DeleteDevServer failed: Execution Error: error returned from database: update or delete on table "dev_server_projects" violates foreign key constraint "projects_dev_server_project_id_fkey" on table "projects"
2024-10-08T16:01:33.135347-07:00 [ERROR] RPC request DeleteDevServer failed: Execution Error: error returned from database: update or delete on table "dev_server_projects" violates foreign key constraint "projects_dev_server_project_id_fkey" on table "projects"

sophiawisdom avatar Oct 08 '24 23:10 sophiawisdom

This can be fixed by deleting the directory the project has been opened to inside and then deleting the enclosing project.

sophiawisdom avatar Oct 09 '24 00:10 sophiawisdom

I'm encountering the same:

CleanShot 2024-10-09 at 13 18 47@2x

...but the remote project in question is on a server that no longer exists — thus it's not possible for me to open it to first "remove the directory from the workspace" 🥲

fasterthanlime avatar Oct 09 '24 11:10 fasterthanlime

On Linux, I get this dialog when trying to delete the remote directory:

image

fonnesbeck avatar Oct 14 '24 14:10 fonnesbeck

Sorry for leaving this broken! We are planning to remove the existing dev server support over the next few weeks as we'd prefer to push people to a purely SSH-based version.

If you'd like to try the new version out sooner, please download Zed Preview. You will need to reconfigure your connections, but the new version should be faster and more stable.

If you run into problems, please let me know either here or in the #remote-development channel on Discord

ConradIrwin avatar Oct 17 '24 03:10 ConradIrwin