Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

TestRespondToEcho is logging a panic #353

Open
daenney opened this issue Jul 21, 2021 · 0 comments
Open

TestRespondToEcho is logging a panic #353

daenney opened this issue Jul 21, 2021 · 0 comments

Comments

@daenney
Copy link
Contributor

daenney commented Jul 21, 2021

As part of #350 we discovered that during a test a panic gets logged, even though the test itself succeeds.

=== RUN   TestRespondToEcho
time="2021-05-19T08:55:31Z" level=info msg="Incoming request" req.id=smW335jjZJSf req.method=POST req.path=/admin/configureClient
time="2021-05-19T08:55:31Z" level=warning msg="Device ID is not set which will result in E2E encryption/decryption not working"
time="2021-05-19T08:55:31Z" level=error msg="Failed to load next_batch token" error="sql: no rows in result set" user_id="@link:hyrule"
time="2021-05-19T08:55:31Z" level=info msg="Created new client" auto_join_rooms=true device_id= since= sync=true user_id="@link:hyrule"
time="2021-05-19T08:55:31Z" level=info msg="Responding (372 bytes)" code=200 req.id=smW335jjZJSf req.method=POST req.path=/admin/configureClient
time="2021-05-19T08:55:31Z" level=info msg="Incoming request" req.id=Bk1hytf2pIFO req.method=POST req.path=/admin/configureService
time="2021-05-19T08:55:31Z" level=info msg="Incoming configure service request" req.id=Bk1hytf2pIFO req.method=POST req.path=/admin/configureService service_id=test_echo_service service_type=echo service_user_id="@link:hyrule"
time="2021-05-19T08:55:31Z" level=info msg="Responding (72 bytes)" code=200 req.id=Bk1hytf2pIFO req.method=POST req.path=/admin/configureService
time="2021-05-19T08:55:31Z" level=error msg="Fatal Sync() error" error="ProcessResponse panicked! since= panic=RoundTrip: Unhandled request: POST /_matrix/client/r0/keys/upload\nHandlers: 2\ngoroutine 12 [running]:\nruntime/debug.Stack(0xc000706e30, 0xba9080, 0xc0001aaa20)\n\t/opt/hostedtoolcache/go/1.16.4/x64/src/runtime/debug/stack.go:24 +0x9f\nmaunium.net/go/mautrix.(*DefaultSyncer).ProcessResponse.func1(0x0, 0x0, 0xc000707d18)\n\t/home/runner/go/pkg/mod/maunium.net/go/[email protected]/sync.go:133 +0x76\npanic(0xba9080, 0xc0001aaa20)\n\t/opt/hostedtoolcache/go/1.16.4/x64/src/runtime/panic.go:965 +0x1b9\ngithub.com/matrix-org/go-neb.(*matrixTripper).RoundTrip(0xc0000aaa78, 0xc000112300, 0xc0000aaa78, 0x0, 0x0)\n\t/home/runner/work/go-neb/go-neb/testutil_test.go:43 +0x33f\nnet/http.send(0xc000112300, 0xd96080, 0xc0000aaa78, 0x0, 0x0, 0x0, 0xc0000102c8, 0x1e, 0x1, 0x0)\n\t/opt/hostedtoolcache/go/1.16.4/x64/src/net/http/client.go:251 +0x454\nnet/http.(*Client).send(0xc0001a9890, 0xc000112300, 0x0, 0x0, 0x0, 0xc0000102c8, 0x0, 0x1, 0x419ffb)\n\t/opt/hostedtoolcache/go/1.16.4/x64/src/net/http/client.go:175 +0xff\nnet/http.(*Client).do(0xc0001a9890, 0xc000112300, 0x0, 0x0, 0x0)\n\t/opt/hostedtoolcache/go/1.16.4/x64/src/net/http/client.go:717 +0x45f\nnet/http.(*Client).Do(...)\n\t/opt/hostedtoolcache/go/1.16.4/x64/src/net/http/client.go:585\nmaunium.net/go/mautrix.(*Client).executeCompiledRequest(0xc0004441a0, 0xc000112300, 0x0, 0xee6b2800, 0xb7c920, 0xc0000102b8, 0x0, 0x0, 0x0, 0x0, ...)\n\t/home/runner/go/pkg/mod/maunium.net/go/[email protected]/client.go:393 +0xe7\nmaunium.net/go/mautrix.(*Client).MakeFullRequest(0xc0004441a0, 0xcb0dfd, 0x4, 0xc000784c00, 0x2f, 0x0, 0xb8d6e0, 0xc00045b6f0, 0x0, 0x0, ...)\n\t/home/runner/go/pkg/mod/maunium.net/go/[email protected]/client.go:360 +0x1e5\nmaunium.net/go/mautrix.(*Client).MakeRequest(...)\n\t/home/runner/go/pkg/mod/maunium.net/go/[email protected]/client.go:284\nmaunium.net/go/mautrix.(*Client).UploadKeys(0xc0004441a0, 0xc00045b6f0, 0x1a, 0xc00045b700, 0x1)\n\t/home/runner/go/pkg/mod/maunium.net/go/[email protected]/client.go:1184 +0x258\nmaunium.net/go/mautrix/crypto.(*OlmMachine).ShareKeys(0xc00048c000, 0x0, 0x4e, 0xc00045a9d0)\n\t/home/runner/go/pkg/mod/maunium.net/go/[email protected]/crypto/machine.go:421 +0x1a5\nmaunium.net/go/mautrix/crypto.(*OlmMachine).ProcessSyncResponse(0xc00048c000, 0xc00046c4d0, 0x0, 0x0, 0x767d18)\n\t/home/runner/go/pkg/mod/maunium.net/go/[email protected]/crypto/machine.go:180 +0x305\ngithub.com/matrix-org/go-neb/clients.(*BotClient).syncCallback(0xc0001a5220, 0xc00046c4d0, 0x0, 0x0, 0xcf5f01)\n\t/home/runner/work/go-neb/go-neb/clients/bot_client.go:113 +0x75\nmaunium.net/go/mautrix.(*DefaultSyncer).ProcessResponse(0xc000296e60, 0xc00046c4d0, 0x0, 0x0, 0x0, 0x0)\n\t/home/runner/go/pkg/mod/maunium.net/go/[email protected]/sync.go:138 +0x110\nmaunium.net/go/mautrix.(*Client).SyncWithContext(0xc0004441a0, 0xda3a50, 0xc0000a6010, 0x0, 0x0)\n\t/home/runner/go/pkg/mod/maunium.net/go/[email protected]/client.go:245 +0x22d\nmaunium.net/go/mautrix.(*Client).Sync(...)\n\t/home/runner/go/pkg/mod/maunium.net/go/[email protected]/client.go:201\ngithub.com/matrix-org/go-neb/clients.(*BotClient).Sync(0xc0001a5220)\n\t/home/runner/work/go-neb/go-neb/clients/bot_client.go:170 +0x185\ncreated by github.com/matrix-org/go-neb/clients.(*Clients).initClient\n\t/home/runner/work/go-neb/go-neb/clients/clients.go:417 +0xd65\n" user_id="@link:hyrule"

We should investigate why this happens and fix it.

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

No branches or pull requests

1 participant