code-server: [Bug]: Search not working

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome
  • Local OS: Docker
  • Remote OS: coder Docker image
  • Remote Architecture: amd64
  • code-server --version: v4.8.3
  • Code: 1.72.1
  • Commit: 129500ee4c8ab7263461ffe327268ba56b9f210d
  • Date: 2022-11-07T18:19:38.940Z (3 wks ago)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36

Steps to Reproduce

Sorry no idea how this happened just stopped working

Expected

Get search results

Actual

No results at all for any kind of search

Logs

Logs show no errors. Search does not produce any log entry

Screenshot/Video

https://www.youtube.com/watch?v=3PA1NcCzGbU IMAGE ALT TEXT

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

Totally lost… I’ve recreated the container from scratch many times. No way…

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 24 (10 by maintainers)

Most upvoted comments

@jsjoeio It’s not working for me also. I am using the v4.8.3 version

This is the error i see in Developer console when i do search in files.

  ERR vscode-remote://code.testapp.com/home/proj1/gahandler/gahandler.go is not correctly configured as a child of its vscode-remote://code.testapp.com/home/ana/html/prod/testapp/: Error: vscode-remote://code.testapp.com/home/proj1/gahandler/gahandler.go is not correctly configured as a child of its vscode-remote://code.testapp.com/home/ana/html/prod/testapp/
    at M.createAndConfigureFileMatch (https://code.testapp.com/stable-129500ee4c8ab7263461ffe327268ba56b9f210d/static/out/vs/workbench/workbench.web.main.js:2174:12558)
    at https://code.testapp.com/stable-129500ee4c8ab7263461ffe327268ba56b9f210d/static/out/vs/workbench/workbench.web.main.js:2174:9067
    at Array.forEach (<anonymous>)
    at M.addFileMatch (https://code.testapp.com/stable-129500ee4c8ab7263461ffe327268ba56b9f210d/static/out/vs/workbench/workbench.web.main.js:2174:8830)
    at https://code.testapp.com/stable-129500ee4c8ab7263461ffe327268ba56b9f210d/static/out/vs/workbench/workbench.web.main.js:2174:17698
    at c.forEach (https://code.testapp.com/stable-129500ee4c8ab7263461ffe327268ba56b9f210d/static/out/vs/workbench/workbench.web.main.js:70:78861)
    at x.add (https://code.testapp.com/stable-129500ee4c8ab7263461ffe327268ba56b9f210d/static/out/vs/workbench/workbench.web.main.js:2174:17630)
    at V.onSearchCompleted (https://code.testapp.com/stable-129500ee4c8ab7263461ffe327268ba56b9f210d/static/out/vs/workbench/workbench.web.main.js:2174:22407)
    at https://code.testapp.com/stable-129500ee4c8ab7263461ffe327268ba56b9f210d/static/out/vs/workbench/workbench.web.main.js:2174:22080

@gbrian Yes you are right i just tested it. Where there is a slash in the folder name the search does not work. After i removed the slash it started working.

Great man 👍

OMG found it

Issue is when your “folder” query qtring parameter ends with “/” slash Error:

https://my.coder-domain.com/?folder=/home/project/

Works

https://my.coder-domain.com/?folder=/home/project

Please note second “folder” parameter doesn’t has trailing “/”

@khanakia can you please confirm this point? Thanks in advance

Started getting the same issue again. PS: I have updated the code-server to the new version 4.9.0 0502dfa1ff42ab8a43adb911f7bf21f8b09ee25f with Code 1.73.1

Also i see some new errors too

ERR Error while registering log channel vscode-log:/20221215T155853/remoteTunnel.log Timed out while waiting for file to be created
workbench.web.main.js:609   
ERR Error while registering log channel file:///20221215T155853/ptyhost.log Timed out while waiting for file to be created

May be it has something to do with caches ?

Wow that is strange. I was able to reproduce in Codespaces so it seems to be an upstream bug.

Ok i made the search work i added this setting or it could be something with browser also i was using OPERA i faced same issue in chrome but after reloading multiple times somehow it started working in Chrome but not in Opera

{
    "security.workspace.trust.enabled": false,
    "security.workspace.trust.emptyWindow": false
}

Solved!!

Worked for me after setting this (before I updated to 4.9.1) 👏 👏 thanks @khanakia @jsjoeio

image

Yes, i tried in Incognito, and also same issue.

Then i started debugging further and was able to make it work again 😃

I deleted this directory/root/.local/share/code-server/User/caches and then restarted the code-server and it started working again.

Ok i made the search work i added this setting or it could be something with browser also i was using OPERA i faced same issue in chrome but after reloading multiple times somehow it started working in Chrome but not in Opera

{
    "security.workspace.trust.enabled": false,
    "security.workspace.trust.emptyWindow": false
}