dedis / cothority

Scalable collective authority
Other
425 stars 106 forks source link

error not returned by onet correctly #1265

Closed jeffallen closed 5 years ago

jeffallen commented 6 years ago

Seen when sending an invalid Open{} into the Election service (the Open had ID and Sig and User set right, but Election left to a nil.).

This might be an onet error and not cothority's fault.

2 : ( onet.wsHandler.ServeHTTP: 178) - ws request from 128.178.151.190:62325: evoting/Open 2 : ( skipchain.(Service).StoreSkipBlock: 181) - Creating new skipchain with roster [tls://voting-web-beta.epfl.ch:7002 tls://voting-web-beta.epfl.ch:7004 tls://voting-web-beta.epfl.ch:7006 tls://voting-web-beta.epfl.ch:7008 tls://voting-web-beta.epfl.ch:7010 tls://voting-web-beta.epfl.ch:7012 tls://voting-web-beta.epfl.ch:7014] 2 : ( onet.wsHandler.ServeHTTP.func1: 144) - ws close 128.178.151.190:62325 n 1 rx 104 tx 0 ok false 2018/05/30 17:22:12 http: panic serving 128.178.151.190:62325: interface conversion: interface {} is reflect.ValueError, not string goroutine 33821 [running]: net/http.(conn).serve.func1(0xc42017e3c0) /usr/lib/go-1.9/src/net/http/server.go:1697 +0xd0 panic(0x94f8a0, 0xc4202f3ec0) /usr/lib/go-1.9/src/runtime/panic.go:491 +0x283 github.com/dedis/protobuf.Encode.func1(0xc4205159f0, 0xc4205159d8) /home/conode/go/src/github.com/dedis/protobuf/encode.go:44 +0x144 panic(0x940a20, 0xc420447220) /usr/lib/go-1.9/src/runtime/panic.go:491 +0x283 github.com/dedis/protobuf.(encoder).message.func1(0xc420515958) /home/conode/go/src/github.com/dedis/protobuf/encode.go:67 +0x144 panic(0x940a20, 0xc420447220) /usr/lib/go-1.9/src/runtime/panic.go:491 +0x283 reflect.Value.Type(0x0, 0x0, 0x0, 0xcd4c80, 0xc420515968) /usr/lib/go-1.9/src/reflect/value.go:1694 +0x1a3 github.com/dedis/protobuf.(encoder).message(0xc420386000, 0x0, 0x0, 0x0) /home/conode/go/src/github.com/dedis/protobuf/encode.go:72 +0x7f github.com/dedis/protobuf.Encode(0x8fc8e0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /home/conode/go/src/github.com/dedis/protobuf/encode.go:56 +0x1b5 github.com/dedis/onet.(ServiceProcessor).ProcessClientRequest(0xc420278320, 0xc420468a00, 0xc4205215ed, 0x4, 0xc4201f7800, 0x68, 0x600, 0x0, 0x0, 0x0, ...) /home/conode/go/src/github.com/dedis/onet/processor.go:148 +0xf2 github.com/dedis/onet.wsHandler.ServeHTTP(0x9f3016, 0x7, 0xccd5c0, 0xc42010e800, 0xccdac0, 0xc4203ced20, 0xc420468a00) /home/conode/go/src/github.com/dedis/onet/websocket.go:179 +0x4ff github.com/dedis/onet.(*wsHandler).ServeHTTP(0xc4202980e0, 0xccdac0, 0xc4203ced20, 0xc420468a00)

:1 +0x75 net/http.(*ServeMux).ServeHTTP(0xc420162960, 0xccdac0, 0xc4203ced20, 0xc420468a00) /usr/lib/go-1.9/src/net/http/server.go:2254 +0x130 net/http.serverHandler.ServeHTTP(0xc42007b790, 0xccdac0, 0xc4203ced20, 0xc420468a00) /usr/lib/go-1.9/src/net/http/server.go:2619 +0xb4 net/http.(*conn).serve(0xc42017e3c0, 0xcce640, 0xc4203ff240) /usr/lib/go-1.9/src/net/http/server.go:1801 +0x71d created by net/http.(*Server).Serve /usr/lib/go-1.9/src/net/http/server.go:2720 +0x288
jeffallen commented 5 years ago

Cannot reproduce.