-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AskarWallet.close: Invalid resource handle #182
Comments
I've seen this happen sometimes when we try close the wallet and afterwards still try to process an incoming message / use the wallet, even though it was already closed. |
I think this must be isolated to the JS wrapper, passing in a Store handle after it has been removed. |
Any idea how to fix this @TimoGlastra ? Our CI fails most of the time due to this |
Could you provide maybe a repo with a minimal reproduction? That would really help in debugging the issue. However, as this is happening on Github Actions (which is like really slow), I think it's just a race condition in your tests, and maybe not a problem on macOS as your local machine is a lot faster. Is your agent processing any messages? Could it be that something is not fully awaited before closing the agent? E.g. an issue I've run in quite often with AFJ is that it would keep picking up messages, and so then we'd close the wallet and it would still receive pickup messages, and thus cause issues. The solution was to first stop messages pickup, so the agent was for sure not processing anything anymore, and then closing it. |
Hello @niall-shaw, |
We have a node project that is running test suites via jest.
In two of the suites, we are using AFJ to test mediation cases.
All AFJ agents are using Askar, and mediator agents are using postgres storage.
On MacOS, the tests are consistently working fine without any failures, but on Linux (Ubuntu 20.04) some test suites are failing to start due to Askar closing errors:
and
Note, this is only happening on Linux (via Github Actions), and is not happening ALL of the time. Just most of the time.
Update: We use Node v18.16.0
The text was updated successfully, but these errors were encountered: