ropensci / drake

An R-focused pipeline toolkit for reproducibility and high-performance computing
https://docs.ropensci.org/drake
GNU General Public License v3.0
1.34k stars 128 forks source link

r_vis_drake_graph() not displaying in chromium #1345

Closed DRJP closed 3 years ago

DRJP commented 3 years ago

Hi

First off, many thanks for the drake package - it's really impressive and useful!!

Recently, following a system (Ubuntu) upgrade, the graph generated by r_vis_drake_graph() is no longer displaying in my default browser (Chromium). Chromium tries to open the graph, but displays "Your file couldn’t be accessed. It may have been moved, edited or deleted. ERR_FILE_NOT_FOUND"

If I copy the file name from Chromium and paste it into Firefox the graph displays fine. Also, the graph displays fine within chromium on a different computer.

It seems that this issue is most likely related to some chromium setting on my laptop (or perhaps some lost dependency?) that must have been reset during the system upgrade - but I've no idea what sort of setting that might be or where I should focus my attention.

Is this a known issue? And, do you have any ideas about how I might fix it?

Sincerely David

wlandau commented 3 years ago

drake uses visNetwork to render the graphs, and browser issues are unfortunately outside drake's control. I recommend reproducing the issue with visNetwork directly and then posting to the visNetwork issue tracker, Stack Overflow, or the RStudio Community forum.

DRJP commented 3 years ago

Many thanks for your reply.

It turns that a new "security feature" of the chromium browser is that it can no longer access files in /tmp. https://askubuntu.com/questions/1184357/why-cant-chromium-suddenly-access-any-partition-except-for-home

This effectively renders drake's r_vis_drake_graph() function incompatible with the new version of chromium.

Since many linux users are using Chromium, is there a possibility that r_vis_drake_graph() could be given a "path" argument so that users are not bound to it's current /tmp default ?

wlandau commented 3 years ago

This is unfortunate, but I think it is an edge case and the responsibility of other tools to address. A workaround is to save the HTML widget with the file argument of vis_drake_graph() or to use other graphing functions such as sankey_drake_graph() or drake_ggraph(). I highly recommend submitting issues to the GitHub repos for the visNetwork R package and visNetwork JavaScript library.