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
iandpike
Employee
Employee

Unexpected Error - Could not find a PackageSession for the given SessionID

Anyone had the error with Power Bi Desktop when importing an Excel spreadsheet?

 

Unexpected Error - Could not find a PackageSession for the given SessionID

 

Previously working Power Bi Dashboard, adding Excel data. Desktop says its switching from DirectQuery mode to import data for Excel sheet and other source. Then crashes. 

 

Tried on two different PCs with some affect.

 

Thanks Ian

4 REPLIES 4
Anonymous
Not applicable

After changing my domain password - I'm getting this same error on all my PowerBI connnections to any AzureAS server.  I have the October 2021 release and even a re-install did not fix the problem.  Is thsi release of PowerBI Desktop bad?

Did you ever find a solution for this? I am running into the same exact issue. I am attempting to get IT to uninstall and reinstall an older version of the Program but want to make sure this is how you got it fixed. 

eugene1
Regular Visitor

We suddenly started to have the exact same issue... Error details it leaves are below.

 

 

Error Message:

Could not find a PackageSession for the given sessionID.

Stack Trace:

Microsoft.Mashup.Host.Document.Storage.InvalidPackageReferenceException: Could not find a PackageSession for the given sessionID.
   at Microsoft.Mashup.Host.Document.Storage.Local.LocalPackageSessionStorage.GetLocalPackageSessionIndex(LocalPackageSessions localPackageSessions, Int32 sessionID)
   at Microsoft.Mashup.Host.Document.Storage.Local.LocalPackageSessionStorage.GetLocalPackageSession(LocalPackageSessions localPackageSessions, Int32 sessionID)
   at Microsoft.Mashup.Host.Document.Storage.Local.LocalPackageSessionStorage.GetSessionStorage(PackagePath packagePath, PackageSession packageSession)
   at Microsoft.Mashup.Host.Document.Storage.TracingPackageSessionStorage.GetSessionStorage(PackagePath packagePath, PackageSession packageSession)
   at Microsoft.Mashup.Host.Document.Analysis.AnalysisManager.StartPackageAnalysis(AnalysisSession session, PackageReference packageReference, Int32 editVersion, Boolean refreshData, HashSet`1 formulaFilter, Action callback)
   at Microsoft.Mashup.Host.Document.Analysis.AnalysisManager.<>c__DisplayClass7.<StartSessionAnalysisCore>b__2(Object state)
   at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)

Invocation Stack Trace:

   at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
   at Microsoft.Mashup.Client.ClientShared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace)
   at Microsoft.Mashup.Client.ClientShared.FeedbackErrorInfo..ctor(String message, Nullable`1 errorCode, String requestId, Exception exception)
   at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.<>c__DisplayClass1.<HandleException>b__0()
   at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass3.<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.ClientShared.WindowManager.ShowDialog[T](T form, IWin32Window owner)
   at Microsoft.Mashup.Client.ClientShared.Ux.FloatingDialog.FloatingDialog.ShowDialogWithTimeout(IWin32Window owner, Nullable`1 showTimeout)
   at Microsoft.PowerBI.Client.Windows.FloatingDialog.KoLoadToReportDialog.StartEvaluationAndShowDialog(IEnumerable`1 queriesToLoad, Nullable`1 showTimeout, Boolean requireFullDataRefresh)
   at Microsoft.PowerBI.Client.Windows.FloatingDialog.KoLoadToReportDialog.TryShowDialogForQueries(Report report, IWin32Window ownerWindow, WindowsHost windowsHost, IEnumerable`1 queriesToLoad, LocalizedString title, Boolean requireFullDataRefresh)
   at Microsoft.PowerBI.Client.Windows.MainWindow.RefreshAllQueries()
   at Microsoft.PowerBI.Client.Windows.Ribbon.EditorRibbonCommandActionHandler.HandleCommand(UInt32 commandId)
   at Microsoft.Mashup.Client.Windows.Ribbon.RibbonCommandHandler.Execute(UInt32 commandId, CommandExecutionVerb verb, PropertyKeyRef keyRef, PropVariantRef currentValue, IUISimplePropertySet commandExecutionProperties)
   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.ClientShared.WindowManager.ShowDialog[T](T form, IWin32Window owner)
   at Microsoft.PowerBI.Client.Program.<>c__DisplayClassc.<Main>b__0()
   at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
   at Microsoft.PowerBI.Client.Program.Main(String[] args)
iandpike
Employee
Employee

Further info, imported Excel into another blank dasboard okay 

 

Also another copy of same "Issue" dashboard import works fine

 

Wondering if there is a corruption in the dashboard which is causing issue?

 

Ian

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.