Handshake failed

Codebase Indexing always fails.
Even though I’ve looked at other articles, it seems like everyone else has been able to resolve it, but it’s not resolved in my environment.

I would appreciate any advice on what might be the cause.

=============================
2024-03-03 10:53:24.222 [error] Handshake failed:

2024-03-03 10:53:24.223 [error] Error: timeout in handshake with retry

at e.RepoClientMultiplexer.handshakeWithRetry (/Applications/Cursor.app/Contents/Resources/app/extensions/cursor-retrieval/dist/main.js:2:848660)

at async m.getServerStatus (/Applications/Cursor.app/Contents/Resources/app/extensions/cursor-retrieval/dist/main.js:2:863619)

at async m.startIndexingRepository (/Applications/Cursor.app/Contents/Resources/app/extensions/cursor-retrieval/dist/main.js:2:865864)

2024-03-03 10:53:24.223 [error] Handshake failed.

It could be possible that Cursor had some server outage at that time. Does the codebase indexing still fail for you?

Even when I try now, it still results in “Handshake failed.”
Here’s the log:

2024-03-07 09:26:26.868 [error] Error: Command failed: git config --get remote.origin.url

	at ChildProcess.exithandler (node:child_process:430:12)
	at ChildProcess.emit (node:events:514:28)
	at maybeClose (node:internal/child_process:1091:16)
	at Socket.<anonymous> (node:internal/child_process:449:11)
	at Socket.emit (node:events:514:28)
	at Pipe.<anonymous> (node:net:323:12)
2024-03-07 09:26:27.039 [info] Creating merkle client.
2024-03-07 09:26:27.039 [info] Done creating merkle client.
2024-03-07 09:26:27.039 [info] Doing a startup handshake.
2024-03-07 09:26:27.062 [info] Finished initializing merkle tree in 23.34366601705551 ms.
2024-03-07 09:26:27.063 [info] Doing the initial handshake with hash: a30b2bb06e560b475d1d4aae2d64d5ced4159745d4da23d19020b0db6b6a76fd
2024-03-07 09:28:33.261 [error] Handshake failed:
2024-03-07 09:28:33.272 [error] Error: timeout in handshake with retry
	at e.RepoClientMultiplexer.handshakeWithRetry (/Applications/Cursor.app/Contents/Resources/app/extensions/cursor-retrieval/dist/main.js:2:848660)
	at async m.getServerStatus (/Applications/Cursor.app/Contents/Resources/app/extensions/cursor-retrieval/dist/main.js:2:863619)
	at async m.startIndexingRepository (/Applications/Cursor.app/Contents/Resources/app/extensions/cursor-retrieval/dist/main.js:2:865864)
2024-03-07 09:28:33.272 [error] Handshake failed.
2024-03-07 09:28:33.273 [info] Indexing job successfully done or aborted.

The version I am using is as follows. If it helps:

version: 0.29.1
commit: 1.86.2
date: a962ca5721e80876320cb6a3a500cbc1cf679150
Electron: 2024-03-02T20:35:34.996Z
ElectronBuildId: 27.2.3
Chromium: undefined
Node.js: 118.0.5993.159
V8: 18.17.1
OS: 11.8.172.18-electron.0

Same issue. It keeps on failing no matter what I do. At this point, Cursor is completely unusable.

Edit: I managed to resolve this by opening any random file, keeping it opened in my explorer and then running the indexing again. While the indexing failed with the same handshake error, I now see, and am able to tag files that are in my codebase - as well as run codebase-centric prompts. Interesting.