Forum Discussion
Power BI will not start
Here is the error message. Could someone please help? Thanks a lot.
Feedback Type:
Frown (Error)
Timestamp:
2025-04-11T02:06:39.0336189Z
Local Time:
2025-04-11T12:06:39.0336189+10:00
Session ID:
d27fdd4d-cd8f-412c-9c09-83d88ca39f06
Release:
March 2025
Product Version:
2.141.1580.0 (25.03)+aa8628f0e8285c810874f1464275f27e3b63a25b (x86)
Error Message:
We weren't able to connect to the model.
Stack Trace:
Microsoft.PowerBI.Client.Windows.AnalysisServices.DynamicPortInitializationTimeoutException
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesProcess.AcquireServerDynamicPortInfo()
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesProcess.EnsureServiceIsReady()
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesProcess.Start()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesService.<StartProcess>d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.PowerBI.Client.Windows.Utilities.AggregateExceptionHandlingExtensions.WaitAndUnpackException(Task task)
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesService.CreateEmptyDatabase()
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesService.<StartProcess>d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<HandleAwaitableAsyncExceptions>d__1.MoveNext()
Stack Trace Message:
We weren't able to connect to the model.
Invocation Stack Trace:
at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.UI.Shared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)
at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.GetStackTraceInfo(Exception e)
at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass14_0.<HandleException>b__0()
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass2_0.<SendAndMarshalExceptions>b__0(Object null)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at System.Windows.Forms.WindowsFormsSynchronizationContext.Send(SendOrPostCallback d, Object state)
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.SendAndMarshalExceptions(SynchronizationContext context, Action callback)
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.PowerBI.Client.PowerBIUnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.HandleAwaitableAsyncException(IExceptionHandler exceptionHandler, Exception e)
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<HandleAwaitableAsyncExceptions>d__1.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.InvokeMoveNext(Object stateMachine)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation.<>c.<.cctor>b__8_0(Object state)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at System.Windows.Forms.WindowsFormsSynchronizationContext.Send(SendOrPostCallback d, Object state)
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.SendAndMarshalExceptions(SynchronizationContext context, Action callback)
at Microsoft.PowerBI.Client.Windows.Services.EventAggregationService.PublishAndMarshalExceptions[TEvent,TEventArg](TEventArg eventArgs, TaskCompletionSource`1 taskCompletionSource)
at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.OnUIBlockingChanged(Object sender, EventArgs eventArgs)
at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.OnScopesChanged(Scope before, Scope after)
at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.<>c__DisplayClass23_0.<EndScope>b__0()
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass2_0.<SendAndMarshalExceptions>b__0(Object null)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.WaitOnUIThreadForTaskCompletion[T](Task`1 task)
at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.BlockUIAndRun[T](Func`1 asyncMethod, PowerBIProgress progress)
at Microsoft.PowerBI.Client.Windows.Services.CurrentArtifactManager.OpenArtifactAndSetAsCurrent(IPowerBIWindowService windowService, IPowerBIArtifact artifactToOpen, IExceptionHandler exceptionHandler, Nullable`1 entryPoint)
at Microsoft.PowerBI.Client.CommandLineFileService.TryOpenOrCreateReport(IPowerBIWindowService windowService, IExceptionHandler exceptionHandler, Boolean forceCreate)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClass7_0.<RunApplicationLegacy>b__0()
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass3_0.<HandleExceptionsWithNestedTasks>b__0()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.HandleExceptionsWithNestedTasks(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Program.RunApplicationLegacy(String[] args, IPowerBIRootTrace trace)
at Microsoft.PowerBI.Client.Program.Main(String[] args)
PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.141.1580.0","ModuleName":"Microsoft.PowerBI.Client.Windows.dll","Component":"Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesProcess","Error":"Microsoft.PowerBI.Client.Windows.AnalysisServices.DynamicPortInitializationTimeoutException","MethodDef":"AcquireServerDynamicPortInfo","ErrorOffset":"393","ErrorCode":""}
OS Version:
Microsoft Windows NT 10.0.19045.0 (x64 en-US)
CLR Version:
4.8 or later [Release Number = 533325]
Peak Virtual Memory:
1.38 GB
Private Memory:
163 MB
Peak Working Set:
286 MB
IE Version:
11.3636.19041.0
Hi tpking ,
Thank you for reaching out to the Microsoft Fabric Forum Community.
Power BI Desktop is failing to start because it can't connect to the internal Analysis Services engine. This typically happens due to port allocation or permission issues.
The key error here is: DynamicPortInitializationTimeoutException(We weren't able to connect to the model.)
Can you please follow the steps to fix the issue.
1. Restart Power BI as Administrator: Sometimes Power BI needs elevated permissions to start the Analysis Services engine.
Right-click the Power BI Desktop shortcut & Select "Run as administrator".2. Check for Conflicting Applications or Ports : Power BI uses a dynamic port to run its internal Analysis Services model. Other software (like SQL Server, Docker, VPN clients, etc.) may conflict. Try restarting your computer to free up any locked ports. Temporarily disable any firewall or antivirus software (just to test if they're interfering). Check if TCP ports 5000–50000 are blocked or in use.
3. Clear Power BI's Local Cache: Corrupted cache files can also cause this.
Press Win + R, type:
Shell script : %localappdata%\Microsoft\Power BI Desktop\AnalysisServicesWorkspaces .Delete all folders inside.
Shell script : %localappdata%\Microsoft\Power BI Desktop\ .And remove the Temp folder if it exists.
4. Reinstall Power BI Desktop:(Uninstall Power BI Desktop)
Go to: C:\Program Files (x86)\Microsoft Power BI Desktop\ and manually delete any leftover folders
Reinstall the latest version from the official site
5. Check the Logs : (Look at Power BI log files in this folder)
Shell script :%localappdata%\Microsoft\Power BI Desktop\Traces
Search for errors or port binding failures around the time of the crash.
Can you refer the community forum thread link.
https://community.fabric.microsoft.com/t5/Desktop/Weren-t-able-to-connect-to-the-model/td-p/1464520If 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.
4 Replies
- v-dineshyaCommunity Support
Hi tpking ,
Thank you for reaching out to the Microsoft Fabric Forum Community.
Power BI Desktop is failing to start because it can't connect to the internal Analysis Services engine. This typically happens due to port allocation or permission issues.
The key error here is: DynamicPortInitializationTimeoutException(We weren't able to connect to the model.)
Can you please follow the steps to fix the issue.
1. Restart Power BI as Administrator: Sometimes Power BI needs elevated permissions to start the Analysis Services engine.
Right-click the Power BI Desktop shortcut & Select "Run as administrator".2. Check for Conflicting Applications or Ports : Power BI uses a dynamic port to run its internal Analysis Services model. Other software (like SQL Server, Docker, VPN clients, etc.) may conflict. Try restarting your computer to free up any locked ports. Temporarily disable any firewall or antivirus software (just to test if they're interfering). Check if TCP ports 5000–50000 are blocked or in use.
3. Clear Power BI's Local Cache: Corrupted cache files can also cause this.
Press Win + R, type:
Shell script : %localappdata%\Microsoft\Power BI Desktop\AnalysisServicesWorkspaces .Delete all folders inside.
Shell script : %localappdata%\Microsoft\Power BI Desktop\ .And remove the Temp folder if it exists.
4. Reinstall Power BI Desktop:(Uninstall Power BI Desktop)
Go to: C:\Program Files (x86)\Microsoft Power BI Desktop\ and manually delete any leftover folders
Reinstall the latest version from the official site
5. Check the Logs : (Look at Power BI log files in this folder)
Shell script :%localappdata%\Microsoft\Power BI Desktop\Traces
Search for errors or port binding failures around the time of the crash.
Can you refer the community forum thread link.
https://community.fabric.microsoft.com/t5/Desktop/Weren-t-able-to-connect-to-the-model/td-p/1464520If 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.- v-dineshyaCommunity Support
Hi tpking ,
Thank you for reaching out to the Microsoft Community Forum.
If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.
Thank you
- v-dineshyaCommunity Support
Hi tpking ,
Thank you for reaching out to the Microsoft Community Forum.
If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.
Thank you
- v-dineshyaCommunity Support
Hi tpking ,
Thank you for reaching out to the Microsoft Community Forum.
If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.
Thank you