case 4690 - report browser downloads under the data path, not beside the app; manual updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-22 20:25:00 -07:00
parent e8e7a2ec40
commit a34e012eee
7 changed files with 32 additions and 34 deletions

View File

@@ -795,8 +795,14 @@ What could be the issue here?
//case 4586
//puppeteer has gone chrome dev by default and so does puppeteersharp which tests ok so I'm going to allow the default
//this means the files go into binary folder under Chrome and ChromeHeadlessShell
await new BrowserFetcher().DownloadAsync();
//this means the files go into Chrome and ChromeHeadlessShell folders, under the data path (not beside the app, see ServerBootConfig)
var FetcherOptions = new BrowserFetcherOptions();
if (!string.IsNullOrWhiteSpace(ServerBootConfig.REPORT_RENDER_BROWSER_DOWNLOAD_PATH))
FetcherOptions.Path = ServerBootConfig.REPORT_RENDER_BROWSER_DOWNLOAD_PATH;
var InstalledBrowser = await new BrowserFetcher(FetcherOptions).DownloadAsync();
//launch exactly what was downloaded, otherwise Puppeteer looks in its default folder beside the app
lo.ExecutablePath = InstalledBrowser.GetExecutablePath();
log.LogDebug($"Report browser: {lo.ExecutablePath}");
}
//Set Chromium args

View File

@@ -87,6 +87,11 @@ namespace AyaNova.Util
//REPORT RENDERING BROWSER PARAMS
internal static string AYANOVA_REPORT_RENDER_BROWSER_PARAMS { get; set; }
//REPORT RENDERING BROWSER DOWNLOAD FOLDER (not a setting, derived from AYANOVA_DATA_PATH)
//the auto-downloaded browser goes here instead of beside the app: the app folder can be read-only (hardened systemd unit)
//and is replaced on redeploy, which would delete the download. Empty when there is no data path: download beside the app as before
internal static string REPORT_RENDER_BROWSER_DOWNLOAD_PATH { get; set; }
//REPORT RENDERING API URL OVERRIDE
internal static string AYANOVA_REPORT_RENDER_API_URL_OVERRIDE { get; set; }
@@ -261,6 +266,10 @@ namespace AyaNova.Util
(string.IsNullOrWhiteSpace(TempFilesPath))
? Path.Combine(DataFolderPath, "temp")
: TempFilesPath;
REPORT_RENDER_BROWSER_DOWNLOAD_PATH =
(string.IsNullOrWhiteSpace(DataFolderPath))
? string.Empty
: Path.Combine(DataFolderPath, "report-browser");
#endregion server BASICS
}