Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

R script refresh with personal gateway - credential message

Hi,
I just downloaded and installed personal gateway. Tried to schedule refresh
My data source is R.
The only option Ive got is WindowsWithoutImpersonation - which I clicked on Sign In button and it gave me the following error message.
 
I can successfully refresh my dataset on desktop. Can you help? Thank you
 
 
Failed to update data source credentials: An error happened while reading data from the provider: 'Could not load file or assembly 'Microsoft.PowerBI.Scripting, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)'Hide details
Activity ID:9313b16c-78f0-4268-9f74-0905e78ab55a
Request ID:74961647-e14d-433c-c9c5-082010460226
Status code:400
Time:Sun Dec 30 2018 16:15:39 GMT+0000 (GMT Standard Time)
Version:13.0.7683.237
Cluster URI:https://wabi-north-europe-redirect.analysis.windows.net

25 Replies

  • tqbao27's avatar
    tqbao27
    Regular Visitor

    I think the problem might have to do with mash up data source. I got my data from Oracle database then transform it using R script. Then Power BI might be asking for the credential of my Oracle database while I'm supplying it with R credential. I remember there used to be more option for authentication method. Not sure why there is only one option now. Anonymous

    • Pedzilla1's avatar
      Pedzilla1
      New Member
      I got no other data source in my test file, it pulls data from R script only. I doubt if it’s the mash up process for me?
  • Anonymous's avatar
    Anonymous
    Not applicable

    HI Anonymous,

     

    Can you please provide some detail information about this? (e.g. part of script code, local gateway refresh log..)

     

    In addition, did any formula reference external data source in r script? If this is a case, current power bi service not support this, you can take a look at following link to know more about this:

    Creating R visuals in the Power BI service

    Spoiler

    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.

     

     

    Regards,

    Xiaoxin Sheng

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi there, There is no custom visual in it. I use R script in the transformation. I simply loaded a local csv fle and use R script to rename the output from dataset to output. I apprecited that this isnt meaningful script but I want to proove that I can schedule refresh using personal gateway with R script.

       

      Hope you can help me.

      Many thanks Anonymous

       

      output <- dataset

       

    • Anonymous's avatar
      Anonymous
      Not applicable

      Anonymous in personal gateway I also switched of custom data connector as per some of previous posts who said this helped.

      Unfortunately this didnt make any difference in my scenario.

  • tqbao27's avatar
    tqbao27
    Regular Visitor

    I also encountered the same problem. My R script was working fine with the Setptember version of personal gateway.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi did you find a workaround tqbao27

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous,

     

    Can you please share a pbix file with some simple data and r script who can reproduce that scenario?

    I will test on my side and report to power bi team if I can reproduce this issue.

     

    BTW, I can use personal gateway to refresh r script sample file.

     

    Regards,

    Xiaoxin Sheng

    • Pedzilla1's avatar
      Pedzilla1
      New Member
      Can you please give me your r script sample file and I will run in on my personal gateway.

      My sample isn’t meaningful as it’s jusf a prof of concept that it can work on the gateway

      Much appreciated many thanks Anonymous
    • Anonymous's avatar
      Anonymous
      Not applicable

      Is it possible you can share your pbix file so i can try it here please? Anonymous 

      Also what is the version of your gateway?

      I wont be able to share my file due to network / firewall.

       

      However its a generic dataset  - here is the M code - hope you can help.

      let
          Source = R.Execute("cars = data(mtcars)#(lf)mtcars$date = Sys.time()"),
          mtcars1 = Source{[Name="mtcars"]}[Value],
          #"Changed Type" = Table.TransformColumnTypes(mtcars1,{{"date", type time}})
      in
          #"Changed Type"

      Thank you so much

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        HI Anonymous,

         

        I test with my sample and your code, they all works well.

         

        I think this issue may relate to data region service of power bi, maybe you can try to use fiddler to trace these httprequests of refresh operation.

         

        BTW, I also attached sample files which I tested at below.

         

        Regards,

        Xiaoxin Sheng

  • tqbao27's avatar
    tqbao27
    Regular Visitor

    I haven't found any work around yet Anonymous

     

    Is there any way that I could download the old version of personal gateway Anonymous

    • Anonymous's avatar
      Anonymous
      Not applicable

      What is your region? tqbao27

      I am UK based - so North Europe.

      • tqbao27's avatar
        tqbao27
        Regular Visitor

        I'm in the US so I guess North America.

         

        For this issue, I remember there used to be more options for the Authentication method, not just WindowsWithoutImpersonation.

  • haniewais's avatar
    haniewais
    Microsoft Employee

    We are having a similar issue on my team. 

     

     

    When attempting to provide the R credentials on the powerBI site, the I get the same error as op. 

     

    However, when I setup a personal gateway on my laptop that I use for work everyday, everything works fine!

    I clicked the 'edit credentials' used the default only option of 'WindowsWithoutImpersonation' and set up an auto refresh and it all worked...  

     

    I then tried to replicate this on another system to free up my laptop, but and I ended up with the same error as before. 

     

    I can only get this working on my personal laptop. 

     

    On all three systems, I'm running:

    R 3.5.1

    Personal Gateway 3000.0.265

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hey there

      I decided to revert back to September release and this works.

      • haniewais's avatar
        haniewais
        Microsoft Employee

        Hey Pedzilla, 

         

        Im glad to hear you got it working!

         

        You rolled back to September release of R or PowerBI Personal Gateway?