R scripts "Enable script visuals" to "select to enable" and back to enable script visuals loop
I have been developing R script visual for a year with no particular issues. However, since the last update I have had to click enable script visuals every time I went to the page. Since upgrading to the July 21 version, I am caught in an endless loop between the enable script visuals pop up and the select to enable (on the actual visual).
My scripst have not changed, they work just fine in R Studio (the IDE I connected to Power BI), but they no longer render on the desktop because of this loop.
I do get a warning (but not an error) in R STudio about my ggplot2 library (4.0.3) being a slightly newer version than my R (4.0.0) As I have not upgraded either for a while (upgrading anything is difficult at my work), I take this to be a red herring.
Using Power BI desktop, (version 2.95.804.0 64-bit july 21) Has anyone else experienced this issue? Any ideas?
This is for the benefit of anyone else who may experience similar odd behaviour. I have completed more tests to narrow down the issue and I believe the error to be spurious - it does not point at the real issue. I conclude this because one of my tests involved setting up a new pbix file from scratch and running the code in this (just this one source table and this R script, nothing else), and the visual displays just fine. There are no enable script loops and I only need to click enable script visuals once. Either my original pbix file has somehow become corrupted, or else there is interference between one of the many data sources I use and this R script.
I guess I'll rebuild my entire data model in a new pbix.
I don't think it is a device issue. I have the same device as previously and have not used Power Bi on another device for a very long time (if ever). Since I described the issue here, I have started up a brand new, empty pbix file and I have tested my script in this file. The script works and visualises fine. I have since also checked some older R script visualisations on my device. It looks like the issue only affects all R scripts in this particular dashboard/pbix file.
So therefore it is unlikely to do with the device, and also nothing to do with the PowerBI version.
The only logical possible causes I can think of are that
a) my pbix file was somehow corrupted - possible, but why would it only affect my R script visualisations? All native DAX/Powerquery code visualises fine. Also why do R scripts not work on previous versions of this particular dashboard/pbix I saved? I cannot answer this because I have insufficient understanding of how the software works, but this seems strange to me.
b) an interaction with some of the data or visuals I have added to the dashboard after adding the R scripts - still testing this by bringing in one visual after the other and continuing to test if my R scripts still visualise. So far so good.
c) I may possibly have created an unusual "meta settings" environment by enabling a whole lot of development options one of which (or the interaction of which) may have caused R scripts not to visualise. I am testing this by not enabling any development options other than R scripting and so far I am still able to visualise R scripts as part of the bigger dashboard.
I am partway through rebuilding the data model and dashboard from scratch and will provide feedback should I be able to isolate the issue.
#3. Did you mean the enhanced dataset metadata? If that is the case, they may change the report structure and they may not compatibility with old structures that generated on the old versions. You can also take a look at the following document it helps: