-
-
Notifications
You must be signed in to change notification settings - Fork 334
Description
Hi all,
I'm trying to get mercure running on a Raspberry Pi. I've got my Symfony 4 installation with API Platform running.
Mercure version: latest (mercure_0.9.0_Linux_armv6)
Symfony version: 4.4.*
API Platform: ^1.2
When I start the hub everything seems fine:
pi@raspberrypi:/var/www $ ./mercure --jwt-key='!ChangeMe!' --addr=':3000' --debug --allow-anonymous --cors-allowed-origins='*' --publish-allowed-origins='http://localhost:3000' INFO[0000] Mercure started addr=":3000" protocol=http
Even subscribers can connect to the hub:
INFO[0002] New subscriber remote_addr="192.168.178.30:34226" subscriber_topics="[http://localhost/api/devices/1.jsonld]"
But when a entity changes (@ApiResource(mercure=true)) i got the following error:
HTTP/1.1 500 Internal Server Error returned for "http://192.168.178.55:3000/.well-known/mercure".
This is what the mercure hub returns:
INFO[0187] runtime error: invalid memory address or nil pointer dereference goroutine 21 [running]: runtime/debug.Stack(0x46b40c, 0x290dca8, 0x579700) /home/travis/.gimme/versions/go1.14.linux.amd64/src/runtime/debug/stack.go:24 +0x78 runtime/debug.PrintStack() /home/travis/.gimme/versions/go1.14.linux.amd64/src/runtime/debug/stack.go:16 +0x14 github.com/gorilla/handlers.recoveryHandler.log(0x657cc0, 0x2914a60, 0x657270, 0x290dc80, 0x1, 0x2897368, 0x1, 0x1) /home/travis/gopath/pkg/mod/github.com/gorilla/handlers@v1.4.2/recovery.go:89 +0x58 github.com/gorilla/handlers.recoveryHandler.ServeHTTP.func1(0x65b938, 0x29226c0, 0x657cc0, 0x2914a60, 0x657270, 0x290dc80, 0x1) /home/travis/gopath/pkg/mod/github.com/gorilla/handlers@v1.4.2/recovery.go:74 +0xac panic(0x51e7e8, 0x9df9d0) /home/travis/.gimme/versions/go1.14.linux.amd64/src/runtime/panic.go:967 +0x118 runtime/internal/atomic.goStore64(0x28bec1c, 0x1, 0x0) /home/travis/.gimme/versions/go1.14.linux.amd64/src/runtime/internal/atomic/atomic_arm.go:144 +0x1c go.uber.org/atomic.(*Uint64).Store(...) /home/travis/gopath/pkg/mod/go.uber.org/atomic@v1.6.0/atomic.go:215 github.com/dunglas/mercure/hub.(*BoltTransport).persist.func1(0x28d2880, 0x1, 0x28d2880) /home/travis/gopath/src/github.com/dunglas/mercure/hub/bolt_transport.go:124 +0x118 go.etcd.io/bbolt.(*DB).Update(0x28e4140, 0x2893734, 0x0, 0x0) /home/travis/gopath/pkg/mod/go.etcd.io/bbolt@v1.3.4/db.go:694 +0x8c github.com/dunglas/mercure/hub.(*BoltTransport).persist(0x28bebe0, 0x28bcba0, 0x5f400, 0x2912f00) /home/travis/gopath/src/github.com/dunglas/mercure/hub/bolt_transport.go:109 +0x54 github.com/dunglas/mercure/hub.(*BoltTransport).Write(0x28bebe0, 0x28bcba0, 0x7154bb8a, 0x4e378c20) /home/travis/gopath/src/github.com/dunglas/mercure/hub/bolt_transport.go:84 +0x54 github.com/dunglas/mercure/hub.(*Hub).dispatch(0x28bc720, 0x28bcba0, 0x5808dc, 0x4) /home/travis/gopath/src/github.com/dunglas/mercure/hub/publish.go:17 +0x3c github.com/dunglas/mercure/hub.(*Hub).PublishHandler(0x28bc720, 0x66c38050, 0x2915000, 0x28d2780) /home/travis/gopath/src/github.com/dunglas/mercure/hub/publish.go:76 +0x628 net/http.HandlerFunc.ServeHTTP(0x2896ea8, 0x66c38050, 0x2915000, 0x28d2780) /home/travis/.gimme/versions/go1.14.linux.amd64/src/net/http/server.go:2012 +0x34 github.com/gorilla/mux.(*Router).ServeHTTP(0x28cade0, 0x66c38050, 0x2915000, 0x28d2680) /home/travis/gopath/pkg/mod/github.com/gorilla/mux@v1.7.4/mux.go:210 +0xac github.com/gorilla/handlers.(*cors).ServeHTTP(0x28bed70, 0x66c38050, 0x2915000, 0x28d2680) /home/travis/gopath/pkg/mod/github.com/gorilla/handlers@v1.4.2/cors.go:54 +0xccc github.com/unrolled/secure.(*Secure).Handler.func1(0x66c38050, 0x2915000, 0x28d2680) /home/travis/gopath/pkg/mod/github.com/unrolled/secure@v1.0.7/secure.go:177 +0xac net/http.HandlerFunc.ServeHTTP(0x28a2620, 0x66c38050, 0x2915000, 0x28d2680) /home/travis/.gimme/versions/go1.14.linux.amd64/src/net/http/server.go:2012 +0x34 github.com/gorilla/handlers.loggingHandler.ServeHTTP(0x657870, 0x28960e0, 0x657f48, 0x28a2620, 0x5aaf54, 0x65b938, 0x29226c0, 0x28d2680) /home/travis/gopath/pkg/mod/github.com/gorilla/handlers@v1.4.2/logging.go:45 +0x184 github.com/gorilla/handlers.recoveryHandler.ServeHTTP(0x657cc0, 0x2914a60, 0x657270, 0x290dc80, 0x1, 0x65b938, 0x29226c0, 0x28d2680) /home/travis/gopath/pkg/mod/github.com/gorilla/handlers@v1.4.2/recovery.go:78 +0x74 github.com/gorilla/mux.(*Router).ServeHTTP(0x28cb140, 0x65b938, 0x29226c0, 0x28d2580) /home/travis/gopath/pkg/mod/github.com/gorilla/mux@v1.7.4/mux.go:210 +0xac net/http.serverHandler.ServeHTTP(0x29225a0, 0x65b938, 0x29226c0, 0x28d2580) /home/travis/.gimme/versions/go1.14.linux.amd64/src/net/http/server.go:2807 +0x88 net/http.(*conn).serve(0x28cb380, 0x65c398, 0x2914e40) /home/travis/.gimme/versions/go1.14.linux.amd64/src/net/http/server.go:1895 +0x7d4 created by net/http.(*Server).Serve /home/travis/.gimme/versions/go1.14.linux.amd64/src/net/http/server.go:2933 +0x2d0