Power BI report setup failing with "Object reference not set to an instance of an object"
See original GitHub issueDescription We are facing issues with upgrading the Power BI report to latest version attached to latest CoE release. After login and setting the environment URL, we get “Object reference not set to an instance of an object” error. We are using service account, which has access to the CoE environment (the CoE solution upgrade was also done with this user). We had tried to use also one of our admin accounts who also has access to the environment and proper privileges.
Steps to reproduce the behavior:
- open Dashboard-PowerPlatformAdminDashboard-2021-04-08.pbit in Power BI Desktop app
- when prompted, copied the environment URL from the session details in make.powerapps.com without http prefix
- when prompted, log in with a service account
- watch window loading the data
- after some time operation fails with following message
Version of the Power BI Desktop
Trace log: Feedback Type: Frown (Error)
Error Message: Object reference not set to an instance of an object.
Stack Trace:
Microsoft.Mashup.Host.Document.SerializedException
at Microsoft.Mashup.Evaluator.ChannelMessenger.CreateChannel()
at Microsoft.PowerBI.Client.OleDbProvider.PowerBIMashupDataSource.EvaluationSession.Dispose()
at Microsoft.Mashup.Host.ProviderShared.PackageMashupEvaluator.<>c__DisplayClass7_0.<Evaluate>b__1(Object o)
at Microsoft.Mashup.Evaluator.Interface.InvokeManyAction1.CheckDone() at Microsoft.Mashup.OleDbProvider.DataHost.MashupEvaluator.<>c__DisplayClass4_1.<Evaluate>b__1() at Microsoft.Mashup.OleDbProvider.DataHost.AsyncResultIDataReaderSourceHelper.InvokeThenOnDispose(Action
1 callback, AsyncResult1 result, Action action) at Microsoft.Mashup.OleDbProvider.DataHost.MashupEvaluator.<>c__DisplayClass4_0.<Evaluate>b__0(EvaluationResult2
1 result)
at Microsoft.Mashup.Evaluator.Interface.EvaluationResultExtensions.InvokeThenOnDispose(Action1 callback, EvaluationResult2
1 result, Action action)
at Microsoft.Mashup.Evaluator.Interface.EvaluationResultExtensions.InvokeThenOnDispose[T](Action1 callback, EvaluationResult2
1 result, Action action)
at Microsoft.Mashup.Evaluator.LimitedDocumentEvaluatorFactory.Evaluation1.Complete(EvaluationResult2
1 result)
at Microsoft.Mashup.Evaluator.Interface.EvaluationResultExtensions.InvokeThenOnDispose(Action1 callback, EvaluationResult2
1 result, Action action)
at Microsoft.Mashup.Evaluator.Interface.EvaluationResultExtensions.InvokeThenOnDispose[T](Action1 callback, EvaluationResult2
1 result, Action action)
at Microsoft.Mashup.Evaluator.DocumentEvaluator.<>c__DisplayClass7_01.<BeginGetResult>b__0(EvaluationResult2
1 result)
at Microsoft.Mashup.Evaluator.Interface.EvaluationResultExtensions.InvokeThenOnDispose(Action1 callback, EvaluationResult2
1 result, Action action)
at Microsoft.Mashup.Evaluator.Interface.EvaluationResultExtensions.InvokeThenOnDispose[T](Action1 callback, EvaluationResult2
1 result, Action action)
at Microsoft.Mashup.Evaluator.LimitedDocumentEvaluatorFactory.Evaluation1.Complete(EvaluationResult2
1 result)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.RemoteEvaluation1.TryComplete(EvaluationResult2
1 result)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.RemoteEvaluation`1.TryCompleteWithException(Exception exception)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.RemoteEvaluation.Evaluate(Boolean enableFirewall)
at Microsoft.Mashup.Evaluator.EvaluatorThreadPool.EvaluatorThread(Object state)
at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass9_0.<CreateAction>b__0(Object o)
Stack Trace Message: Object reference not set to an instance of an object.
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__DisplayClass15_0.<HandleException>b__0()
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass2_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.Windows.DialogWindowBase.ShowModal(IWindowHandle windowHandle)
at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func1 showModalFunction) at Microsoft.PowerBI.Client.Windows.FloatingDialog.KoLoadToReportDialog.TryShowDialog(Report report, IExceptionHandler exceptionHandler, IPowerBIWindowService windowService, IQueryServices queryServices, IModelingService modelingService, LocalizedString title, LoadToModelContext loadToModelContext) at Microsoft.PowerBI.Client.Windows.FloatingDialog.KoLoadToReportDialog.<>c__DisplayClass16_0.<TryShowDialogForQueries>b__0() at Microsoft.PowerBI.Client.Windows.Report.<>c__DisplayClass60_0
1.<SynchronizeLooselyWithQueries>b__0()
at Microsoft.PowerBI.Client.Windows.Report.<SynchronizeLooselyWithQueriesAsync>d__611.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder
1.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.PowerBI.Client.Windows.Report.SynchronizeLooselyWithQueriesAsync[T](Func1 getTask) at Microsoft.PowerBI.Client.Windows.Report.SynchronizeLooselyWithQueries[T](Func
1 action)
at Microsoft.PowerBI.Client.Windows.Services.TemplateManager.PromptForParametersAndCredentials(IPowerBIWindowService windowService, IQueryServices queryServices, IExceptionHandler exceptionHandler, String filePath, Report templateReport, Boolean allCredentialsSatisfied, Boolean& editQueries)
at Microsoft.PowerBI.Client.Windows.Services.TemplateManager.TryImportTemplate(IPowerBIWindowService windowService, IQueryServices queryServices, IExceptionHandler exceptionHandler, TelemetryUserActionId entryPoint, Boolean& editQueries, String filePath)
at Microsoft.PowerBI.Client.Windows.Commands.ApplicationCommands.DataImportCommands.ImportTemplate(IPowerBIWindowService windowService, IExceptionHandler exceptionHandler, ImportTemplateParameters parameters)
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.Practices.Prism.Commands.DelegateCommandBase.<>c__DisplayClass4_0.<.ctor>b__0(Object arg)
at Microsoft.PowerBI.Client.Windows.Commands.CompositeCommand1.Execute(ICommand command, Object parameter) at Microsoft.Practices.Prism.Commands.CompositeCommand.Execute(Object parameter) at Microsoft.PowerBI.Client.Windows.Commands.CompositeCommand
1.Execute(T parameter)
at Microsoft.PowerBI.Client.Windows.MainWindow.OpenDocument(TelemetryUserActionId entryPoint, String testFilePath)
at Microsoft.PowerBI.Client.Windows.MainWindow.<ShowStartDialog>d__96.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.PowerBI.Client.Windows.MainWindow.ShowStartDialog()
at Microsoft.PowerBI.Client.Program.<>c__DisplayClass4_7.<<Main>b__7>d.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClass4_7.<Main>b__7(MainWindow mainWindow)
at Microsoft.PowerBI.Client.Windows.MainWindow.<<ActivateMainWindow>b__114_1>d.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.PowerBI.Client.Windows.MainWindow.<ActivateMainWindow>b__114_1()
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<HandleAwaitableAsyncExceptions>d__1.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.HandleAwaitableAsyncExceptions(IExceptionHandler exceptionHandler, Func1 asyncFunc) at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<HandleAsyncExceptions>d__0.MoveNext() at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.HandleAsyncExceptions(IExceptionHandler exceptionHandler, Func
1 asyncFunc)
at Microsoft.PowerBI.Client.Windows.MainWindow.<ActivateMainWindow>b__114_0()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
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.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)
PowerBINonFatalError: {“AppName”:“PBIDesktop”,“AppVersion”:“2.92.706.0”,“ModuleName”:“”,“Component”:“Microsoft.Mashup.Evaluator.ChannelMessenger”,“Error”:“Microsoft.Mashup.Host.Document.SerializedException - System.NullReferenceException”,“MethodDef”:“CreateChannel”,“ErrorOffset”:“”}
Snapshot Trace Logs: C:\Users*****\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShot7c60182c-2990-4a1f-bfb0-74e6bc19c185.zip
Model Default Mode: Empty
Model Version: PowerBI_V1
Performance Trace Logs: C:\Users****\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip
Enabled Preview Features: PBI_JsonTableInference PBI_NewWebTableInference PBI_ImportTextByExample PBI_ExcelTableInference PBI_eimInformationProtectionForDesktop PBI_newFieldList
Disabled Preview Features: PBI_shapeMapVisualEnabled PBI_SpanishLinguisticsEnabled PBI_qnaLiveConnect PBI_azureMapVisual PBI_dataPointLassoSelect PBI_compositeModelsOverAS PBI_narrativeTextBox PBI_dynamicParameters PBI_anomalyDetection PBI_cartesianMultiplesAuthoring
Disabled DirectQuery Options: TreatHanaAsRelationalSource
Cloud: GlobalCloud
PowerBINonFatalError_ErrorDescription: System.NullReferenceException
PowerBIUserFeedbackServices_IsReported: True
Formulas:
section Section1;
Issue Analytics
- State:
- Created 2 years ago
- Comments:10
Top GitHub Comments
I have had this same issue that I have been working on all week and just see your post today. I have now reverted to february file Dashboard-PowerPlatformAdminDashboard-2021-01-07.pbit which is now working. We have a large Tenant. I will watch for the two dashboards in your future releases. Thanks for the posting.
@osbornecc Due to limitations with the TDS endpoint used for DirectQuery when used with Dataverse (see https://docs.microsoft.com/en-us/powerapps/developer/data-platform/dataverse-sql-query#limitations) we are going to have to offer two dashboards going forward - Import mode for larger tenants, DirectQuery for smaller tenants. Because of the limitations, DirectQuery will not work for larger tenants unfortunately.