cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LinqLover
Frequent Visitor

Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0, Culture=ne

Hi,

 

we have about a dozen of dashboards in our PBI app whose dashboards are scheduled to be updated every night. The datasets are connected to a self-hosted Postgres database. Since last night, the datasets cannot be updated any longer in Power BI Online, whereas updating the reports locally in Power BI Desktop works fine.

This is the error message we get when updating a dataset automatically or manually in PBI Online:

 

<report name> has failed to refresh.

Failure details: The last refresh attempt failed because of an internal service error. This is usually a transient issue. If you try again later and still see this message, contact support.

Processing error: An error happened while reading data from the provider: 'Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.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)'
Cluster URI: WABI-WEST-EUROPE-D-PRIMARY-redirect.analysis.windows.net
Activity Id: d2829b9e-f382-460c-9cdd-0c1545d61ad7
Error: {"error":{"code":"ModelRefresh_ShortMessage_ProcessingError","pbi.error":{"code":"ModelRefresh_ShortMessage_ProcessingError","parameters":{},"details":[{"code":"Message","detail":{"type":1,"value":"An error happened while reading data from the provider: 'Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.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)'"}}],"exceptionCulprit":1}}}

 

Why did this break, and how can we solve this? I found some similar issues [1, 2, 3] where the solution seemed to be downgrade npgsql from v4.* to v3.*. However, how can we modify the installation of the PBI Server, which is not self-hosted afaik? Did someone from Microsoft install some bad updates on the server cluster?

 

Looking forward to your help!

 

Best,

Christoph

 

PS: The issue apparently affects both imported tables and DirectQueries.

 

[1] https://community.powerbi.com/t5/Desktop/a-problem-connecting-wiht-postgresql-database/td-p/431097

[2] https://www.pbiusergroup.com/communities/community-home/digestviewer/viewthread?MessageKey=ae6ff321-...

[3] https://github.com/npgsql/npgsql/issues/2677

6 REPLIES 6
nebulus
Frequent Visitor

Similar happened in November 2020 and it took several days from Microsoft to fix. Does this only happen with Azure PostgreSQL databases?

 

November 2020 this was reported as know issue but at the moment it is not yet:

https://powerbi.microsoft.com/en-us/support/

 

nebulus_0-1630044616042.jpeg

 

Workaround that they listed in November 2020 did not help. We tried all of this with help from Microsoft support. We started our conversation 11th of Nov and the last one was 24th of Nov when the issue was fixed.

 

It seems that you need to refresh your data manually using desktop files and publish them again.

torstenholva
Frequent Visitor

Yup! Same thing here!
Got emails from all my reports, all within 6 minutes:

An error occurred while processing the data in the dataset.

Refresh failed:

ReportName has failed to refresh.
Failure details: An error happened while reading data from the provider: 'Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, 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)'

Next refresh for ReportName is scheduled for August 27, 2021 21:00 UTC.

I refreshed my data manually using PBI Desktop and published it again. All went fine.

Now, when I go to PBI Service, I still see the scheduled refresh error and I have to re-enter my credentials. After updating my credentials I again get the same error (mentined in my last post):

20210902@12h06m20s_PowerBIServiceDatasetUpdateFail_CouldNotLoadFileOrAssembly.png

 

I can log into the Azure Postgre database (with pgAdmin) using the credentials I provided earlier to PBI Service, so they seem to be OK.
What's going on? Is it me or Microsoft?

I am having a similar issue, anyone with a solution?

 

Processing error: An error happened while reading data from the provider: 'Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, 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)'

ysanabria
Frequent Visitor

I'm having the same issue, any solution for this?

 

 

An error happened while reading data from the provider: 'Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, 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)'

Anonymous
Not applicable

Im facing exactly the same issue.

 

Using Azure PostgreSQL!

See also this post: https://community.powerbi.com/t5/Service/Could-not-load-file-or-assembly-System-Runtime-CompilerServ...

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors