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.

Object reference not set to an instance of an obkect

I am getting this error when trying to connect to an Excel file from a SharePoint:

gvega5_0-1634771922250.png

 

 

 

Feedback Type:
Frown (Error)

Timestamp:
2021-10-20T23:16:40.8317375Z

Local Time:
2021-10-20T18:16:40.8317375-05:00

Session ID:
e1e29dd6-8e8c-407a-9787-81d2fb83bfd7

Release:
October 2021

Product Version:
2.98.683.0 (21.10) (x64)

Stack Trace:
System.NullReferenceException
at Microsoft.Mashup.Client.UI.Shared.Controllers.JsonOAuthCredentialData..ctor(TokenCredential credential)
at Microsoft.Mashup.Client.UI.Shared.Ux.FloatingDialog.ChallengeFloatingDialogBase.JsOAuthDialogResult.ToJson(OAuthDialogResult oAuthDialogResult)
at Microsoft.Mashup.Client.UI.Shared.Ux.FloatingDialog.ChallengeFloatingDialogBase.InvokeChallengeOAuthDialogCallback(IJsHostedScript jsHostedScript, OAuthDialogResult oAuthDialogResult)
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)

PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.98.683.0","ModuleName":"Microsoft.Mashup.Client.UI.dll","Component":"Microsoft.Mashup.Client.UI.Shared.Controllers.JsonOAuthCredentialData","Error":"System.NullReferenceException","MethodDef":".ctor","ErrorOffset":"0"}

OS Version:
Microsoft Windows NT 10.0.19043.0 (x64 en-US)

CLR Version:
4.7 or later [Release Number = 528372]

Peak Virtual Memory:
122 GB

Private Memory:
2.8 GB

Peak Working Set:
3.21 GB

IE Version:
11.789.19041.0

User ID:
719ba1c1-969d-4d21-a1e8-4f92d7c6ca84

Workbook Package Info:
1* - en-US, Query Groups: 0, fastCombine: Disabled, runBackgroundAnalysis: True.

Telemetry Enabled:
True

Model Default Mode:
Import

Model Version:
PowerBI_V3

Enabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_qnaLiveConnect
PBI_azureMapVisual
PBI_dataPointLassoSelect
PBI_dynamicParameters
PBI_enhancedTooltips
PBI_rdlNativeVisual

Disabled Preview Features:
PBI_SpanishLinguisticsEnabled
PBI_compositeModelsOverAS

Disabled DirectQuery Options:
TreatHanaAsRelationalSource

Cloud:
GlobalCloud

DPI Scale:
100%

Supported Services:
Power BI

Status: Investigating
Comments
v-robertq-msft
Community Support

Hi,

Please start Power BI desktop as administrator, then click on File -> Open to see if the same issue occurs. Also please ensure the pbix file is saved in local drive rather than network drive. 

You can also refer to this solution:

https://community.powerbi.com/t5/Desktop/PowerBI-desktop-64Bit-oracle-connection-error-Object-refere...

 

Best Regards,

Community Support Team _Robert Qin

v-robertq-msft
Community Support
Status changed to: Investigating
 
Nikonnet
Regular Visitor

Hi, I hit into same error as well. The same pbix file was working perfectly fine previously for me and it still works fine for my other colleague currently. I can't refresh the pbix file whenever there is connection to Sharepoint Online. Appreciate any help.

 

Feedback Type:
Frown (Error)

Error Message:
Object reference not set to an instance of an object.

Stack Trace:
System.NullReferenceException
at Microsoft.Mashup.Client.UI.Shared.Controllers.JsonOAuthCredentialData..ctor(TokenCredential credential)
at Microsoft.Mashup.Client.UI.Shared.Ux.FloatingDialog.ChallengeFloatingDialogBase.JsOAuthDialogResult.ToJson(OAuthDialogResult oAuthDialogResult)
at Microsoft.Mashup.Client.UI.Shared.Ux.FloatingDialog.ChallengeFloatingDialogBase.InvokeChallengeOAuthDialogCallback(IJsHostedScript jsHostedScript, OAuthDialogResult oAuthDialogResult)
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)

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.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
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.Windows.DialogWindowBase.ShowModal(IWindowHandle windowHandle)
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.Mashup.Client.UI.Shared.Ux.CredentialsChallengeResolver.ShowResolveDialog(IWindowHandle owner, IUIHost uiHost)
at Microsoft.Mashup.Client.UI.Shared.QueriesExtensions.TryResolveResourceChallenge(Queries queries, FormulaPath formulaPath, ResourceChallenge resourceChallenge, IWindowHandle owner, IUIHost uiHost, Boolean saveChanges, ChallengeParameters challengeParameters)
at Microsoft.Mashup.Client.UI.Shared.QueryExtensions.TryResolveResourceChallenge(Query query, ResourceChallenge resourceChallenge, IWindowHandle owner, IUIHost uiHost, Boolean saveChanges, ChallengeParameters challengeParameters)
at Microsoft.PowerBI.Client.Windows.AnalysisServices.LoadToModelQueryEvaluatorFactory.<>c__DisplayClass9_0.<ResolveResourceChallenge>b__0(Query query, IWindowHandle windowHandle)
at Microsoft.PowerBI.Client.Windows.AnalysisServices.LoadToModelQueryEvaluatorFactory.<>c__DisplayClass10_1.<ResolveChallenge>b__2()
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.PowerBI.Client.Windows.Services.UIBlockingService.AllowModalDialogs(Action action)
at Microsoft.PowerBI.Client.Windows.AnalysisServices.LoadToModelQueryEvaluatorFactory.<>c__DisplayClass10_0.<ResolveChallenge>b__1(IWindowHandle windowHandle)
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass3_0`1.<SendAndMarshalExceptions>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, Func`1 showModalFunction)
at Microsoft.PowerBI.Client.Windows.FloatingDialog.KoLoadToReportDialog.TryShowDialog(Report report, IExceptionHandler exceptionHandler, IPowerBIWindowService windowService, IQueryServices queryServices, IDesktopModelingHost modelingHost, LocalizedString title, LoadToModelContext loadToModelContext)
at Microsoft.PowerBI.Client.Windows.FloatingDialog.KoLoadToReportDialog.<>c__DisplayClass16_0.<TryShowDialogForQueries>b__0()
at Microsoft.PowerBI.Client.Windows.Report.<>c__DisplayClass64_0`1.<SynchronizeLooselyWithQueries>b__0()
at Microsoft.PowerBI.Client.Windows.Report.<SynchronizeLooselyWithQueriesAsync>d__65`1.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.PowerBI.Client.Windows.Report.SynchronizeLooselyWithQueriesAsync[T](Func`1 getTask)
at Microsoft.PowerBI.Client.Windows.Report.SynchronizeLooselyWithQueries[T](Func`1 action)
at Microsoft.PowerBI.Client.Windows.Commands.ApplicationCommands.DataImportCommands.RefreshAllQueries(IPowerBIWindowService windowService, IExceptionHandler exceptionHandler, RefreshAllQueriesParameters 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.CompositeCommand`1.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.CommandStoreHostService.<>c__DisplayClass13_0.<Execute>b__0()
at Microsoft.PowerBI.Client.Windows.HostServiceDispatcher.<>c__DisplayClass7_0.<ExecuteOnUIThreadAsync>b__0(Object t)
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.98.882.0","ModuleName":"Microsoft.Mashup.Client.UI.dll","Component":"Microsoft.Mashup.Client.UI.Shared.Controllers.JsonOAuthCredentialData","Error":"System.NullReferenceException","MethodDef":".ctor","ErrorOffset":"0"}

JulianNoarmenn
New Member

This error is very generic and can occur for a variety of reasons. See if any of these items (in Connect to a Sharepoint File session) solve your problem: https://powerbipoint.com/2024/01/02/power-bi-fix-the-error-object-reference-not-set-to-an-instance-o...