GoogleChrome / GoogleChrome/lighthouse
Temp files not cleaned up in WSL
- Dominant language
- JavaScript
- Stars
- 30.8k
- Forks
- 9.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 20
Description
### FAQ
- [X] Yes, my issue is not about [variability](https://github.com/GoogleChrome/lighthouse/blob/main/docs/variability.md) or [throttling](https://github.com/GoogleChrome/lighthouse/blob/main/docs/throttling.md).
- [X] Yes, my issue is not about a specific accessibility audit (file with [axe-core](https://github.com/dequelabs/axe-core) instead).
### URL
https://www.google.com
### What happened?
In WSL I am running this code like
> node LighthouseScanner.mjs https://www.google.com
After it completes there is a temp folder left behind that looks like a full windows path.
> lighthouse ls -l
total 20
drwx------ 3 rowc rowc 4096 Nov 14 15:36 'C:\Users\chris\AppData\Local\lighthouse.42200815'
I don't see anything indicating an error.
```
import lighthouse from 'lighthouse';
import * as chromeLauncher from 'chrome-launcher';
(async () => {
const chrome = await chromeLauncher.launch({
chromeFlags: ['--headless', '--quiet'],
chromePath: '/usr/bin/google-chrome-stable',
});
if (process.argv.length < 3) {
console.error('Please provide a URL as a command line argument.');
process.exit(1);
}
const url = process.argv[2];
const options = {
logLevel: 'info',
output: ['html', 'json'],
port: chrome.port,
tmpdir: '/tmp/',
};
const runnerResult = await lighthouse(url, options);
const combinedResult = {
json: runnerResult.lhr,
html: runnerResult.report,
};
// Output the combined result as a JSON object to stdout
console.log(JSON.stringify(combinedResult, null, 2));
await chrome.kill();
})();
```
### What did you expect?
No temp files left behind.
### What have you tried?
I have run it in directories not named lighthouse and the file name is still the same.
### How were you running Lighthouse?
node
### Lighthouse Version
11.2.0
### Chrome Version
Google Chrome 118.0.5993.117
### Node Version
v20.9.0
### OS
WSL
### Relevant log output
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.