I'm running snapd in an x86_64 QEMU VM for spread testing, but I fail to install a snap from the edge channel:
# snap install --edge wifi-ap
if I start snapd in foreground I get this error:
2017/04/06 14:01:21.523100 api.go:891: Installing snap "wifi-ap" revision unset
2017/04/06 14:01:21.731705 state.go:63: PANIC internal error: could not marshal value for state entry "hook-context": json: unsupported type: map[interface {}]interface {}
2017/04/06 14:01:21 http: panic serving uid=0;@: internal error: could not marshal value for state entry "hook-context": json: unsupported type: map[interface {}]interface {}
goroutine 61 [running]:
net/http.(*conn).serve.func1(0xc820077880)
/usr/lib/go-1.6/src/net/http/server.go:1389 +0xc3
panic(0x56470528b320, 0xc820307b40)
/usr/lib/go-1.6/src/runtime/panic.go:443 +0x4ed
github.com/snapcore/snapd/logger.Panicf(0x5647055b22c0, 0x3e, 0xc820044ac0, 0x2, 0x2)
/build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/logger/logger.go:72 +0x15a
github.com/snapcore/snapd/overlord/state.customData.set(0xc820455a10, 0x5647054bd250, 0xc, 0x564705289c20, 0xc820455980)
/build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/overlord/state/state.go:63 +0x1e1
github.com/snapcore/snapd/overlord/state.(*Task).Set(0xc8201b3d40, 0x5647054bd250, 0xc, 0x564705289c20, 0xc820455980)
/build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/overlord/state/task.go:338 +0x60
github.com/snapcore/snapd/overlord/hookstate.HookTask(0xc82017d5e0, 0xc8204559e0, 0x24, 0xc82044b980, 0xc820455980, 0xc8204559e0)
/build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/overlord/hookstate/hookmgr.go:109 +0xee
github.com/snapcore/snapd/overlord/configstate.Configure(0xc82017d5e0, 0xc8203063d9, 0x7, 0xc820455920, 0x0, 0xc8201b3680)
/build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/overlord/configstate/tasksets.go:68 +0x388
github.com/snapcore/snapd/overlord/snapstate.doInstall(0xc82017d5e0, 0xc820301770, 0xc82044b3c0, 0x0, 0x0, 0x0, 0x0)
/build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/overlord/snapstate/snapstate.go:242 +0x2f90
github.com/snapcore/snapd/overlord/snapstate.Install(0xc82017d5e0, 0xc82020ca4f, 0x7, 0xc8201fce08, 0x4, 0x0, 0x0, 0x0, 0x27, 0x0, ...)
/build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/overlord/snapstate/snapstate.go:376 +0x593
github.com/snapcore/snapd/daemon.snapInstall.func1(0xc82017d5e0, 0x0, 0x0)
/build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/daemon/api.go:895 +0x13f
github.com/snapcore/snapd/daemon.withEnsureUbuntuCore(0xc82017d5e0, 0xc82020ca4f, 0x7, 0x0, 0xc820045650, 0x0, 0x0, 0x0, 0x0, 0x0)
/build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/daemon/api.go:797 +0xf9
github.com/snapcore/snapd/daemon.snapInstall(0xc8204dd500, 0xc82017d5e0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/daemon/api.go:897 +0x39f
github.com/snapcore/snapd/daemon.postSnap(0x5647058128e0, 0xc82030d880, 0x0, 0x0, 0x0)
/build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/daemon/api.go:1086 +0x63d
github.com/snapcore/snapd/daemon.(*Command).ServeHTTP(0x5647058128e0, 0x7f6bf24d02e8, 0xc82020caa0, 0xc82030d880)
/build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/daemon/daemon.go:144 +0x33c
github.com/snapcore/snapd/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc8202c8c30, 0x7f6bf24d02e8, 0xc82020caa0, 0xc82030d880)
/build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/vendor/github.com/gorilla/mux/mux.go:100 +0x2a0
github.com/snapcore/snapd/daemon.logit.func1(0x7f6bf24d02b0, 0xc8200e48f0, 0xc82030d880)
/build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/daemon/daemon.go:172 +0x10b
net/http.HandlerFunc.ServeHTTP(0xc8204424c0, 0x7f6bf24d02b0, 0xc8200e48f0, 0xc82030d880)
/usr/lib/go-1.6/src/net/http/server.go:1618 +0x3c
net/http.serverHandler.ServeHTTP(0xc8203a6c80, 0x7f6bf24d02b0, 0xc8200e48f0, 0xc82030d880)
/usr/lib/go-1.6/src/net/http/server.go:2081 +0x1a0
net/http.(*conn).serve(0xc820077880)
/usr/lib/go-1.6/src/net/http/server.go:1472 +0xf30
created by net/http.(*Server).Serve
/usr/lib/go-1.6/src/net/http/server.go:2137 +0x450
I've tried to reproduce it in various ways but haven't managed so far: I can install the wifi-ap snap from egde successfuly on my desktop, on a clean 16.04 VM and on clean ubuntu core image (in all cases running snapd 2.23.6).
Also I don't see anything suspicious in the state.json file you attached (but I guess that's expected, the failure you see indicates the state couldn't be updated with provided value, so we will not find it there)