Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Error Message: Could not find a PackageSession for the given sessionID

Hello! 

 

I recently changed my credentials at work and ever since I have been receiving the following error. 

Error Message:

Could not find a PackageSession for the given sessionID.

 

I found very similar issues within the Community but it seems the only way to fix this issue (at least posted online) is to uninstall your current version of PBI and install an older version. This option is not possible for me because IT uses one version of the program for all desktops. (At least that's what they told me) And I am hoping someone else might have had this issue and fixed it another way than uninstalling? 

 
 

Error message in replies below

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hey Anonymous, 

    I FINALLY was able to convince the IT folks to install an updated version for my virtual machine and it fixed the issue! I was actually having issues even opening the report all together so this could have been a solution but it wouldn't allow me to click buttons. 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable
    Feedback Type:
    Frown (Error)
     
    Error Message:
    Could not find a PackageSession for the given sessionID.
     
    Stack Trace:
    Microsoft.Mashup.Host.Document.Storage.InvalidPackageReferenceException
       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.Storage.PackageStorageCache.Take(PackageReference packageReference)
       at Microsoft.Mashup.Host.Document.Analysis.AnalysisManager.StartPackageAnalysis(AnalysisSession session, PackageReference packageReference, Int32 editVersion, Boolean refreshData, HashSet`1 formulaFilter, String[] defaultOptionalModules, Action callback)
       at Microsoft.Mashup.Host.Document.Analysis.AnalysisManager.<>c__DisplayClass8_0.<StartSessionAnalysisCore>b__0(Object state)
       at Microsoft.Mashup.Host.Document.GlobalizedThreadPool.<>c__DisplayClass2_1.<WrapCallback>b__1()
       at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
     
    Stack Trace Message:
    Could not find a PackageSession for the given sessionID.
     
    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.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 System.Windows.Forms.Application.RunDialog(Form form)
       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.WebDialogs.WebDialog.<>c__DisplayClass57_0.<ShowModal>b__0()
       at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
       at Microsoft.Mashup.Client.UI.Shared.WebDialogs.WebDialog.ShowModal(IWindowHandle owner)
       at Microsoft.Mashup.Client.UI.Shared.Ux.WindowService.ShowDialog(IDialog dialog)
       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.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.LiveConnectHelpers.AnalysisServices.ASLiveConnectionProperties.ASLiveConnectionPropertiesValidatorInternal.<Validate>d__4.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.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.LiveConnectHelpers.LiveConnectionPropertiesValidator.<>c__DisplayClass8_0.<TryGetValidLiveConnectionProperties>b__0()
       at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.<>c__DisplayClass16_0.<AllowModalDialogs>b__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.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.LiveConnectHelpers.LiveConnectionPropertiesValidator.TryGetValidLiveConnectionProperties(IPowerBIWindowService windowService, ILiveConnectionProperties connectionProperties, Report report, ILiveConnectionCompleter liveConnectionPropertiesCompleter, ILiveConnectionProperties& validLiveConnectionProperties, Boolean& resultIsSameConnection, ValidationStatus& validationStatus)
       at Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.AreAnalysisServicesConnectionPropertiesValid(IPowerBIWindowService windowService, Report report, ILiveConnectionProperties connectionProperties, AnalysisServicesConnectionMode connectionMode, ILiveConnectionCompleter completer, ILiveConnectionProperties& validConnectionProperties)
       at Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.ValidateAndCreateAnalysisServicesConnection(ILiveConnectionProperties connectionProperties, Boolean addToFormulaHistory)
       at Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.TryImportAnalysisServiceLiveConnection(JsonUpdate builderResults, Query query)
       at Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.OnQuerySettingsResolved(JsonUpdate builderResults, Query query, String sourceId, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor)
       at Microsoft.Mashup.Client.UI.Shared.DataImporter.OnResolveQuerySettingsSuccess(JsonUpdate builderResults, Formula updatedFormula, Query query, SourceFormula addedFormula, Boolean isNewQuery, Boolean isFromEditor)
       at Microsoft.Mashup.Client.UI.Shared.DataImporter.<>c__DisplayClass63_0.<ResolveQuerySettings>b__0(JsonUpdate builderResults, Formula updatedFormula)
       at Microsoft.Mashup.Client.UI.Shared.DataImporter.ShowBuilderDialog(PackageReference packageReference, FormulaPath formulaPath, FormulaPartInfo formulaPartInfo, Query query, Action`2 successCallback, Action failureCallback, Boolean isNewQuery, Boolean isFromEditor)
       at Microsoft.Mashup.Client.UI.Shared.DataImporter.ResolveQuerySettings(Query query, Action`2 successCallback, Action failureCallback, ResolutionSetting resolutionSetting, Boolean isNewQuery, Boolean isFromEditor)
       at Microsoft.Mashup.Client.UI.Shared.DataImporter.ResolveQuerySettings(Query query, SourceFormula addedFormula, Boolean isNewQuery, Boolean isFromEditor)
       at Microsoft.Mashup.Client.UI.Shared.DataImporter.TryAddSource(String sourceID, Nullable`1 targetQueryGroupId, Query& newQuery)
       at Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.TryAddSource(String sourceID, Nullable`1 targetQueryGroupId, Query& newQuery)
       at Microsoft.Mashup.Client.UI.Shared.ConnectHelper.Connect(IWindowHandle owner, IDataSourceTemplateProvider dataSourceTemplateProvider, IUIHost uiHost, ITelemetryService telemetryService, DataImporter dataImporter, CommandUIControlBase commandUIControl, String sourceId, Nullable`1 targetQueryGroupId)
       at Microsoft.PowerBI.Client.Windows.Commands.ApplicationCommands.DataImportCommands.<Connect>d__45.MoveNext()
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
       at Microsoft.PowerBI.Client.Windows.Commands.ApplicationCommands.DataImportCommands.Connect(IPowerBIWindowService windowService, IExceptionHandler exceptionHandler, ConnectParameters parameters)
       at Microsoft.PowerBI.Client.Windows.Commands.CommandFactory.<>c__DisplayClass15_1`1.<FromAsyncHandlers>b__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, Func`1 asyncFunc)
       at Microsoft.PowerBI.Client.Windows.Commands.CommandFactory.ExecuteWithExceptionAsyncHandler(Func`1 executeMethod, IExceptionHandler exceptionHandler, String telemetryCommandName)
       at Microsoft.PowerBI.Client.Windows.Commands.CommandFactory.<>c__DisplayClass15_0`1.<FromAsyncHandlers>b__0(UICommandParameter`1 p)
       at Microsoft.Practices.Prism.Commands.DelegateCommand`1.<>c__DisplayClass7_0.<.ctor>b__0(Object o)
       at Microsoft.Practices.Prism.Commands.DelegateCommandBase.Execute(Object parameter)
       at Microsoft.Practices.Prism.Commands.DelegateCommand`1.Execute(T parameter)
       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.PowerBIDataSourceTemplateProvider.ConnectInternal(String formulaId, Nullable`1 targetQueryGroupId)
       at Microsoft.Mashup.Host.Document.DataSourceTemplateProvider.Connect(String formulaId, Nullable`1 targetQueryGroupId)
       at Microsoft.Mashup.Client.UI.Shared.Ux.FloatingDialog.SimpleDialog.DataSourceGalleryDialog.<>c__DisplayClass13_0.<ConnectToDataSource>b__0()
       at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
       at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass5_0.<Post>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 System.Windows.Forms.Application.RunDialog(Form form)
       at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
       at Microsoft.PowerBI.Client.Program.<>c.<Main>b__4_13()
       at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
       at Microsoft.PowerBI.Client.Program.<>c__DisplayClass4_1.<Main>b__2()
       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.Main(String[] args)

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Anonymous ,

     

    Is your problem solved now, you can try to update its Power BI Desktop to the latest version.

    Or the previous credentials still exist, re-edit the data source credentials.

    https://community.powerbi.com/t5/Desktop/Data-source-credentials/m-p/535844

    https://community.powerbi.com/t5/Desktop/Change-login-credentials/m-p/225075

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hey Anonymous, 

      I FINALLY was able to convince the IT folks to install an updated version for my virtual machine and it fixed the issue! I was actually having issues even opening the report all together so this could have been a solution but it wouldn't allow me to click buttons.