dennwc/dom

panic when following the instructions in the README

Closed this issue · 1 comments

Following the instructions as is, here is the error I'm getting in Chrome 71.0.3578.98 (Official Build) (64-bit) with Go version 1.11.4 darwin/amd64

running
wasm_exec.js:45 panic: invalid character 'd' after top-level value
wasm_exec.js:45 
wasm_exec.js:45 goroutine 1 [running]:
wasm_exec.js:45 main.main()
wasm_exec.js:45 	/Users/mattetti/Code/golang/src/github.com/dennwc/dom/cmd/app/main.go:97 +0x4b
wasm_exec.js:67 exit code: 2

It looks like maybe the data in the storage is bad, but I can't easily debug it, nor do I seem to get a lot of clues from the code:

if err := storage.GetItemJSON(stor, key, &s); err != nil {
				panic(err)
			}

Based on the error, it looks like bad JSON but I have no clue how to properly debug :(

Can't reproduce it on the latest version. Make sure that the key you are trying to get does not contain any old data that might be in plain text instead of JSON.