-
Notifications
You must be signed in to change notification settings - Fork 153
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
Plugin: fix Chrome path #451
Conversation
scripts/download_chrome.js
Outdated
const chromeBinDir = out.toString().trim() | ||
|
||
console.log(`Moving ${chromeBinDir} content into ${outputPath}/chrome`); | ||
childProcess.execFileSync('mv', [chromeBinDir, `${outputPath}/tmp`]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command fails when there's no ${outputPath}/tmp
directory.
'error': err.message, | ||
'trace': err.stack, | ||
} | ||
console.error(JSON.stringify(errorLog)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error was actually logged as a "debug" log in plugin mode so that's why it was usually not displayed. This is fixing that and it should help us getting more info from user issues.
@Clarity-89 I found another solution, this should be more portable and I find it much cleaner than the other one. Tested on Windows only, I'll do some tests on Linux. |
Tested on Mac and this works! 🎉 I wonder if this going to work in docker, since we're still using Chromium in our image. |
This won't impact the Docker image because it only impacts plugin mode. |
Ok, yeah the Docker image built locally works for me. I'm asking because according to this issue the renderer also fails in Docker on Linux. Is that a separate issue? |
Yes it's a bit different but also fixed in this PR. In this custom Docker image, the executable path is provided through the
We shouldn't compute the executable path anymore if it's provided. |
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on this! 🎉
…rafana-image-renderer into fix-plugin-chrome-path
The Puppeteer update (#433) contained an update to the
puppeteer.executablePath
function used in plugin mode to compute Chrome executable path.This PR updates the package scripts to ensure Chrome is always installed under
<pluginDir>/chrome
so we can use this path in plugin mode.Fixes #449