This commit is contained in:
2020-09-24 22:04:30 +00:00
parent 3ea44f93e8
commit 1c517e76ce

View File

@@ -390,10 +390,14 @@ namespace AyaNova.Biz
bool isWindows = System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows);
if (!isWindows)
{
//LINUX / MAC / NOT WINDOWS
log.LogDebug($"Not Windows: setting executable path for chrome to expected '/usr/bin/chromium-browser'");
lo.ExecutablePath = "/usr/bin/chromium-browser";//this is the default path for docker based alpine dist, but maybe not others, need to make a config setting likely
// lo.Args = new string[] { "--no-sandbox" };
/*
troubleshooting links:
https://developers.google.com/web/tools/puppeteer/troubleshooting
Note: plenty of zombie process issues in regular puppeteer as well
These links might be worth looking at in future if diagnosing other issues:
https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#running-on-alpine
@@ -409,10 +413,12 @@ namespace AyaNova.Biz
"--no-zygote"
]
*/
lo.Args = new string[] { "--headless --no-sandbox --disable-gpu --single-process --no-zygote" };
lo.Args = new string[] { "--disable-dev-shm-usage --no-sandbox --disable-gpu --single-process --no-zygote " };
}
else
{
//WINDOWS ONLY
log.LogDebug($"Windows: Calling browserFetcher download async now:");
await new BrowserFetcher().DownloadAsync(BrowserFetcher.DefaultRevision);
}