Codebase Indexing No Longer Working Inside Dev Containers

I do most of my development inside Dev Containers, and largely have not had many issues using Cursor inside Dev Containers.

However I have a new issue where the Codebase Indexing feature no longer works when developing inside of Dev Containers. Previously, this feature functioned normally / as expected when developing both locally as well as inside of Dev Containers.

Now, when I launch a project inside a Dev Container, the Codebase Indexing feature hangs on “Loading…” indefinitely, and the button / option to begin or initiate indexing never appears:

Codebase Indexing can never be conducted, as the controls for initiating it never appear (held up by the indefinite “Loading…” status)

Using the same project locally, outside of a Dev Container, the Codebase Indexing feature works normally, and the button / option to index appears and functions as expected:

So the issue is certainly isolated to the Codebase Indexing feature not working correctly within Dev Containers.

These are the version details for my current Cursor installation:

Version: 0.41.1
VSCode Version: 1.91.1
Commit: 10e3716b510a5d447c1a07b2edd37a352bbea4d0
Date: 2024-09-18T07:38:06.522Z (2 days ago)
Electron: 29.4.0
ElectronBuildId: undefined
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Darwin arm64 24.0.0

However this issue was also noticed with the previous version I had installed as well (an unknown version now, but it was recent within the last week or so)

I also noticed this issue both using Docker Desktop-based containers as well as Orbstack-based containers, so it’s likely not a container / docker issue.

Has anyone else noticed this new issue? Or has anyone been able to determine a fix for it yet?

2 Likes

I’m also facing this issue

Version: 0.41.2
VSCode Version: 1.91.1
Commit: 297991d169fa3a11975c5aa95adc69be73250c70
Date: 2024-09-21T04:18:39.370Z (2 days ago)
Electron: 29.4.0
ElectronBuildId: undefined
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Darwin arm64 23.6.0

Current version is Not ready for arm system. Which caused codebase indexing keeping loading status and backend File sync process is disabled due to that.

workbench.desktop.main.js:2774 Activating extension ‘anysphere.cursor-retrieval’ failed: Cannot find module ‘@anysphere/file-service-linux-arm64-gnu’


Rollback to 0.40.4 and the issue is gone.

1 Like

How can i do this on Mac? I wanted to uninstall and install back, but can’t find for dl that version, for mac

Same problem here, how to install older version like 0.40.4 ?

Also having this issue, it’s really annoying and needs to be fixed!

Same issue. Using SSH in a remote environment Codebase indexing stuck

https://dl.todesktop.com/230313mzl4w4u92/versions/0.40.4/mac/dmg/arm64 that would be awesome!

pname = “cursor”;
version = “0.41.2”;
appKey = “230313mzl4w4u92”;
src = fetchurl {
url = “https://dl.todesktop.com/${appKey}/versions/${version}/linux”;
hash = “sha256-zBNNKpSzRKC0R8kscHyCNaMzA/czcYKrAM9vHv2tHsA=”;
};

same here, the remote machine arch is aarch64

workbench.desktop.main.js:2774 Activating extension 'anysphere.cursor-retrieval' failed: Cannot find module '@anysphere/file-service-linux-arm64-gnu'
Require stack:
- /home/jetson/.cursor-server/cli/servers/Stable-51c8aff7cb5a89f4a0e462fbacab938bdbfaf140/server/extensions/cursor-retrieval/node_modules/@anysphere/file-service/index.js
- /home/jetson/.cursor-server/cli/servers/Stable-51c8aff7cb5a89f4a0e462fbacab938bdbfaf140/server/extensions/cursor-retrieval/dist/main.js
- /home/jetson/.cursor-server/cli/servers/Stable-51c8aff7cb5a89f4a0e462fbacab938bdbfaf140/server/out/vs/loader.js
- /home/jetson/.cursor-server/cli/servers/Stable-51c8aff7cb5a89f4a0e462fbacab938bdbfaf140/server/out/bootstrap-amd.js
- /home/jetson/.cursor-server/cli/servers/Stable-51c8aff7cb5a89f4a0e462fbacab938bdbfaf140/server/out/bootstrap-fork.js.

