Error with SPS and login.

Discussions related to installation and setup of SoftPro products.
Post Reply
stanleyglass
Posts: 8
Joined: Thu Feb 02, 2023 10:43 am

Error with SPS and login.

Post by stanleyglass »

We just went through an upgrade, with Softpro staff, to version 4.3.60210.149. Now when we try to use SPS to list events or subscribe to them we get the error:

Code: Select all

You have to have a profile selected to login.
   at SoftPro.Select.Client.SelectServer.SetCurrentUserState() in D:\a\1\s\Code\SPNet\Select\SelectClient\SelectServer.cs:line 902
   at SoftPro.Select.Client.SelectServer._server_Authenticated(Object sender, EventArgs args) in D:\a\1\s\Code\SPNet\Select\SelectClient\SelectServer.cs:line 669
   at SoftPro.ClientModel.Server.EnsureAuthenticated() in D:\a\1\s\Code\SPNet\Models\ClientModel\Server.cs:line 309
   at SoftPro.Select.CommandLine.Commands.ServerCommand.get_SelectServer() in D:\a\1\s\Code\SPNet\Select\SelectCmdLine\Commands\ServerCommand.cs:line 64
   at SoftPro.Select.CommandLine.Commands.EventsCommand.Run() in D:\a\1\s\Code\SPNet\Select\SelectCmdLine\Commands\EventsCommand.cs:line 76
   at SoftPro.Select.CommandLine.Program.RunCommand(String[] args) in D:\a\1\s\Code\SPNet\Select\SelectCmdLine\Program.cs:line 130
So I try to log in as the account we are using by holding Shift while launching Softpro. It asks me to log in, but then crashes with no error to user. In the Event Viewer I did find some errors:

Code: Select all

