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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Error when using live connection to Power BI dataset "An error occurred while loading the model"

Hello,

 

details below - several users that rely on PBI desktop reports using live connections to workspace datasets are reporting intermittent issues (several per day), when an error message pops up, and they are forced to close and reopen PBI desktop. This has been happening for the last week or two at least.

 

PBI desktop version:  2.65.5313.621 64-bit (December 2018)

 

Note: I wanted to download the latest February version, but couldn't as the advanced link is broken (another issue I reported earlier today). Come on MS!

 

pbi error.png

 

Error Message:
An error occurred while loading the model for the item or data source ''. Verify that the connection information is correct and that you have permissions to access the data source.

 

Stack Trace:
at Microsoft.PowerBI.ReportingServicesHost.LocalReportProcessingHost.ExecuteSchemaCommand[T](DataSourceInfo dataSourceInfo, IDbConnectionPool connectionPool, ITracer tracer, IConnectionUserImpersonator connectionUserImpersonator, ITelemetryService telemetryService, Func`2 action, String failTelemetryMessage)
at Microsoft.PowerBI.ReportingServicesHost.LocalReportProcessingHost.GetModelMetadata(IASConnectionInfo connectionInfo, DataSourceInfo dataSourceInfo, IDbConnectionPool connectionPool, ITracer tracer, String modelMetadataVersion, IConnectionUserImpersonator connectionUserImpersonator, ITelemetryService telemetryService)
at Microsoft.PowerBI.ReportingServicesHost.DataShapingHelper.GetModelMetadata(IPowerViewEngine powerViewEngine, IDbConnectionPool connectionPool, DataSourceInfo dataSourceInfo, IASConnectionInfo asConnectionInfo, Boolean useMsolapForCsdl, IConnectionUserImpersonator connectionUserImpersonator, ITelemetryService telemetryService, String maxModelMetadataVersion)
at Microsoft.PowerBI.ReportingServicesHost.ReportingSession.GetModel(String dataSourceName, String modelMetadataVersion)
at Microsoft.PowerBI.ReportingServicesHost.ReportingSession.GetModelAsStream(String dataSourceName, String modelMetadataVersion)
at Microsoft.PowerBI.ReportingServicesHost.ReportingSession.GetConceptualSchema(String modelMetadataVersion, ParseConceptualSchema parse, ModelDaxCapabilities& capabilities)
at Microsoft.PowerBI.ExploreHost.Utils.ExploreHostUtils.GetConceptualSchemaImpl(IPowerViewHandler powerViewHandler, String databaseID, String maxModelMetadataVersion, ModelDaxCapabilities& capabilities)
at Microsoft.PowerBI.ExploreHost.Utils.ExploreHostUtils.HandleModelRetrievalExceptions[T](Func`1 wrappedCall, String databaseID)
at Microsoft.PowerBI.ExploreHost.Utils.ExploreHostUtils.GetConceptualSchemaAndHandleExceptions(IPowerViewHandler powerViewHandler, String databaseID, String maxModelMetadataVersion, ModelDaxCapabilities& daxCapabilities)
at Microsoft.PowerBI.ExploreHost.ExploreClient.GetConceptualSchema(String databaseID, String maxModelMetadataVersion)
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLive.GetConceptualSchema()
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLive.get_DataModel()
at Microsoft.PowerBI.Client.Windows.ExplorationClientHost.IsAskAQuestionSupported()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions[T](IExceptionHandler exceptionHandler, Func`1 func)

Status: New
Comments
Anonymous
Not applicable

Hello,

 

quick update - I have managed to upgrade to latest PBI Desktop, issue still persists, however error message has changed:

pbi error 3.png

 

Below are the details:

Feedback Type:
Frown (Error)

Error Message:
We couldn't connect to your model in the Power BI Service. The dataset may have been deleted, renamed, moved, or it is possible that you don't have permission to access it.

Error Message Detail:
Failed to connect to the URL 'https://api.powerbi.com' while attempting to call cluster resolution.

Stack Trace:

Server stack trace:
at Microsoft.PowerBI.ReportingServicesHost.LocalReportProcessingHost.ExecuteSchemaCommand[T](DataSourceInfo dataSourceInfo, IDbConnectionPool connectionPool, ITracer tracer, IConnectionUserImpersonator connectionUserImpersonator, ITelemetryService telemetryService, Func`2 action, String failTelemetryMessage, ServiceErrorStatusCode statusCode, ModelLocation modelLocation)
at Microsoft.PowerBI.ReportingServicesHost.LocalReportProcessingHost.GetModelMetadata(IASConnectionInfo connectionInfo, DataSourceInfo dataSourceInfo, IDbConnectionPool connectionPool, ITracer tracer, String modelMetadataVersion, IConnectionUserImpersonator connectionUserImpersonator, ITelemetryService telemetryService)
at Microsoft.PowerBI.ReportingServicesHost.DataShapingHelper.GetModelMetadata(IPowerViewEngine powerViewEngine, IDbConnectionPool connectionPool, DataSourceInfo dataSourceInfo, IASConnectionInfo asConnectionInfo, Boolean useMsolapForCsdl, IConnectionUserImpersonator connectionUserImpersonator, ITelemetryService telemetryService, String maxModelMetadataVersion)
at Microsoft.PowerBI.ReportingServicesHost.ReportingSession.GetModel(String dataSourceName, String modelMetadataVersion)
at Microsoft.PowerBI.ReportingServicesHost.ReportingSession.GetModelAsStream(String dataSourceName, String modelMetadataVersion)
at Microsoft.PowerBI.ReportingServicesHost.ReportingSession.GetConceptualSchema(String modelMetadataVersion, ParseConceptualSchema parse, ModelDaxCapabilities& capabilities)
at Microsoft.PowerBI.ExploreHost.Utils.ExploreHostUtils.GetConceptualSchemaImpl(IPowerViewHandler powerViewHandler, String databaseID, String maxModelMetadataVersion, ModelDaxCapabilities& capabilities)
at Microsoft.PowerBI.ExploreHost.Utils.ExploreHostUtils.HandleModelRetrievalExceptions[T](Func`1 wrappedCall, String databaseID, ServiceErrorStatusCode statusCode, FeatureSwitches featureSwitches)
at Microsoft.PowerBI.ExploreHost.Utils.ExploreHostUtils.GetConceptualSchemaAndHandleExceptions(IPowerViewHandler powerViewHandler, String databaseID, String maxModelMetadataVersion, ModelDaxCapabilities& daxCapabilities)
at Microsoft.PowerBI.ExploreHost.ExploreClient.GetConceptualSchema(String databaseID, String maxModelMetadataVersion)
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLive.GetConceptualSchema()
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLive.get_DataModel()
at Microsoft.PowerBI.Client.Windows.DataModelHostService.<GetDataModel>b__5_0()
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass1_0`1.<SendAndMarshalExceptions>b__0()
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass0_1.<SendAndMarshalExceptions>b__0(Object null)

Exception rethrown at [0]:
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.SendAndMarshalExceptions(SynchronizationContext context, Action callback)
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.SendAndMarshalExceptions[T](SynchronizationContext context, Func`1 callback)
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions[T](IExceptionHandler exceptionHandler, Func`1 func)

Stack Trace Message:
An error occurred while loading the model. Verify that the connection information is correct and that you have permissions to access the data source.

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__DisplayClass0_1.<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.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
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 System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at Microsoft.Mashup.Client.UI.Shared.WebDialogs.WebDialog.<>n__0(IWindowHandle owner)
at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClass4_0.<Main>b__1()
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.Program.Main(String[] args)

v-qiuyu-msft
Community Support

Hi @Anonymous ,

 

Does the issue happen when you use Power BI datasets connector in Power BI desktop or open a report which already connected to a Power BI dataset? 

 

If you know which which dataset is used in the report, please go to Power BI service and sign in with the same account as used in desktop in browser and check if you can find the dataset. 

 

Best Regards,
Qiuyun Yu 

Anonymous
Not applicable

Hi,

 

- yes it happens with a report that already is connected to a PBI online dataset

- it happens to multiple different users (including myself), when you have the PBI desktop report open for a wwhile, sooner or later this issue occurrs

- yes, I can see the dataset in Power BI service

- yes, I can see the dataset when going to PBI desktop and trying to connect to it

 

It almost seems as if some time out is at play here, though yesterday I only had the report opened for half hour, and then got the error. Few minutes before then, refreshing and cross highlighting worked no problem.

 

Thanks

Anonymous
Not applicable

Hello, any updates on this? Thanks!

v-qiuyu-msft
Community Support

Hi @Anonymous ,

 

Please update your Power BI desktop to the February version 2.66.5376.2521. It includes the fix for the issue in which PBI Desktop was not able to load visuals (Error - "Cannot load model" ) for Live Connect Dataset after PC being idle for long time or returned from sleep mode.

 

Best Regards,
Qiuyun Yu 

Anonymous
Not applicable

Hello - just letting you know that after testing all appears to be ok. Good to see that support fulfills it's role, keep up the good work 🙂

v-qiuyu-msft
Community Support

Hi @Anonymous ,

 

It looks the issue is resolved now. If it is, may I close this thread? 

 

Best Regards,
Qiuyun Yu 

RobJo
Helper I

Hi there,

 

I have the same issue, tried different actions but it is persistent....

I have published a master.pbix to a workgroup.
I created a new contracts.pbix file with Live Connection to the published dataset.
I saved the .pbix with some visuals and published it to the same workgroup.
I succesfuly created a PowerBI APP from the contracts report.

Now, when i restart/open the thin contracts.pbix i get this error:

Cannot load model

  "We couldn’t connect to your model in the Power BI Service.
  The dataset may have been deleted, renamed, moved, or it is possible

  that you don’t have permission to access it.

  No OLE DB Error information found."
Would appriciate some help here.... don't get it
(using last june version of powerbi)

Regards, Rob.

rmodi
Frequent Visitor

I am having the same issue on the latest Power BI Desktop

rmodi_0-1593177177505.png

Have to use Task Manager to close the desktop. clicking anything on this error message doesn't do anything.

rmodi
Frequent Visitor

@v-qiuyu-msft I opened the master .pbix file first, which opened fine.

and then i opened the connected .pbix file and the error message changed to:

rmodi_0-1593177599928.png

Not able to do anything in the connected .pbix. Please provide a solution ASAP.