Closed antho1404 closed 5 years ago
Need to check if this issue still exist
can't reproduce and the js library is already making sure that this doesn't happen (https://github.com/mesg-foundation/mesg-js/pull/31). Need more investigations but I personally could not reproduce.
This is still reproducible and now the lib js doesn't solve that part anymore but services needs to be started manually so it's not a bit issue for now
core git:(feature/log-errors) ✗ ./dev-cli service start 15b2ac8a7f5a6f73d9bf2fd0a463cf0552fb94a7 & ./dev-cli service start 15b2ac8a7f5a6f73d9bf2fd0a463cf0552fb94a7
[1] 96629
rpc error: code = Unknown desc = Error response from daemon: rpc error: code = Unknown desc = name conflicts with an existing object
This is solved by the new instance resource. Users will have an error if they create the exact same instance and if instances are different, they will be able to run properly on the same engine
When we start a service multiple times in the same time interval we have an error from the api
Here is the step to reproduce.
This will generate one of these two errors:
This behavior is something that the mesg-js library and any script might be doing.
I see different solutions for that:
Manage this concurrency in the API: Best solution but actually quite hard to implement.
Manage this uniqueness in the libraries: Easy but we will still have the problem with custom scripts and stuff like that.
Do not manage the error but display: It might be enough to catch these errors and display a nice error like service already starting.
Of course a mix of all these would be perfect