Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
DanielMcConnell
New Member

Custom R Visual - Error in shell.exec(url) access denied

Hi,

 

I am having some trouble with creating a custom R visual to build a tree chart.

 

When I try and run the visual in powerbi.com I get the following error.

 "Error in shell.exec(url) : access to 'C:\Users\Client\Temp\RtmpQVqq7l\viewhtml1c1da57888/index.html' denied"

 

Does anyone have any idea what would be causing this error?

 

The following R code has been used to create the visual:

source('./r_files/flatten_HTML.r')

############### Library Declarations ###############
libraryRequireInstall("data.tree")
libraryRequireInstall("DiagrammeR")

####################################################

################### Actual code ####################

base_structure <- Values #dataframe produced from Power BI input values

#Cleaning the Data
base_structure$Parent <- gsub('\\\\','/', base_structure$Parent)
base_structure$Parent <- gsub(' ','_', base_structure$Parent)
base_structure$Child <- gsub(' ','_', base_structure$Child)

#Build Path Strings
base_structure$pathString <- paste(base_structure$Parent, base_structure$Child, sep = '/')

#Create tree object & format chart
DCU <- as.Node(base_structure)
SetGraphStyle(DCU, rankdir = "LR")

####################################################

############# Create and save widget ###############
internalSaveWidget(grViz(DiagrammeR::generate_dot(ToDiagrammeRGraph(DCU))), 'out.html')
#internalSaveWidget(plot(DCU), 'out.html') ####################################################

 

I have read the following post, but the solution doesn't work for me as I'm not using ploy_ly.

http://community.powerbi.com/t5/Service/custom-R-visual-runtime-error-access-denied-to-local-url/td-...

2 REPLIES 2
Anonymous
Not applicable

Hi DanielMcConnell,

 

I am having the same problem and the suggestion marked as the solution below does not work for me.

Did you have your problem fixed?

Anonymous
Not applicable

HI @DanielMcConnell,

 

I'd like to suggest you refer to following link about  r visual usage on power bi service side:

Creating R visuals in the Power BI service

 

R scripts security

R visuals are created from R scripts, which could potentially contain code with security or privacy risks.

These risks mainly exist in the authoring phase when the script author run the script on their own computer.

The Power BI service applies a sandbox technology to protect users and the service from security risks.

This sandbox approach imposes some restrictions on the R scripts running in the Power BI service, such as accessing the Internet, or accessing to other resources that are not required to create the R visual.

 

Known Limitations

R visuals in the Power BI service have a few limitations:

  • R visuals support is limited to the packages identified on the following page . There currently is no support for custom packages.

     

  • Data size limitations – data used by the R visual for plotting is limited to 150,000 rows. If more than 150,000 rows are selected, only the top 150,000 rows are used and a message is displayed on the image.

  • Calculation time limitation – if an R visual calculation exceeds 60 seconds the script times out, resulting in an error.

  • R visuals are refreshed upon data updates, filtering, and highlighting. However, the image itself is not interactive and does not support tool tips.

  • R visuals respond to highlighting other visuals, but you cannot click on elements in the R visual in order to cross filter other elements.

  • R visuals are currently not supported for the Time data type. Please use Date/Time instead.

  • R Visuals do not display when using Publish to web.

  • R visuals currently do not print with dashboard and reports printing

  • R visuals are currently not supported in the DirectQuery mode of Analysis Services

 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.