Skip to content
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

Agent.stop doesn't close store #225

Open
mixmix opened this issue May 27, 2024 · 3 comments · May be fixed by #309
Open

Agent.stop doesn't close store #225

mixmix opened this issue May 27, 2024 · 3 comments · May be fixed by #309
Assignees
Labels
enhancement New feature or request

Comments

@mixmix
Copy link
Contributor

mixmix commented May 27, 2024

Is this a regression?

No

Description

We've written some persistence test for our application, but they fail because agent.stop does not stop all aspects of the agent. Namely the Pluto.Store continues to run, so that when you try and restart a new instance of the agent you get RxDB freaking out (correctly) about another instance of your db already running

Please provide the exception or error you saw

RxError (DB8): RxError (DB8):
  RxDB Error-Code DB8.
  Error messages are not included in RxDB core to reduce build size.
  - To find out what this error means, either use the dev-mode-plugin https://rxdb.info/dev-mode.html
  - or search for the error code here: https://github.com/pubkey/rxdb/search?q=DB8

Please provide the environment you discovered this bug in

SDK `5.1.1` with `@pluto-encrypted/inmemory`

Anything else?

Here's that Errror message looked up to save you the hassle : https://github.com/pubkey/rxdb/blob/c50e7c96f8f6bbaecefbb34673916f720c037edb/src/plugins/dev-mode/error-messages.ts#L68

    DB8: 'createRxDatabase(): A RxDatabase with the same name and adapter already exists.\n' +
        'Make sure to use this combination only once or set ignoreDuplicate to true if you do this intentional-\n' +
        'This often happens in react projects with hot reload that reloads the code without reloading the process.',
@mixmix
Copy link
Contributor Author

mixmix commented May 27, 2024

Propose

inside agent.stop() add await this.store.stop() or whatever

@mixmix
Copy link
Contributor Author

mixmix commented Jul 19, 2024

Bump

@curtis-h curtis-h self-assigned this Oct 18, 2024
@curtis-h curtis-h linked a pull request Oct 22, 2024 that will close this issue
6 tasks
@curtis-h
Copy link
Contributor

Hi @mixmix,
I've got a PR up for this (#309)
While I've added unit tests and manually tested against our demos, I would really appreciate if you could try the branch with your persistence tests and let me know the outcome.

@curtis-h curtis-h added the enhancement New feature or request label Oct 22, 2024
@elribonazo elribonazo linked a pull request Oct 22, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants