WebSessionContext “UnsupportedOperationException” exception

We have built multiple web app using Xojo 2021R2.1 that are broken when switching to Xojo 2021R3.

This code always fails in 2021R3 with “UnsupportedOperationException”.

dim context as WebSessionContext

context = New WebSessionContext(fMySession)

fMySession is a property of the WebPage that gets assigned during the Opening event to the current session.

It looks like a “fix” made a WebSessionContext in 2021R3 for bug report 60734 may have introduced a bigger bug. Hopefully, I’m wrong and there is a known work-around so I can use 2021R3.

You’ll need to run this code in a main thread event. Have a look at this conversation.