Forum Discussion

tyj's avatar
tyj
New Member
1 year ago
Solved

Script Runtime Error for R Script Visual

Hi there, I have an R Script Visual that works perfectly fine on Power BI Desktop, but after publishing it onto app.powerbi.com, I get the following error:  My script uses the dplyr, lubridate...
  • v-ssriganesh's avatar
    1 year ago

    Hi tyj,
    Thanks for reaching out to the Microsoft fabric community forum.

    After thoroughly reviewing the details you provided, that your R Script Visual runs fine in Power BI Desktop but encounters a Script Runtime Error when published to Power BI Service.

    Here are some possible reasons and troubleshooting steps to resolve the issue:

    • Power BI Service only supports a specific set of R packages. While dplyr, lubridate, ggplot2, and scales are generally supported, some functions within these packages may not work in the service. Check the official list of supported R packages here: Supported R packages in Power BI
    • Power BI Service uses a different R version than your desktop. compare versions and adjust accordingly.
    • Scripts must complete within 5 minutes in the service. Try optimizing the script by reducing data size or processing complexity.
    • A minimal script can help identify the issue. Publish a basic ggplot2 plot first, then add complexity gradually.

    Personal Gateway is not required unless your script connects to on-premises data.

    If this information is helpful, please “Accept it as a solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
    Thank you.