XPlot.plotly and Xplot.GoogleCharts not rendering in Firefox or VSCode in Ubuntu 22.04

Hello

I am just learning F# and decided to try out some sample charting examples.

#r "nuget: XPlot.Plotly"
#r "nuget:xplot.plotly.interactive"

open XPlot.Plotly
[ 1 .. 10 ] |> Chart.Line |> Chart.Show

This does not render at all in a VSCode interactive notebook.

On saving it to a .fsx file and running it, Firefox opens but displays a ‘File Not Found’ message. On the console, the following error messages are shown:

/snap/core20/current/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29’ not found (required by /lib/x86_64-linux-gnu/libproxy.so.1)
Failed to load module: /home/grishkin/snap/code/common/.cache/gio-modules/libgiolibproxy.so
(gio open:40816): GLib-GIO-DEBUG: 10:26:14.613: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
Gtk-Message: 10:26:15.054: Not loading module “atk-bridge”: The functionality is provided by GTK natively. Please try to not load it.
(firefox:40821): GLib-DEBUG: 10:26:15.059: posix_spawn avoided (fd close requested)
(firefox:40821): GLib-DEBUG: 10:26:15.067: posix_spawn avoided (fd close requested)
(firefox:40821): GLib-GIO-DEBUG: 10:26:15.080: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
Gtk-Message: 10:26:15.120: Failed to load module “canberra-gtk-module”
Gtk-Message: 10:26:15.124: Failed to load module “canberra-gtk-module”

I have installed canberra and I am certain libstdc++ is installed.

I would appreciate help in fixing this. Thanks.

I’m using Windows, so I can only partially help.

I’ve gotten it to work in VS Code with a jupyter/polyglot notebook, but it needed a slight modification. When I pasted your code in exactly, it didn’t show anything in the notebook, but instead opened the plot in a new browser window when I ran it. If I just deleted the |> Chart.Show part, then it rendered in the notebook.


I’m wondering if it would work in your notebook if you did the same, and the browser issues you’re having were actually contributing to the problem, since it was trying to open the plot in a browser window.

Thanks.
Commenting out |> Chart.show in the notebook still displays nothing. It just gives syntax errors for some reason.

For the fsx file, I got that to work by using a browser (epiphany) that is not installed using Snap. So, the probkem seems to be with the snap installation of firefox and Chromium.