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

Allow custom TMP_PROFILE_DIR #2291

Closed
sundeepnarang opened this issue May 17, 2017 · 3 comments
Closed

Allow custom TMP_PROFILE_DIR #2291

sundeepnarang opened this issue May 17, 2017 · 3 comments
Assignees

Comments

@sundeepnarang
Copy link

sundeepnarang commented May 17, 2017

Launcher kept failing when started with default user data dir on macOS Sierra. Now this probably is an issue with chrome or directory permissions on my system.

However, I was easily able to fix this by passing a custom --user-data-dir in additionalFlags
This does double the --user-data-dir argument, and maybe we could allow for it to customizing TMP_PROFILE_DIR in configuration.

@paulirish
Copy link
Member

@sundeepnarang sounds like you're using LH as a module rather than on the CLI?

also.. are you using Lighthouse from master/canary?

if so, would you be willing to look at why https://github.com/GoogleChrome/lighthouse/blob/master/chrome-launcher/utils.ts#L32-L45 is failing?

An alternative solution here is to use some tmpdir node module that solves this issue already, rather than our custom version. And that way you wouldn't need to provide this argument.
how does that sound?

@sundeepnarang
Copy link
Author

sundeepnarang commented May 17, 2017

@paulirish Yeah you are correct I am using it as a module, just for the purpose of launching chrome using chrome launcher module.

Also, am using master.

https://github.com/GoogleChrome/lighthouse/blob/master/chrome-launcher/utils.ts#L32-L45 is not failing for me, The directory is indeed created. Chrome just crashes when started with the the temp dir created here, as the user data dir. If I pass a different user data dir it works, with logging and other things still taking place in the temp dir created here.

This makes me believe that the issue is just with user data dir with chrome on mac and not something to do with LH.

However it is easily mitigated by passing a custom user data dir, so I wanted to suggest that if we could allow user data dir flag to be passed as config option for chrome launcher.

Something like this, but its still missing rimraf for this new user data dir and maybe other things.
https://github.com/sundeepnarang/lighthouse/blob/master/chrome-launcher/chrome-launcher.ts#L86-L100

@paulirish
Copy link
Member

I see i see.

okay that's convincing. :)

@wardpeet wardpeet added the cli label May 23, 2017
samccone added a commit that referenced this issue May 25, 2017
* rename TMP_DIR to a more accurate name. Since this is a private
internal value, this is non-breaking.

Fixes #2291
samccone added a commit that referenced this issue May 25, 2017
* rename TMP_DIR to a more accurate name. Since this is a private
internal value, this is non-breaking.

Fixes #2291
samccone added a commit that referenced this issue May 31, 2017
* rename TMP_DIR to a more accurate name. Since this is a private
internal value, this is non-breaking.

Fixes #2291
samccone added a commit that referenced this issue Jun 2, 2017
* rename TMP_DIR to a more accurate name. Since this is a private
internal value, this is non-breaking.

Fixes #2291
samccone added a commit that referenced this issue Jun 5, 2017
* rename TMP_DIR to a more accurate name. Since this is a private
internal value, this is non-breaking.

Fixes #2291
paulirish pushed a commit to GoogleChrome/chrome-launcher that referenced this issue Aug 29, 2017
* rename TMP_DIR to a more accurate name. Since this is a private
internal value, this is non-breaking.

Fixes GoogleChrome/lighthouse#2291
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

4 participants