criticalstack/quake-kube

content-server error invalid character

Closed this issue · 3 comments

Hi,

any idea where this error is coming from when the content-server starts ?

Error: invalid character '<' looking for beginning of value
2020/08/05 10:27:44 invalid character '<' looking for beginning of value

I suspect it is coming from here:

func getManifest(url string) ([]*File, error) {
data, err := httputil.GetBody(url + "/assets/manifest.json")
if err != nil {
return nil, err
}
files := make([]*File, 0)
if err := json.Unmarshal(data, &files); err != nil {
return nil, err
}
return files, nil
}

Where the data being returned from the content-server seed-content-url that was specified is returning something that includes a < as the first character, where it is trying to parse json. I've started cleaning this part up so that it will at least give a better error when this happens, but I think it is the content-server seed-content-url that it is getting not being available or having an invalid ${seed-content-url}/assets/manifest.json.

Thanks, with the error message i could see that a content filter was blocking the request :)

That's great! I'll close this one, but if it didn't fully address the issue, feel free to reopen the issue. Thanks again for reporting this!