Skip to content
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

JSON data that breaks PerfCascade #238

Closed
Nooshu opened this issue Oct 19, 2018 · 4 comments · Fixed by #239
Closed

JSON data that breaks PerfCascade #238

Nooshu opened this issue Oct 19, 2018 · 4 comments · Fixed by #239

Comments

@Nooshu
Copy link

Nooshu commented Oct 19, 2018

Hello,
I've been using https://compare.sitespeed.io/ for some performance testing and I've run into a set of data that causes an issue in compare. The data can be seen in this gist. I've run it through a JSON validator and it passes fine.

A direct link to the error can be found here.

The error that comes back is:

combined-97f030e963.js:566 TypeError: Cannot read property 'toString' of undefined
    at combined-97f030e963.js:25
    at Object.n.getKeys (combined-97f030e963.js:25)
    at Object.n.makeTabs (combined-97f030e963.js:25)
    at combined-97f030e963.js:25
    at combined-97f030e963.js:25
    at Array.map (<anonymous>)
    at u (combined-97f030e963.js:25)
    at combined-97f030e963.js:25
    at Array.map (<anonymous>)
    at Object.n.transformDoc (combined-97f030e963.js:25)
fetchHar.then.catch.e @ combined-97f030e963.js:566
Promise.catch (async)
loadFilesFromURL @ combined-97f030e963.js:564
onclick @ (index):413

Delving into the issue a little further it looks to be a problem in the PerfCascade lib. Compare uses v2.5.2, but I've also tested with v2.5.4 and it has the same issue. The line it is failing at is this one:

if (content.size !== -1 && contentLength !== content.size.toString()) {
    contentSize = content.size;
}

Thanks!

@soulgalore
Copy link
Collaborator

Hi @Nooshu thanks for creating the issue and showing the exact problem. I did a quick fix for now and I'll update compare when we got a new release.

I looked at the HAR and ther HAR file is actually not following the HAR spec and I see it's from Firefox so we should create an upstream issue.

screenshot 2018-10-21 at 22 48 07

We use https://github.com/devtools-html/har-export-trigger to get the HAR from Firefox, but I guess then the real upstream issue is in Firefox. If you can export the HAR directly from FF and either create an upstream issue in https://bugzilla.mozilla.org/ or ping me and I can do it.

Best
Peter

@Nooshu
Copy link
Author

Nooshu commented Oct 21, 2018

Hi @soulgalore,

Okay that is interesting. I've just tried exporting a HAR file from FF from the page using the latest version of FF I have (62.0.3) and the resulting file works in compare and HAR Viewer validates correctly. I throttled the connection to 3G Slow while running SiteSpeed in a docker container. Other than that all other settings were standard (and all other HAR's using the same setup exported fine).

I'm wondering if something went wrong in the export for that particular run of tests? As at the moment I'm unable to recreate the issue.

I'd say that unless it is possible to reproduce this it may actually be a non-issue.

micmro added a commit that referenced this issue Oct 21, 2018
Be extra careful when checking the size #238
@micmro
Copy link
Owner

micmro commented Oct 21, 2018

Released with v2.5.5

@soulgalore
Copy link
Collaborator

Thank you @micmro :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants