I have a script that stores two contexts. For some reason the storing process works during the first iteration of a test run but fails for all subsequent iterations through the transaction with a warning: "WebEngine: 9 - Invalid handle., context not valid anymore!".
Does anyone know what's causing this and how it can be fixed? It's almost like once the context gets deleted after the first iteration it's not reset somehow. It does pass with multiple runs under the Try Script system however.
RE: storing contexts
This is the type of scenario that would occur when you manually split a script into multiple transactions, like having a Login transaction, a main transaction and a logout transaction. Context is created in Login, passed to Main and then passed to Logout and so is maintained. However if you ran login once and generated the context, but then tried to run main 10 times in a row it would try and reuse that first context all the time which the server would not accept. In every run, you must have the functions which generate and maintain the context throughout.
If you are not able to find a solution for your scenario then I would recommend logging a support incident.