Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
letsgobro
Frequent Visitor

Power BI Desktop crashes when clicking "Close and Apply" in power query

Hi everyone,

I'm getting a strange error that I am having trouble finding the cause for.

When creating a new file, I connect to my data source (this has happend on both SQL on prem and Azure databases) and click edit data to go into power query.  I might rename a column or something minor and then click "Close and Apply".

I get a brief pop-up stating that I need to ensure that the server is on and that I can connect.  (I can as I've got my SSMS open and doing queries on the same server/db).  That pop-up then goes away and then Power BI becomes unusable as a unrelenting pop keeps occuring.  This time it's a "Something went wrong" pop up.

 

In its view details is nothing I can see as the source of the issue...

 

Feedback Type:
Frown (Error)

Error Message:
We are encountering problems. Please close and restart Power BI Desktop.

 

Stack Trace:
Microsoft.PowerBI.Client.Windows.MainWindow+AnalysisServicesCrashedAfterSuccessfulConnectionException

[omitted remaining stack trace for readability, I can put the rest of it on subsequent post if need be]

 

Stack Trace Message:
We are encountering problems. Please close and restart Power BI Desktop.

 

PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.104.941.0","ModuleName":"Microsoft.PowerBI.Client.Windows.dll","Component":"Microsoft.PowerBI.Client.Windows.MainWindow","Error":"Microsoft.PowerBI.Client.Windows.MainWindow+AnalysisServicesCrashedAfterSuccessfulConnectionException","MethodDef":"OnAnalysisServicesProcessExited","ErrorOffset":"44"}

 

I can't even save at this point.  "Something went wrong   We werent' able to save the database"

Once in a while i will not get this and can actually move past this but it's a gamble.

I don't see anything in event viewer that points me in any direction.

 

Have any of you had this before and know what's going on?

7 REPLIES 7
Daljinder
Regular Visitor

Hi @letsgobro was this resolved. I am facing with a similar issue and unable to find any solution.

Can you please let me know if you were able to solve this and what steps you used?

v-rongtiep-msft
Community Support
Community Support

Hi  @letsgobro ,

Is this problem solved now?

If not,  which action do you perform in Power Query then cause the issue occurs? You may check Minimum requirements, Troubleshoot opening Power BI Desktop and also try earlier versions from Power BI updates archive.

 

If I have misunderstood your meaning, please provide more details.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

No, it is still happening.

It doesn't even have to be in power query for this to happen.  I can load up a template and put in my server/database parameters and as it refreshes, it gets up to "connecting to model" and then that's when the error pops up, "Something went wrong".

The refresh box says a connection can't be made.  Ensure the server is running.

I can guarantee it is because I'm connected to it via Azure Data Studio or SSMS and can query it.

 

The crazy part is that sometimes out of strange luck, it will work and I've done nothing differently.

I've downloaded the latest PBI desktop and i'm update to date on windows/patches.

EventViewer gives me nothing, so I'm really struggling here.

Looking like it's coming down to cached credentials.  

 

I tested connecting to a view in my power BI desktop; loaded up into the model just fine.

I opened up the template and attempted to connect to the very same database that uses that same view...no can do.

 

Cannot load model.  No connection could be made because the target machine actively refused it. 

 

So I went to Options > Data Source Settings and selected CLEAR ALL to get rid of the cached credentials.

 

Now when opening said template, I get a pop up asking for credentials, as expected, but with one very important distinction.  Under the username and password it also has a box for which level to apply these to.  (I've gotten this before but the level option was not there)

I set that option to be at the server level.  

My model then connected and pulled down the data.

 

I'm glad that it's working, but is there any advice on what you should normally do in this case?  Do you always leave it at the server level or is it case by case?

Been working with support and nothing of substance yet. 

They are currently focused on this:  No connection could be made because the target machine actively refused it 127.0.0.1:59642

 

We aren't sure why it's showing a local IP when it's connecting to the server.  Power Query even shows us the preview of the data indicating that we are connecting to the server and database.  It errors out when it attempts to Connect to the Model. 

 

Is this a known issue when using parameters for server and database for a template?

Any ideas from you all would be great while support still tries to hash it out.

Just following up here...

My collegue gets the same error but this method of clearing credentials is not working for him.  I tried it again and it's still hit or miss with me.  I will open up a support ticket.

amitchandak
Super User
Super User

@letsgobro , Make sure latest windows patch and .net version is in use.

 

Reinstall power bi and try.

1. Make sure you have 8-10 GB of RAM and sufficient RAM is free for Power BI

2. The Disk on which Power BI is installed has at least 20 GB of free Space

3. Increase virtual memory of system if needed 

 

Increase memory management cache to 8 GB  and clear old cache. Stop the auto save.

Load Setting.png

 

If these do not work log a support ticket

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.