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

I am getting error with templ-vscode extension #806

Closed
MukundSinghRajput opened this issue Jun 24, 2024 · 7 comments
Closed

I am getting error with templ-vscode extension #806

MukundSinghRajput opened this issue Jun 24, 2024 · 7 comments

Comments

@MukundSinghRajput
Copy link

[Error - 9:26:38 PM] Server process exited with code 1.
[Error - 9:26:38 PM] Server initialization failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 9:26:38 PM] Connection to server got closed. Server will not be restarted.
[Error - 9:26:38 PM] templ client: couldn't create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097

@burstman
Copy link

[Info - 19:45:01] 2024/06/24 19:45:01 Created View (#1)
directory=/home/hamed/goFullStack
view_type="GoMod"
root_dir="file:///home/hamed/goFullStack"
go_version="go version go1.22.3 linux/amd64"
build_flags=[]
env={GOOS:linux GOARCH:amd64 GOCACHE:/home/hamed/.cache/go-build GOMODCACHE:/home/hamed/go/pkg/mod GOPATH:/home/hamed/go GOPRIVATE: GOFLAGS: GO111MODULE: GoVersion:22 GoVersionOutput:go version go1.22.3 linux/amd64
ExplicitGOWORK: EffectiveGOPACKAGESDRIVER:}
env_overlay=[]

[Info - 19:45:01] 2024/06/24 19:45:01 go/packages.Load #1
view_id="1"
snapshot=0
directory=/home/hamed/goFullStack
query=[/home/hamed/goFullStack/... builtin]
packages=5
duration=537.215806ms

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x87a740]

goroutine 34 [running]:
github.com/a-h/templ/cmd/templ/lspcmd/proxy.(*Server).CodeAction(0xc00007e4b0, {0xa55250, 0xc0002d0910}, 0xc00030b740)
/home/hamed/go/pkg/mod/github.com/a-h/[email protected]/cmd/templ/lspcmd/proxy/server.go:294 +0x480
github.com/a-h/protocol.serverDispatch({0xa55250, 0xc0002d0910}, {0xa5b300, 0xc00007e4b0}, 0xc0003117a0, {0xa55528, 0xc0002ab7c0})
/home/hamed/go/pkg/mod/github.com/a-h/[email protected]/server.go:158 +0x4013
github.com/a-h/protocol.NewServer.ServerHandler.func1({0xa55250, 0xc0002d0910}, 0xc0003117a0, {0xa55528, 0xc0002ab7c0})
/home/hamed/go/pkg/mod/github.com/a-h/[email protected]/server.go:36 +0x7e
github.com/a-h/protocol.Handlers.ReplyHandler.func1({0xa55250, 0xc0002d0910}, 0xc00032e120, {0xa55528, 0xc0002ab7c0})
/home/hamed/go/pkg/mod/go.lsp.dev/[email protected]/handler.go:35 +0xc6
github.com/a-h/protocol.Handlers.AsyncHandler.func2.2()
/home/hamed/go/pkg/mod/go.lsp.dev/[email protected]/handler.go:114 +0x76
created by github.com/a-h/protocol.Handlers.AsyncHandler.func2 in goroutine 11
/home/hamed/go/pkg/mod/go.lsp.dev/[email protected]/handler.go:112 +0x165
[Error - 19:45:02] Server process exited with code 2.
[Error - 19:45:02] Connection to server got closed. Server will not be restarted.

@advdv
Copy link

advdv commented Jun 25, 2024

Probably: #800

@MukundSinghRajput
Copy link
Author

MukundSinghRajput commented Jun 25, 2024

@advdv I switched to older version gopls still getting the same error i have restarted my pc too

@advdv
Copy link

advdv commented Jun 25, 2024

Sorry, I can't help you past that point. You'll have to dig deeper yourself

@joerdav
Copy link
Collaborator

joerdav commented Jun 25, 2024

@MukundSinghRajput please try installing templ from the main branch go install github.com/a-h/templ/cmd/templ@main If this works then the next release will solve this for you.

@MukundSinghRajput
Copy link
Author

Thanks @advdv @joerdav i think it was some issue with my go download i reinstall go now templ is working fine i install older version of gopls not any error till now i hope it would be fine :)

@a-h
Copy link
Owner

a-h commented Jun 27, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants