10.2.600 Ice.Common.InvalidSessionException

I’m seeing a crap ton of exceptions being thrown in my event viewer related to Invalid Sessions. In previous versions, I don’t see this error being logged.

It looks like the event viewer is capturing both an informational message when a session has expired and an exception message

Exception:

Info Msg:

While it may be an exception in the truest sense, is there a setting to suppress this particular message? Sessions expire all the time and in my mind are not worthy of clogging up the event viewer logs with errors…

is your AppServer.config is something turned on tracing wise that may affect it? (Shot in the dark)

Nothing turned on, I kind of want to but not sure which ones and how to turn it on, does it need a recycle?

Doesn’t need a recycle and you can turn any of them depending on what you want to do,
Just flipping disabled = false will turn them on right away.
But you only need this if you are trying to evaluate some bugs or something not in general something I recommend to leave on.

<rant>
Also Epicor for the love of god stop using inverted booleans for your "positives" its so nutty
Disabled = false shouldn't be the way to turn something on....

They do this too on conditions on BPMS and several other places its infuriating
"Not less than".... 

GAH! 😡😡😡😡
</rant>

image

2 Likes

Ok I’ll give that a shot and see what we get :roll_eyes:

Did find some errors hiding in some custom code XML from this trace log , yay

1 Like

So those subflags, should those be enabled to whittle it down to just that flag or does it do all tracing plus that flag?

Other flags should be un when debugging specific areas
BPM
Or RESt
Or Sessions they all have their own additional flag which provide more details

1 Like

I can’t not be frustrated by that!

However, the “is not less than” and “is not more than” is the way to get to “greater than or equal” and “less than or equal” so I won’t give them a failed=true on that one example. But otherwise, I don’t disagree with you. :thinking:

2 Likes

LoL @Mark_Wonsil the fact that I had to read your comment 3 times to understand it should be enough to prove that their stupid logical operators are dumb hahaha!

1 Like

Double plus ungood.

1 Like

Reminds me of the Pro Office Calculator
https://proofficecalculator.com/

For those that are geeky and into puzzles prepare to lose… days of your life… it’s a completely normal calculator… or is it?

I’m currently stuck in this level and have been for months… I don’t have the mental fortitude to figure out all the double negatives

How far can you get?

Ok so as far as I can tell, this exception is being thrown when an idle session is re-started by the user.
The Old session (cached) is now invalid and when they attempt to use it, it throws a server side error, gets a new session, and carries on.

The real question for me is again, is there something I can do to prevent this from being a logging event-worthy exception? I don’t recall this in older versions, so perhaps someone can take a look at theirs to see similar events?

<Session msg="Server Side Error" machine="APP01" pid="3528" tid="269"/>
<Op Utc="2020-08-21T18:45:54.9284933Z" act="Ice:Lib:TokenService/TokenServiceSvcContract/GetAccessToken" correlationId="0365dc2c-3d1f-4822-905e-de820479264d" dur="3.6984" cli="{ip}" usr="{user}" machine="{server}" pid="3528" tid="269">
  <Session msg="Could not find an existing Session in Cache. ID: 633059a9-06b9-41f9-804b-99e17e6a5d78" />
  <Exception><![CDATA[Ice.Common.InvalidSessionException: Session with SessionID = 633059a9-06b9-41f9-804b-99e17e6a5d78 is invalid. Session has either timed out or has been deleted. You must login again to continue.
   at Ice.Hosting.SessionCache.Get[T](Guid sessionId) in C:\_Releases\ICE\UD10.2.600.5FW\Source\Framework\Epicor.Ice\Hosting\SessionCache.cs:line 28
   at Erp.Extensibility.SessionProvider.ErpSessionBuilder.GetSession(Guid sessionID) in C:\_Releases\ERP\RL10.2.600.0\Source\Server\Internal\Extensibility\SessionProvider\ErpSessionBuilder.cs:line 31
   at Epicor.Hosting.CallContext.Create(Operation op) in C:\_Releases\ICE\UD10.2.600.5FW\Source\Framework\Epicor.Ice\Hosting\CallContext.cs:line 179
   at Ice.Security.AuthorizationManager.CheckAccess(OperationContext operationContext, Message& message) in C:\_Releases\ICE\UD10.2.600.5FW\Source\Framework\Epicor.Ice\Security\AuthorizationManager.cs:line 157
   at System.ServiceModel.Dispatcher.AuthorizationBehavior.Authorize(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)]]></Exception>
</Op>

Could this be something based on code for a cloud deployment or is anyone else see this? I have seen some things that relate to different enviroments/ deployments

I’m definitely thinking there is some flag somewhere for this that I just don’t know where it’s set, would love to get some input from @Olga who knows everything there is to know about flags :wink:

I definitely feel like I’m taking crazy pills too because I see in the event viewer this has been happening forever, it’s not just a 10.2.600 thing. Would love to see if other people are logging these events

image

Oh ok not a upgrade thing?

Probably not

Sometimes epicor = crazypills

1 Like

I think there is something in the air here that’s preventing me from working well with Epicor this week

There is special flag called Allow multiple sessions flag that allows Epicor user create as many sessions as needed, when switching between companies. But every session means new license consumed.
So to avoid overconsumption this flag in user setting is sometimes switched off.

In this case, when user changes company, existing session is removed from server cache and only new session is valid now. Only this new session should be sent to the server in the header, and old session should not be sent to the server anymore.
Looks like there is a bug in the client code, that still sends that old session with some client calls, and that results in the exception you see. If you did not see that before, probably it is some new functionality, like kinetic home page stuff? Can you reproduce steps when this happens? It usually involves company/site switching.

You can trace when sessions are created or removed with ice/fw/session trace flag.