ggplotly causing knitted html doc to fail

I noticed that my knitted html dashboards appeared to be corrupted in Chrome, I get this error message when I try to open the html file:

The html doc opens in Internet Explorer sans the interactivity. The problem appears to be ggplotly(shocker), but I am not sure how else to troubleshoot. In my reproducible example, the Rmd script with the ggplotly function commented out renders normally, but when I uncomment it, I get the RESULT_CODE_KILLED_BAD_MESSAGE error.

I have already tried knitting from different folders, uninstalling and reinstalling the latest Windows versions of both R and R Studio, clearing my cache. Any ideas as to what is going on here?

---
title: "ggplotly MAD"
author: "Dan"
---
```{r}
library(plotly)

mt_graph <- mtcars %>%
  ggplot(aes(x = mpg,
             y = cyl))+
  geom_point()

mt_graph

#ggplotly(mt_graph)
```

Not a problem in Firefox knitting

---
title: "Untitled"
author: "Richard Careaga"
date: "12/17/2021"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(plotly)

mt_graph <- mtcars %>%
  ggplot(aes(x = mpg,
             y = cyl))+
  geom_point()

this should be entered as a chunk

mt_graph

Your example above works for me in Google Chrome.

I am having the same issue. The html doc opens in Internet Explorer but none of the tooltips show (they used to show a month or two back). I get the same RESULT_CODE_KILLED_BAD_MESSAGE error if I try to open in Chrome. (I'm also using plotly.)

I have the same issue. the same local .html file, Chrome and Edge won't work but IE works. I tend to believe some safety setting changed for latest chrome version latest chrome 97.0.4692.71(64) or Edge 96.0.1054.62(64) and causing the incompatile of plot.ly(all pages without plot.ly works). Friend with 96.0.4664.45(64) works.

I have the same issue, but only if file is on network drive. Moreover if network drive is mapped as drive it works (if you reference it by drive name X:...\raport.html, not true path \server....\raport.html) .

I have also observed what Marek Marek discussed above. It's an annoying problem because if you send a link to someone, it is usually converted to the UNC path, so they will encounter the problem too. Even if you do send the link with the letter mapped network drive, they may have that drive mapped to a different letter.

Can one of you open an issue in rmarkdown about this so that we don't forget ?

There must be something going on with path handling for figure when the file is not locally with the source or just with Network drive. We know network drive paths can cause issue.

Thanks !