Sandertv / gophertunnel

General purpose library for Minecraft Bedrock Edition software written in Go
MIT License
419 stars 95 forks source link

Failing to connect after successful authentication #149

Closed codymikol closed 1 year ago

codymikol commented 1 year ago

getting this error

Failed to connect%!v(PANIC=Error method: runtime error: invalid memory address or nil pointer dereference)panic: runtime error: invalid memory address or nil pointer dereference
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x72249a]
goroutine 1 [running]:
github.com/sandertv/gophertunnel/minecraft.(*Conn).Close(0xc000020280?)
        /home/cody/go/pkg/mod/github.com/sandertv/gophertunnel@v1.24.5/minecraft/conn.go:440 +0x1a
panic({0x76fee0, 0xaac660})
        /snap/go/9952/src/runtime/panic.go:838 +0x207
go.uber.org/atomic.(*Bool).Load(...)
        /home/cody/go/pkg/mod/go.uber.org/atomic@v1.9.0/bool.go:49
github.com/sandertv/gophertunnel/minecraft.(*Conn).DoSpawnContext(0x882990?, {0x8829c8?, 0xc0002ae660?})
        /home/cody/go/pkg/mod/github.com/sandertv/gophertunnel@v1.24.5/minecraft/conn.go:274 +0x28
github.com/sandertv/gophertunnel/minecraft.(*Conn).DoSpawn(0x87c240?)
        /home/cody/go/pkg/mod/github.com/sandertv/gophertunnel@v1.24.5/minecraft/conn.go:254 +0x6b
main.seeIfAnyoneIsHome()
        /home/cody/GolandProjects/livegoverflow/main.go:33 +0x173
main.main()
        /home/cody/GolandProjects/livegoverflow/main.go:65 +0x17

I've tried on a locally and externally hosted server with no luck, any ideas what I might be doing wrong?

Sandertv commented 1 year ago

Sorry for the lack of response. Could you try on the latest version and see if it still happens? If so, does it still report the same error?

codymikol commented 1 year ago
Failed to connectdial minecraft: error obtaining Live Connect token: error polling for device auth: POST https://login.live.com/oauth20_token.srf: Post "https://login.live.com/oauth20_token.srf": read tcp [2605:59c8:2554:ea00:796c:3036:b9a6:e996]:50178->[2603:1036:3000:10::1]:443: read: connection reset by peerpanic: runtime error: invalid memory address or nil pointer dereference
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x73179a]

goroutine 1 [running]:
github.com/sandertv/gophertunnel/minecraft.(*Conn).Close(0xc000118250?)
        /home/cody/go/pkg/mod/github.com/sandertv/gophertunnel@v1.27.4/minecraft/conn.go:450 +0x1a
panic({0x786820, 0xade740})
        /snap/go/10050/src/runtime/panic.go:884 +0x212
github.com/sandertv/gophertunnel/minecraft.(*Conn).DoSpawnContext(0x0, {0x8a08e8, 0xc0002a8300})
        /home/cody/go/pkg/mod/github.com/sandertv/gophertunnel@v1.27.4/minecraft/conn.go:289 +0x30
github.com/sandertv/gophertunnel/minecraft.(*Conn).DoSpawn(0x89b100?)
        /home/cody/go/pkg/mod/github.com/sandertv/gophertunnel@v1.27.4/minecraft/conn.go:268 +0x6b
main.seeIfAnyoneIsHome()
        /home/cody/GolandProjects/livegoverflow/main.go:33 +0x173
main.main()
        /home/cody/GolandProjects/livegoverflow/main.go:65 +0x17

latest

Sandertv commented 1 year ago

Hmmm this does not look like an issue we can resolve. Something is wrong with the logging in to the Microsoft account.

codymikol commented 1 year ago

ahhh, no worries, probably just a personal problem