Hi netcaster, I download the 0.40.4 and work fine.
but Cursor auto update to last version 0.41.3, do you know how to disable the auto update?

thanks.

You can find the steps in my Twitter post.
But it is only for windows

Having trouble with codebase indexing and adding new docs on local as well.
system: macOS

Workaround for Cannot find module '@anysphere/file-service-linux-arm64-gnu' Error

To resolve the error Cannot find module '@anysphere/file-service-linux-arm64-gnu', we can manually install the package. This issue occurs because the remote VS Code server initialization mistakenly installs the x64 version instead of the arm64 version.

Target Directory:

~/.cursor-server/cli/servers/Stable-<version>/server/extensions/cursor-retrieval/node_modules/@anysphere

Replace <version> with your specific Cursor version.

Important: Use the same version as the original file-service-linux-x64-gnu, e.g., 0.0.0-51333e36-6e776f2305a251cf73bd51c4fcdf375334c99ed76a393f3b4efd90b6eace2b69.

Directory structure before and after the fix:

# Before
$ ls ~/.cursor-server/cli/servers/Stable-9e8f0f993884031e2f08d75f7adab80d1732a980/server/extensions/cursor-retrieval/node_modules/@anysphere
file-service  file-service-linux-x64-gnu

# After
$ ls ~/.cursor-server/cli/servers/Stable-9e8f0f993884031e2f08d75f7adab80d1732a980/server/extensions/cursor-retrieval/node_modules/@anysphere
file-service  file-service-linux-arm64-gnu  file-service-linux-x64-gnu

After applying the fix, reload the Cursor workspace. This solution has been tested and confirmed working on my MacBook Pro (host: arm64 macOS, remote: arm64 Linux).

3 Likes

Amazing find dude — This works for me! :tada:

A bit annoying that I might have to do this for every new container until they actually fix it, but at least it works and codebase indexing can function inside a dev container now!

A couple of notes for anyone else trying this workaround:

  • The directory structure in my container was a little bit different from @yuthon’s– the needed path that contained the file-service and file-service-linux-x64-gnu packages was located at the directory (You might have to do some ls or ls -all hunting in terminal to find the right directory):
~/.cursor-server/bin/<version>/extensions/cursor-retrieval/node_modules/@anysphere
  • If it wasn’t clear, use the command npm install @anysphere/file-service-linux-arm64-gnu to install the needed service

  • When installed it, for some reason it deleted the existing file-service and file-service-linux-x64-gnu packages after successfully installing file-service-linux-arm64-gnu

    • I wasn’t sure what implication this would have, so I reinstalled them using the command npm install @anysphere/file-service @anysphere/file-service-linux-x64-gnu. Interestingly, only the file-service package would install, and the file-service-linux-x64-gnu package refused to reinstall throwing and error related to the machine being an arm64 machine (makes sense)

Ultimately, my final subdirectory structure looks like this:

# Before
$ ls ~/.cursor-server/bin/51c8aff7cb5a89f4a0e462fbacab938bdbfaf140/extensions/cursor-retrieval/node_modules/@anysphere
file-service  file-service-linux-x64-gnu

# After
$ ls ~/.cursor-server/bin/51c8aff7cb5a89f4a0e462fbacab938bdbfaf140/extensions/cursor-retrieval/node_modules/@anysphere
file-service  file-service-linux-arm64-gnu

And with this workaround, indexing now works inside a Dev Container for me again after rebuilding / restarting the container:

1 Like

