Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor help prompts, code navigation doesn't work, when I open some files #2407

Closed
xilu0 opened this issue Aug 13, 2022 · 2 comments
Closed

Comments

@xilu0
Copy link

xilu0 commented Aug 13, 2022

What version of Go, VS Code & VS Code Go extension are you using?

Version Information
  • Run go version to get version of Go from the VS Code integrated terminal.
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
  • Check your installed extensions to get the version of the VS Code Go extension
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.
vscode version: 1.70.0 language and extension: go 1.7.0

Share the Go related settings you have added/edited

Run Preferences: Open Settings (JSON) command to open your settings.json file.
Share all the settings with the go. or ["go"] or gopls prefixes.

Describe the bug

A clear and concise description of what the bug.
A clear and concise description of what you expected to happen.

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. See error

Screenshots or recordings

If applicable, add screenshots or recordings to help explain your problem.
developer tools console error:

workbench.desktop.main.js:sourcemap:2279 [[object Object]]Header must provide a Content-Length property.
$onExtensionRuntimeError @ workbench.desktop.main.js:sourcemap:2279
workbench.desktop.main.js:sourcemap:2279 Error: Header must provide a Content-Length property.
at StreamMessageReader.onData (/root/.vscode-server/extensions/golang.go-0.35.1/dist/goMain.js:3762:21)
at Socket. (/root/.vscode-server/extensions/golang.go-0.35.1/dist/goMain.js:3746:16)
at Socket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:199:23)

like:microsoft/vscode#157886

@gopherbot gopherbot added this to the Untriaged milestone Aug 13, 2022
@findleyr
Copy link
Member

findleyr commented Aug 13, 2022

Hi, this is almost certainly a dupe of #2406, which is a corruption of the jsonrpc2 stream. Thank you for reporting.

It is likely that you have the bad time format string "2006-02-01" somewhere in your project, and the stray print statement in the new "timeformat" analyzer is causing hanging.

Sorry for this unfortunate breakage - we only discovered it midday on Friday, and so will not be able to release a fix until Monday.

In the meantime you can do any one of the following fixes

  1. Remove that bad format string
  2. Disable the "timeformat" analyses
  3. Downgrade to [email protected] (go install golang.org/x/tools/[email protected])
  4. Upgrade to the next version of gopls that will be released on Monday (go install golang.org/x/tools/[email protected]).

@findleyr
Copy link
Member

Closing as a dupe.

@findleyr findleyr closed this as not planned Won't fix, can't repro, duplicate, stale Aug 14, 2022
@golang golang locked and limited conversation to collaborators Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants