-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsupported report format. Expected JSON. #1204
Comments
OK, it's not because Chrome isn't being killed. I used #1206 which kills Chrome at the end, yet my report still shows as invalid. https://dl.dropboxusercontent.com/u/3607425/results-1206.zip Also, the output is valid JSON, so, I'm not sure why the viewer is complaining :/ |
I was able to drop your json file onto the app without any issues. Is it possible you have an extension that's interfering? |
Nope, I don't have any extensions in Chrome or Firefox. Even Microsoft Edge has the same issue. Can this be due to the OS that is Windows? |
Yea it could be. I don't have a windows machine handy to test atm. Windows might have different idiosyncrasies with drag and drop from outside the browser. If you click on the center logo, it should open a hidden file input. Does that work for you? |
Nope, both fail. |
Shucks. If you have the source checked out, it would be very helpful if you could log what
|
I might try to debug it tomorrow but from what I see there's only one relevant line in https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-viewer/app/src/fileuploader.js#L45 |
OK I managed to debug this.
So |
Just to be clear, when you say "Nope, both fail.", the case for clicking the file input still allows you to select a .json file. Right? Meaning https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-viewer/app/src/fileuploader.js#L45 works, but it fails at https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-viewer/app/src/lighthouse-report-viewer.js#L193. We could work around this by checking the file extension if the type is empty. |
Yeah, I can upload the report just fine; it just throws the error since I'm not sure just looking at the file extension is safe though. That is something you guys should check. |
We'll put some time into figuring out what's going on on windows. Thanks for you help! |
fixed in #1234 |
So, I'm getting
Unsupported report format. Expected JSON.
when trying to upload my json report to http://googlechrome.github.io/lighthouse/viewer/I tried with Firefox 51.0b9 64-bit and Chrome 55.0.2883.87 m (64-bit). Here is the zipped json report file.
Note that Chrome isn't being killed at the end so I have to close it manually. Not sure if this is related, i.e. lighthouse writes more stuff after that step. If it does, then it would explain the error.
The text was updated successfully, but these errors were encountered: