Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I recently picked up the Power BI visual tools and endeavored to make rhtml based visual using Plotly's scatter3d plot.
It runs fine in desktop, however when published to service, I get a Script Runtime Error that states:
"Error in shell.exec(url) : access to 'C:\Users\Client\Temp\Rtmpiq9ma9\viewhtml1c4ec52b5b/index.html' denied"
Obviously, the mixed-up forward and back slashes could be the source of the problem here, but I have 0 ideas for how to go about fixing it. I've only touched the script.r, capabilities.json, dependencies.json, and pbiviz.json files so far. I've only installed package versions supported by Power BI and I am using MS R Open.
Any help is appreciated!
Solved! Go to Solution.
Not 100% sure, but I think the issue is a matter of package version compatibility. Unfortunately, XML is orphaned and installing older versions of it is hard. I solved it by migrating the rhtml visual from XML to xml2. There is a PR on the official MS Powerbi-Visual-Tools repo that has the modified flatten_HTML and dependencies.json files if anyone struggles with XML in the future. Feel free to comment on it and encourage the repo maintainers to review and merge it.
EDIT: To clarify, in my original post, I had installed the correct versions of packages I was explicitly using. XML is used to save the widget out into a Power BI compatible file, but installing versions besides the current release on Windows is bad. I spent about 12 hours total on it and tried 3 different methods - 2 almost worked, making it past the make phase and erroring out just past R's lazy load stage.
I know this is an ancient thread, but has anyone found a solve for this issue? I am in the same exact situation, any help would be appreciated.
It's been a *long* time, but I think my theory was right and I've marked it as the solution. The culprit was indeed the version of the XML package. The patch I submitted to switch to xml2 was merged in the summer of 2021 https://github.com/microsoft/PowerBI-visuals-tools/pull/342
There may now be a similar problem with the rhtml dependencies elsewhere as indicated by this PR: https://github.com/microsoft/PowerBI-visuals-tools/pull/488
I woud scrutinize what packages you have installed in your project and compare them to the supported versions in the Power BI Service: https://learn.microsoft.com/en-us/power-bi/connect-data/service-r-packages-support
My XML package was one minor release higher than what was supported at the time IIRC
If you find that you have a package that isn't supported or a version that's too high, you'll need to remove and find a supported alternative or downgrade it respectively.
If you can't, then I would either contact Power BI support or make an issue on github and attach a minimum-reproducible example so that the maintainers can quickly find the problem (help them help you).
Is this issue resolved? I am having the same issues are mentioned in the original post. The Rhtml visual works fine in Power BI Desktop but it breaks when used in Power BI cloud/service.
I see the same error mentioned above.
ERROR ; "Error in shell.exec(url) : access to 'C:\Users\................../index.html' denied"
Not as far as I know. I haven't been able to test, but I had a theory that it was the XML package version (was impossible to install the supported version, so it defaulted to the newest). I was able to patch it out with xml2 (possible to install supported version), submit the changes, and the official repo now uses xml2 as of July. Are you using a fresh/recent install of the visual tools? If you are and XML is nowhere to be seen in your installed packages, then that's insanely discouraging and the problem is elsewhere. I did speak w/ an official Power BI rep a few weeks ago who seemed confident that it is most likely an unsupported package version.
Not 100% sure, but I think the issue is a matter of package version compatibility. Unfortunately, XML is orphaned and installing older versions of it is hard. I solved it by migrating the rhtml visual from XML to xml2. There is a PR on the official MS Powerbi-Visual-Tools repo that has the modified flatten_HTML and dependencies.json files if anyone struggles with XML in the future. Feel free to comment on it and encourage the repo maintainers to review and merge it.
EDIT: To clarify, in my original post, I had installed the correct versions of packages I was explicitly using. XML is used to save the widget out into a Power BI compatible file, but installing versions besides the current release on Windows is bad. I spent about 12 hours total on it and tried 3 different methods - 2 almost worked, making it past the make phase and erroring out just past R's lazy load stage.
Hi, @Aweptimum ,
If it's a powerbi custom visual by r in html, there is a file named [flatten_HTML.r] in the repo, you can check whether the code in it may cause inconsistency of forward and backward slashes. Maybe the problem lies in this file.
Mark this post as solution if this helps, thanks!
After poring over it for a bit, it doesn't look like the flatten_HTML file is the culprit, but it's hard to be sure. If it was, I guess there'd be at least a few dozen people with the same problem since it's from the MS repo.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
1 | |
1 | |
1 |