{"action":"created","issue":{"url":"https://api.github.com/repos/wch/webshot/issues/23","repository_url":"https://api.github.com/repos/wch/webshot","labels_url":"https://api.github.com/repos/wch/webshot/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/wch/webshot/issues/23/comments","events_url":"https://api.github.com/repos/wch/webshot/issues/23/events","html_url":"https://github.com/wch/webshot/issues/23","id":155933344,"number":23,"title":"webshot fails to take screenshots of local .html under Windows","user":{"login":"fdetsch","id":3940660,"avatar_url":"https://avatars.githubusercontent.com/u/3940660?v=3","gravatar_id":"","url":"https://api.github.com/users/fdetsch","html_url":"https://github.com/fdetsch","followers_url":"https://api.github.com/users/fdetsch/followers","following_url":"https://api.github.com/users/fdetsch/following{/other_user}","gists_url":"https://api.github.com/users/fdetsch/gists{/gist_id}","starred_url":"https://api.github.com/users/fdetsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdetsch/subscriptions","organizations_url":"https://api.github.com/users/fdetsch/orgs","repos_url":"https://api.github.com/users/fdetsch/repos","events_url":"https://api.github.com/users/fdetsch/events{/privacy}","received_events_url":"https://api.github.com/users/fdetsch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-20T10:28:46Z","updated_at":"2016-05-23T15:20:31Z","closed_at":null,"body":"I try to take screenshots of local .html files. The below code works fine on Ubuntu 16.04 64-bit, R version 3.0.0, but fails on the same machine using the same R version under Windows 10. \r\n\r\n```\r\n## sample widget\r\nlibrary(mapview)\r\nm <- mapview(breweries91)\r\n\r\n## save to html\r\nhtmlwidgets::saveWidget(widget = m@map, file = \"~/map.html\")\r\n\r\n## save html to png \r\nwebshot::webshot(url = \"C:/Users/fdetsch/Documents/map.html\", \r\n                 file = \"C:/Users/fdetsch/Documents/map.png\")\r\n```\r\n\r\nMore precisely, the created .html looks just fine when opened e.g. in Firefox and the code does not throw any errors, but the resulting image is just black. On Ubuntu, by contrast, the created .png file looks just as expected. Here is my session info.\r\n\r\n```\r\nR version 3.3.0 (2016-05-03)\r\nPlatform: x86_64-w64-mingw32/x64 (64-bit)\r\nRunning under: Windows >= 8 x64 (build 9200)\r\n\r\nlocale:\r\n[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252\r\n[4] LC_NUMERIC=C                    LC_TIME=German_Germany.1252    \r\n\r\nattached base packages:\r\n[1] stats     graphics  grDevices utils     datasets  methods   base     \r\n\r\nother attached packages:\r\n[1] mapview_1.0.29     leaflet_1.0.1.9003\r\n\r\nloaded via a namespace (and not attached):\r\n [1] Rcpp_0.12.5         raster_2.5-2        magrittr_1.5        gdalUtils_2.0.1.7   munsell_0.4.3      \r\n [6] colorspace_1.2-6    viridisLite_0.1.3   lattice_0.20-33     foreach_1.4.3       plyr_1.8.3         \r\n[11] tools_3.3.0         webshot_0.3         rgdal_1.1-10        grid_3.3.0          R.oo_1.20.0        \r\n[16] png_0.1-7           latticeExtra_0.6-28 htmltools_0.3.5     iterators_1.0.8     yaml_2.1.13        \r\n[21] digest_0.6.9        RColorBrewer_1.1-2  htmlwidgets_0.6     R.utils_2.3.0       codetools_0.2-14   \r\n[26] sp_1.2-3            scales_0.4.0        R.methodsS3_1.7.1   stats4_3.3.0        jsonlite_0.9.20    \r\n[31] satellite_0.2.0 \r\n```"},"comment":{"url":"https://api.github.com/repos/wch/webshot/issues/comments/221008735","html_url":"https://github.com/wch/webshot/issues/23#issuecomment-221008735","issue_url":"https://api.github.com/repos/wch/webshot/issues/23","id":221008735,"user":{"login":"wch","id":86978,"avatar_url":"https://avatars.githubusercontent.com/u/86978?v=3","gravatar_id":"","url":"https://api.github.com/users/wch","html_url":"https://github.com/wch","followers_url":"https://api.github.com/users/wch/followers","following_url":"https://api.github.com/users/wch/following{/other_user}","gists_url":"https://api.github.com/users/wch/gists{/gist_id}","starred_url":"https://api.github.com/users/wch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wch/subscriptions","organizations_url":"https://api.github.com/users/wch/orgs","repos_url":"https://api.github.com/users/wch/repos","events_url":"https://api.github.com/users/wch/events{/privacy}","received_events_url":"https://api.github.com/users/wch/received_events","type":"User","site_admin":false},"created_at":"2016-05-23T15:20:30Z","updated_at":"2016-05-23T15:20:30Z","body":"@fdetsch We would also have to have a good way of detecting whether the path is to a local file, or a remote one. I think searching for the regex `^\\w+?://` should work."}}
{"actor":{"display_login":"wch"}}