iden3 / iden3-mobile

iden3 light client library implementation in Go for native wallets (with gomobile-friendly wrappers)
GNU General Public License v3.0
2 stars 0 forks source link

When loading an identity without stopping another instance of the identity is giving a not well described error #109

Open rauljareno opened 4 years ago

rauljareno commented 4 years ago

Right now, when creating and identity and trying to load that identity afterwards without calling the method stop() in the identity, is returning the following error: "Error opening leveldb storage: resource temporarily unavailable". I suggest two options:

1) stop method is called internally in the identity load method and then loading the identity and not returning the error if this is the case 2) returning an error giving a better description of the error and how to solve it

Iden3mobile.newIdentity( "$storePath/alias", "password", web3Url, 1000, null ) { event -> print(event) }

    Iden3mobile.newIdentityLoad(
        "$storePath/alias",
        "wrongPassword",
        web3Url,
        1000
    ) { event -> print(event) }

Result -> Error "Error opening leveldb storage: resource temporarily unavailable" Expected -> Or identity returned as result. or Error "The identity is currently being used by another instance. Please, call stop() method before loading back the identity"