@trevordcampbell Thanks for helping with this! I did as you described, but unfortunately this did not work for me. What worked in the end was:

  1. Open your Dev Container in Cursor, in the terminal execute: rm -rf ~/.cursor-server/bin/ && rm -rf /vscode/cursor-server/ to clean-up Cursor Server
  2. Relaunch Cursor, it will now re-download the Cursor Server for your current version
  3. In your Dev Container and Terminal, go into the Binary folder (cd /vscode/cursor-server/bin/linux-arm64/) and into the one version that has been newly downloaded, f. ex. c499aee5f16e67815c7dc795ff338dc8ab3e07f0
  4. Cd into the File-Service Module: cd extensions/cursor-retrieval/node_modules/@anysphere/#
  5. Run ls, we expect to see file-service and file-service-linux-x64-gnu, which is the wrong platform and we want to change that against file-service-linux-arm64-gnu
  6. Run npm ls and copy the version of the currently installed file-service package, f. ex. @anysphere/file-service@0.0.0-51333e36-b5a1ea2b87155ab8ae516f33ff320ebbd21e10de5b9276996ce3c3e44dbd1a83
  7. Yarn add this package together with the missing ARM64 package: yarn add @anysphere/file-service@0.0.0-51333e36-b5a1ea2b87155ab8ae516f33ff320ebbd21e10de5b9276996ce3c3e44dbd1a83 @anysphere/file-service-linux-arm64-gnu
  8. Relaunch Cursor and Indexing should work again!

1 Like

Thanks for the info all. Curious - are you also seeing the “Review” tab infinitely load (without the fix)? I’m seeing both behaviors when working in a dev container.

This has been working for me but I have to run it on each new container.

#!/bin/bash
rm -rf ~/.cursor-server/bin/ && rm -rf /vscode/cursor-server/
version=$(ls ~/.cursor-server/bin/ | grep -E '^[0-9a-f]{40}$')
printf "version: $version\n"
cd ~/.cursor-server/bin/$version/extensions/cursor-retrieval/node_modules/@anysphere
npm install @anysphere/file-service-linux-arm64-gnu --silent
npm install @anysphere/file-service --silent
2 Likes

Thanks for the workaround! but i didn´t manage to make it run.

Followed steps:

  • Remove directories
    rm -rf ~/.cursor-server/bin/ && rm -rf /vscode/cursor-server/

  • Disconnect from container y connect again

  • Other steps from your script (done this way cause couldn´t query installed version if removed first)

version=$(ls ~/.cursor-server/bin/ | grep -E '^[0-9a-f]{40}$')
printf "version: $version\n"
cd ~/.cursor-server/bin/$version/extensions/cursor-retrieval/node_modules/@anysphere
npm install @anysphere/file-service-linux-arm64-gnu --silent
npm install @anysphere/file-service --silent

  • Disconnect from container y connect again
  • Get the followin error:
2024-11-05 13:52:14.782 [info] Creating merkle client.
2024-11-05 13:52:14.782 [info] Done creating merkle client.
2024-11-05 13:52:14.782 [info] Doing a startup handshake.
2024-11-05 13:52:14.808 [error] TypeError: this.merkleClient.initWithRipgrepIgnore is not a function
at S.initializeMerkleTreeWithRipgrepIgnore (/vscode/cursor-server/bin/linux-arm64/b1e87884330fc271d5eb589e368c35f14e76dec0/extensions/cursor-retrieval/dist/main.js:2:826004)
at S.getServerStatus (/vscode/cursor-server/bin/linux-arm64/b1e87884330fc271d5eb589e368c35f14e76dec0/extensions/cursor-retrieval/dist/main.js:2:823904)
at async S.startIndexingRepository (/vscode/cursor-server/bin/linux-arm64/b1e87884330fc271d5eb589e368c35f14e76dec0/extensions/cursor-retrieval/dist/main.js:2:826840)
2024-11-05 13:52:14.808 [info] Indexing job successfully done or aborted.

Same issue here, it make indexation fail which is the most interesting feature to me. Hope it ll be fixed soon.