Description
Description
I have deployed a webapp to azure using plotly.net but it throws several errors of missing shared libraries.
The webapp works perfectly on the development environment (windows 10).
Repro steps
Perhaps I am doing something wrong it is the first time I am using this library, this is the code I am using:
`*
Layout newChartLayout = Layout.init(
Title: Title.init(Text: "Visitas (cantidad de visitas)"),
BarMode: BarMode.Stack,
UniformText: UniformText.init(Mode: UniformTextMode.Show, MinSize: 6),
PaperBGColor: Color.fromARGB(0, 0, 0, 0),
PlotBGColor: Color.fromARGB(0, 0, 0, 0),
Font: Font.init(Family:FontFamily.Consolas, Color:Color.fromRGB(255,0,0))
//Font: Font.init(Family:FontFamily.NewCustom("Nunito"))
);
LinearAxis newXAxis = LinearAxis.init<IConvertible, IConvertible, IConvertible, IConvertible, IConvertible, IConvertible>(
Title: Title.init(Text: "Fecha (Mes Dia - Hora)"),
ShowGrid: true,
TickFont: Font.init(Family:FontFamily.Consolas, Color:Color.fromRGB(255,0,0))
);
LinearAxis newYAxis = LinearAxis.init<IConvertible, IConvertible, IConvertible, IConvertible, IConvertible, IConvertible>(
Title: Title.init(Text: "Cantidad"),
ShowGrid: true,
AutoMargin: true,
DTick: 1,
TickFont: Font.init(Family:FontFamily.Consolas, Color:Color.fromRGB(255,0,0))
);
int[] xData = new int[] { 320, 170, 17, 9, 6, 1 };
string[] yLabels = new string[] { "GIMNASIO", "PISCINA", "BBQ TERRAZA", "BUSINESS CENTER", "SALA DE JUEGOS", "EDIFICIO CARAVAGGIO" };
var newChart = Chart2D.Chart.Bar<int, string, int, int, int>(
values: xData,
Keys: yLabels,
Name: "Area")
.WithLayout(newChartLayout)
.WithXAxis(newXAxis)
.WithYAxis(newYAxis);
svgChart = newChart.ToSVGString(Plotly.NET.ImageExport.ExportEngine.PuppeteerSharp, 600, 300);
*`
Expected behavior
Get SVG string to embed into a pdf report
Actual behavior
It crashes, so far I have installed these libraries in the production enviroment:
libnss3
libatk1.0-0
libatk-bridge2.0-0
cups
Error messages like these are thown
`*
PuppeteerSharp.ProcessException: Failed to launch browser! /home/site/wwwroot/.local-chromium/Linux-884014/chrome-linux/chrome: error while loading shared libraries: libxkbcommon.so.0: cannot open shared object file: No such file or directory
at PuppeteerSharp.States.ChromiumStartingState.StartCoreAsync(LauncherBase p) in C:\projects\puppeteer-sharp\lib\PuppeteerSharp\States\ChromiumStartingState.cs:line 83
at PuppeteerSharp.States.ChromiumStartingState.StartCoreAsync(LauncherBase p) in C:\projects\puppeteer-sharp\lib\PuppeteerSharp\States\ChromiumStartingState.cs:line 89
at PuppeteerSharp.Launcher.LaunchAsync(LaunchOptions options) in C:\projects\puppeteer-sharp\lib\PuppeteerSharp\Launcher.cs:line 68
at PuppeteerSharp.Launcher.LaunchAsync(LaunchOptions options) in C:\projects\puppeteer-sharp\lib\PuppeteerSharp\Launcher.cs:line 91 | Stack: .lambda_method530 => ReportController.ballotResult => ReportService.getBallotResult
*`
Related information
- Operating system: Linux 5a5597962fdd 4.15.0-169-generic x86_64
- Branch:
"Plotly.NET" Version="3.0.0"
"Plotly.NET.ImageExport" Version="3.0.0" - .NET Runtime: ASP .NETCore Version: 6.0.3