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

TypeError: Cannot read property 'content' of undefined - chrome-har #2645

Closed
abdoIO opened this issue Sep 18, 2019 · 4 comments
Closed

TypeError: Cannot read property 'content' of undefined - chrome-har #2645

abdoIO opened this issue Sep 18, 2019 · 4 comments

Comments

@abdoIO
Copy link

abdoIO commented Sep 18, 2019

Greetings,

I'm getting the following error when running sitespeed

[2019-09-18 12:03:41] ERROR: [browsertime] TypeError: Cannot read property 'content' of undefined at Object.harFromMessages (/usr/src/app/node_modules/chrome-har/index.js:345:28) at ChromeDelegate.onCollect (/usr/src/app/node_modules/browsertime/lib/chrome/webdriver/chromeDelegate.js:380:31) at process._tickCallback (internal/process/next_tick.js:68:7) [2019-09-18 12:03:41] DEBUG: [browsertime] Kill all processes ffmpeg [2019-09-18 12:03:41] DEBUG: [browsertime] Closed the browser.

Docker run

docker run $DOCKER_SETUP $DOCKER_CONTAINER $NAMESPACE $INTERACTIVE $CONFIG/desktop.json $PRESCRIPT -b $browser $url

My configuration is as the following:

Sitespeed Version: sitespeed.io:10.0.1-plus1
Base OS: Linux
Config File:
{ "browsertime": { "browser": "chrome", "chrome": { "collectConsoleLog": true, "enableTraceScreenshots": true }, "connectivity": { "engine": "throttle", "profile": "cable" }, "iterations": 3, "speedIndex": true, "video": true, "visualElements": true, "visualMetrics": true }, "cpu": true, "extends": "secrets.json", "gzipHAR": true, "html": { "fetchHARFiles": true, "showScript": true }, "screenshot": { "type": "jpg" }, "summary-detail": "true", "thirdParty": { "cpu": true }, "verbose": true }

@soulgalore
Copy link
Member

Hi @AbdoHafez,
it looks like there are some content that we don't handle or rather Chrome-har handles correctly. Any chance you can share the URL? Or even better if you can do a run and add --browsertime.chrome.collectPerfLog - that will produce the Chrome log we use to create the HAR. If you can share that file with me, I can reproduce the issue and fix the problem.

Best
Peter

soulgalore added a commit to sitespeedio/chrome-har that referenced this issue Sep 21, 2019
I think something has changed in the Chrome trace log but hard to
guess what.

sitespeedio/sitespeed.io#2645
soulgalore added a commit to sitespeedio/chrome-har that referenced this issue Sep 21, 2019
I think something has changed in the Chrome trace log but hard to
guess what.

sitespeedio/sitespeed.io#2645
@abdoIO
Copy link
Author

abdoIO commented Sep 23, 2019

Thank you for your prompt response.

Here is a link to the chromePerflog files https://drive.google.com/file/d/1-mindN5mLAfu178jpchrT5HvDGeVKeRW/view?usp=sharing

I'm also getting the following error also from chrome-har

ERROR: [browsertime] TypeError: Cannot set property 'receive' of undefined at Object.harFromMessages (/usr/src/app/node_modules/chrome-har/index.js:373:29) at ChromeDelegate.onCollect (/usr/src/app/node_modules/browsertime/lib/chrome/webdriver/chromeDelegate.js:380:31) at process._tickCallback (internal/process/next_tick.js:68:7)

[plugin.browsertime] Could not find the right index 2 for har for url ERROR: [sitespeedio.queuehandler] Error: PageIndex out of range at module.exports.pickAPage (/usr/src/app/node_modules/webcoach/lib/har/harCutter.js:18:11) at Object.pickAPage (/usr/src/app/node_modules/webcoach/lib/index.js:130:12) at Object.processMessage (/usr/src/app/lib/plugins/browsertime/index.js:200:29)

Thank you again.

@soulgalore
Copy link
Member

Thank you @AbdoHafez I've did a fix this weekend, tested earlier today and it works with your traces, gonna do a release hopefully tomorrow.

For the other error I need the user journey so I can reproduce.

Best
Peter

@abdoIO
Copy link
Author

abdoIO commented Sep 25, 2019

Hello @soulgalore,

I no longer see the errors after the release. I guess they were related.

Thank you very much for your help.

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

No branches or pull requests

2 participants