Forum Discussion
postgres.database.azure issue connecting with power bi
i cant connect power bi with postgres.database.azure :
error :
Failed to update data source credentials: An error happened while reading data from the provider: 'Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'Hide details
Activity ID: 8f9a1a82-6633-4d2c-b8fb-1ef4bf852440
Request ID: 2d20805c-1978-9581-f087-972f4d988dfb
Status code: 400
Time: Mon Sep 11 2023 01:48:33 GMT+0300 (Arabian Standard Time)
Service version: 13.0.21509.81
Client version: 2309.1.15569-train
Cluster URI: https://wabi-east-asia-b-primary-redirect.analysis.windows.net/
- Anonymous2 years ago
Hi ysalih ,
Have submitted this issue internal to confirm, would update here as soon as possible if there is any update about it.
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
25 Replies
- AnonymousNot applicable
Hi ysalih ,
Have submitted this issue internal to confirm, would update here as soon as possible if there is any update about it.
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- bobbyilievFrequent Visitor
Thank you Anonymous!
There is a similar discussion here as well about the same problem:
https://community.fabric.microsoft.com/t5/Service/Unable-to-connect-app-powerbi-com-to-postgresql/m-p/3426358#M205880I came across the same problem reported a few years ago after the upgrade to Version 4.0.0.0 here:
> https://community.fabric.microsoft.com/t5/Service/Could-not-load-file-or-assembly-System-Runtime-CompilerServices/m-p/1481902/page/2 - bobbyilievFrequent Visitor
I've tested this using a Power BI gateway running on a Windows server and it works, but it will be much nicer to just use the native solution rather than having to manage an extra Windows server and generate unnecessary bandwidth.
- manceeleeFrequent Visitor
Hello, does support team have any update on this issue? It has been couple days and not sure how long will it take for them to fix it. I believe last time it took several days for them to addressed it.
- bobbyilievFrequent Visitor
I've not seen any updates from their support team so far. For the time I've set up a gateway service on a separate Windows server, however, it will be nice to just use the native connector as it is supposed to be.
- AnonymousNot applicable
Hi peter_werk,
There is a fix that will begin to be deployed in the near future.Please be patient.
Microsoft Fabric Support and Status | Microsoft Fabric
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- bobbyilievFrequent Visitor
Thank you for the update! Looking forward to the deployment and testing this out!
- peter_werkFrequent Visitor
Fixed now for me 18 Sept 12:03 CEST
- fapomatiusNew Member
The same issue manifests for me and I am not using a gateway (I shouldn't have to, as my Postgres instance is deployed on the cloud), so I don't think this is the problem. Btw, on Power BI Dekstop it works, the problem manifests only in Power BI Service, when you publish the report.
- sergej_ogSuper User
But it doesn´t work, right?
Look, from Power BI Service´s point of view "everything" not in your PBI tenant is on-prem.
Meaning: when PBI Service don´t see any sources within Service network these sources are not reachable for Service.
Your organizational network as well azure cloud environment are foreign networks which are accessable through a gateway. Azure and Power BI are MS product but they are "not in the same box".
That´s what I have seen until today. You will need a gateway in most cases.
Maybe you have another experiences but that´s what I saw a lot of times.
And my cloud sources are accessable and work properly using a gateway.
Regards.
- AnonymousNot applicable
I am having the same error while trying to set up "auto refresh" in PowerBI Services yesterday, and still can't find a solution yet.
My PowerBI Desktop has no problem connecting and importing tables from this Azure Database. Also, after I clicked "Refresh" in PowerBI Desktop, the tables are still updated with latest data.
However, after publishing it to PowerBI Services, it shows the same error as yours while I try to edit the credentials.
--
Couple months ago, I also had trouble setting up "auto refresh", which I cannot recall what the errors are. I had to ask my Database Admin to set up permission in Azure Portal as instructed in this Microsoft document: https://learn.microsoft.com/en-us/power-bi/connect-data/service-admin-troubleshooting-scheduled-refresh-azure-sql-databases
I am asking him to double check this setting again, but he is on vacation for a week. You can try that and let me know if it works tho.
- sergej_ogSuper User
Your gateway is runnig on your local machine or on a separate VM?
Do you already have required driver installed on your gateway machine?- AnonymousNot applicable
I never setup a gateway before to connect to this Database and to "auto refresh" my previous Reports in PowerBI Services.
As I just checked in `Gateway and cloud connections`, I do not need to setup it. Is that right? sergej_og
- bobbyilievFrequent Visitor
There is a similar discussion here:
> https://community.fabric.microsoft.com/t5/Service/Unable-to-connect-app-powerbi-com-to-postgresql/m-p/3426358#M205880I am also facing the exact same problem for my Postgres instance. It was all working last week and over the weekend it stopped, as far as I can tell it might be related to the most recent update to Version 5.0.0.0. I'm not using a gateway but accessing a publically facing Postgres instance.
Failed to update data source credentials: An error happened while reading data from the provider: 'Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'
I came across the same problem reported a few years ago after the upgrade to Version 4.0.0.0 here:
- bobbyilievFrequent Visitor
The server is public and it was working fine last week and I am still able to access it from all other tools including Power BI Desktop, it is only Power BI Service that does not work. It definitely does not sound like a connection issue but a Power BI Service problem, the same thing happened after another major version upgrade on their side a couple of years ago as discussed in an old thread here with the same error but for V 4.0.0.0 rather than V 5.0.0.0 as it is now:
> https://community.fabric.microsoft.com/t5/Service/Could-not-load-file-or-assembly-System-Runtime-CompilerServices/m-p/1481902/page/2
- ysalihFrequent Visitor
- ysalihFrequent Visitor
- sergej_ogSuper User
Why personal mode? There are limitation.
Never mind.
Ok, part 1 - gateway is running --> on your local machine or vm?
Part 2: what about the installation of postgres driver on the gateway hosting machine? Version 5.0.0.0.
As your error message told you.