I have a test gateway that only has 2 perspective sessions licensed. I’m at that limit because sessions have been opened and the browser closed in quick succession. I’m trying to force close them all so I can start a perspective session again, however i’m running into issues with the closeSession function.
I’m running this script to attempt to close all open sessions:
import traceback
try:
sessions = system.perspective.getSessionInfo()
for s in sessions:
id = s['id']
system.perspective.closeSession(sessionId=id)
except:
raise TypeError(traceback.format_exc())
but i’m getting the error below when calling the closeSession function:
java.lang.IllegalArgumentException: Invalid UUID string: 01213203
I’ve checked what fields I can get from getSessionInfo and sample data is below. There is only an Id field with an Id string, but there’s no UUID field that the closeSession function is looking for
{
"userAgent": "<designer>",
"id": "01213203",
"username": "REDACTED",
"authorized": true,
"project": "REDACTED",
"uptime": 1193572,
"clientAddress": "REDACTED (127.0.0.1)",
"lastComm": 2,
"sessionScope": "designer",
"activePages": 2,
"recentBytesSent": 162,
"totalBytesSent": "619900",
"pageIds": ["_Testing/View", "session-props"]
}
What do?