System.InvalidOperationException: Sequence contains no elements
Stack Trace: 
   at SoftPro.ClientModel.Proxies.ClientProxy`1.OnHandleFaultException(FaultException exception) in D:\a\1\s\Code\SPNet\Models\ClientModel\Proxies\ClientProxy.cs:line 138
   at SoftPro.Select.Client.Security.SecurityManagerServiceClient.GetUser(Guid id) in D:\a\1\s\Code\SPNet\Select\SelectClient\Service References\SelectServer\Reference.cs:line 904
   at SoftPro.Select.Client.Security.SecurityManager.SoftPro.Select.Client.Security.ISecurityManager.GetUser(Guid id) in D:\a\1\s\Code\SPNet\Select\SelectClient\Security\SecurityManager.cs:line 284
   at SoftPro.Select.CommercialImport.Shell.CommercialImportShellPackage.IsUserAssociatedToGroup(String groupName)
   at SoftPro.Select.CommercialImport.Shell.CommercialImportShellPackage.ShellOnLoad(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at SoftPro.Select.Managers.ShellManager.Initialize() in D:\a\1\s\Code\SPNet\Shell\ShellApp\Managers\ShellManager.cs:line 114
   at SoftPro.Select.Runtime.OnRun() in D:\a\1\s\Code\SPNet\Shell\ShellApp\Runtime.cs:line 305
   at SoftPro.Select.Runtime.Start() in D:\a\1\s\Code\SPNet\Shell\ShellApp\Runtime.cs:line 223
   at SoftPro.Select.Automation.EnvICE.Start() in D:\a\1\s\Code\SPNet\Shell\ShellApp\Automation\EnvICE.cs:line 140
XML Log: 
<ILExceptionData>
  <Point module="SoftPro.ClientModel.dll" classFull="SoftPro.ClientModel.Proxies.ClientProxy`1" methodName="OnHandleFaultException" methodSignature="Void OnHandleFaultException(System.ServiceModel.FaultException)" methodToken="0x600060d" ILOffset="36" />
  <Point module="SoftPro.Select.Client.dll" classFull="SoftPro.Select.Client.Security.SecurityManagerServiceClient" methodName="GetUser" methodSignature="SoftPro.Select.Client.Security.SecurityUser GetUser(System.Guid)" methodToken="0x6000bb4" ILOffset="24" />
  <Point module="SoftPro.Select.Client.dll" classFull="SoftPro.Select.Client.Security.SecurityManager" methodName="SoftPro.Select.Client.Security.ISecurityManager.GetUser" methodSignature="SoftPro.Select.Client.Security.ISecurityUser SoftPro.Select.Client.Security.ISecurityManager.GetUser(System.Guid)" methodToken="0x6000cec" ILOffset="7" />
  <Point module="SoftPro.Select.CommercialImport.Shell.dll" classFull="SoftPro.Select.CommercialImport.Shell.CommercialImportShellPackage" methodName="IsUserAssociatedToGroup" methodSignature="Boolean IsUserAssociatedToGroup(System.String)" methodToken="0x6000005" ILOffset="13" />
  <Point module="SoftPro.Select.CommercialImport.Shell.dll" classFull="SoftPro.Select.CommercialImport.Shell.CommercialImportShellPackage" methodName="ShellOnLoad" methodSignature="Void ShellOnLoad(System.Object, System.EventArgs)" methodToken="0x6000002" ILOffset="0" />
  <Point module="CommonLanguageRuntimeLibrary" classFull="System.EventHandler" methodName="Invoke" methodSignature="Void Invoke(System.Object, System.EventArgs)" methodToken="0x6000e77" ILOffset="-1" />
  <Point module="Select.exe" classFull="SoftPro.Select.Managers.ShellManager" methodName="Initialize" methodSignature="Void Initialize()" methodToken="0x60004c0" ILOffset="33" />
  <Point module="Select.exe" classFull="SoftPro.Select.Runtime" methodName="OnRun" methodSignature="Void OnRun()" methodToken="0x60001ba" ILOffset="12" />
  <Point module="Select.exe" classFull="SoftPro.Select.Runtime" methodName="Start" methodSignature="Void Start()" methodToken="0x60001b4" ILOffset="75" />
  <Point module="Select.exe" classFull="SoftPro.Select.Automation.EnvICE" methodName="Start" methodSignature="Void Start()" methodToken="0x6000a45" ILOffset="285" />
</ILExceptionData>


Call Stack: 
   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at System.Diagnostics.TraceEventCache.get_Callstack()
   at SoftPro.Select.LogTraceListener.OnLog(TraceEventCache eventCache, String message, TraceEventType eventType) in D:\a\1\s\Code\SPNet\Shell\ShellApp\LogTraceListener.cs:line 150
   at SoftPro.Select.LogTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message) in D:\a\1\s\Code\SPNet\Shell\ShellApp\LogTraceListener.cs:line 285
   at System.Diagnostics.TraceInternal.TraceEvent(TraceEventType eventType, Int32 id, String format, Object[] args)
   at SoftPro.Select.Automation.EnvICE.Start() in D:\a\1\s\Code\SPNet\Shell\ShellApp\Automation\EnvICE.cs:line 146
   at System.Runtime.Remoting.Messaging.Message.Dispatch(Object target)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
   at System.Runtime.Remoting.Messaging.ServerObjectTerminatorSink.SyncProcessMessage(IMessage reqMsg)
   at SoftPro.Select.Shell.SynchronizationContextAspect.SyncProcessMessage(IMessage msg) in D:\a\1\s\Code\SPNet\Shell\ShellCore\SynchronizationContext.cs:line 169
   at System.Runtime.Remoting.Lifetime.LeaseSink.SyncProcessMessage(IMessage msg)
   at System.Runtime.Remoting.Messaging.ServerContextTerminatorSink.SyncProcessMessage(IMessage reqMsg)
   at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessageCallback(Object[] args)
   at System.Threading.Thread.CompleteCrossContextCallback(InternalCrossContextDelegate ftnToCall, Object[] args)
   at System.Threading.Thread.InternalCrossContextCallback(Context ctx, IntPtr ctxID, Int32 appDomainID, InternalCrossContextDelegate ftnToCall, Object[] args)
   at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessage(IMessage reqMsg)
   at System.Runtime.Remoting.Proxies.RemotingProxy.CallProcessMessage(IMessageSink ms, IMessage reqMsg, ArrayWithSize proxySinks, Thread currentThread, Context currentContext, Boolean bSkippingContextChain)
   at System.Runtime.Remoting.Proxies.RemotingProxy.InternalInvoke(IMethodCallMessage reqMcmMsg, Boolean useDispatchMessage, Int32 callType)
   at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(IMessage reqMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at SoftPro.Select.Automation.EnvICE.Start()
   at SoftPro.Select.Automation.EnvICE.Run(String rootSuffix, Boolean noSplash, Boolean setupMode, Boolean log, Boolean embedding, Boolean allowMultipleInstances, Boolean detectLeaks, Dictionary`2 args, String freeArg) in D:\a\1\s\Code\SPNet\Shell\ShellApp\Automation\EnvICE.cs:line 216
   at SoftPro.Select.Program.Main(String[] args) in D:\a\1\s\Code\SPNet\Shell\ShellApp\Program.cs:line 101
and

Code: Select all

Application: Select.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException

Server stack trace: 
   at SoftPro.ClientModel.Proxies.ClientProxy`1.OnHandleFaultException(FaultException exception)
   at SoftPro.Select.Client.Security.SecurityManagerServiceClient.GetUser(Guid id)
   at SoftPro.Select.Client.Security.SecurityManager.SoftPro.Select.Client.Security.ISecurityManager.GetUser(Guid id)
   at SoftPro.Select.CommercialImport.Shell.CommercialImportShellPackage.IsUserAssociatedToGroup(String groupName)
   at SoftPro.Select.CommercialImport.Shell.CommercialImportShellPackage.ShellOnLoad(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at SoftPro.Select.Managers.ShellManager.Initialize()
   at SoftPro.Select.Runtime.OnRun()
   at SoftPro.Select.Runtime.Start()
   at SoftPro.Select.Automation.EnvICE.Start()
   at System.Runtime.Remoting.Messaging.Message.Dispatch(Object target)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessage)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(System.Runtime.Remoting.Proxies.MessageData ByRef, Int32)
   at SoftPro.Select.Automation.EnvICE.Start()
   at SoftPro.Select.Automation.EnvICE.Run(System.String, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, System.Collections.Generic.Dictionary`2<System.Guid,System.Collections.Generic.Dictionary`2<System.String,System.String>>, System.String)
   at SoftPro.Select.Program.Main(System.String[])

This process has worked in the past and we never had any issues with profiles until the upgrade. Please let me know what we can do to get past this. The intent of using SPS is so that we can capture changes on tasks and order and update our other system. Without this, we are unable to let users know when they have work in their queue per our business units requirements. Please note that there is no custom code from us involved in this. During the upgrade Softpro staff has us copy our select database over and ran some scripts on it as well as install some software on the server and on the clients that would log into this particular instance/server of Softpro.
BobRichards
Posts: 1377
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Error with SPS and login.

Post by BobRichards »

Make sure you can log into the user account manually before proceeding.

In the first error, the user you are using does not have any profile set in SPAdmin or has more than one. All users must have one or more profiles assigned to them. If there is more than one profile, they must have a default profile set or they will be presented with a popup that asks which profile to join. Your problem is the user has no default profile (or any profile) so Select doesn't know which profile to log into.

If you only want to set a single default profile from several profiles assigned to the user, log into the account manually and select a default profile. If you want to programatically set the login profile, subscribe to the SelectServer.ChooseProfile event and select a profile from the ones that are available to that user immediately after the user has a SelectServer instance but before SelectServer.TryAuthenticate().
Bob Richards, Senior Software Developer, SoftPro
Post Reply