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

Deleting a model that is resynchronizing causes an exception #154

Closed
mmacfadden opened this issue Jul 1, 2020 · 0 comments
Closed

Deleting a model that is resynchronizing causes an exception #154

mmacfadden opened this issue Jul 1, 2020 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@mmacfadden
Copy link
Contributor

mmacfadden commented Jul 1, 2020

Versions

  • Convergence Version: 1.0.0-rc.6

Describe the Bug

ConvergenceServerError: the requested model was not open
    at ProtocolConnection._onReply (/Users/michael/development/convergence/client/convergence-client-javascript/src/main/connection/ProtocolConnection.ts:300:11)
    at ProtocolConnection._onSocketMessage (/Users/michael/development/convergence/client/convergence-client-javascript/src/main/connection/ProtocolConnection.ts:242:12)
    at /Users/michael/development/convergence/client/convergence-client-javascript/src/main/connection/ProtocolConnection.ts:97:12
    at SafeSubscriber._next (/Users/michael/development/convergence/client/convergence-client-javascript/src/main/util/ConvergenceEventEmitter.ts:108:11)
    at SafeSubscriber.__tryOrUnsub (/Users/michael/development/convergence/client/convergence-client-javascript/node_modules/rxjs/src/internal/Subscriber.ts:265:10)
    at SafeSubscriber.next (/Users/michael/development/convergence/client/convergence-client-javascript/node_modules/rxjs/src/internal/Subscriber.ts:207:14)
    at Subscriber._next (/Users/michael/development/convergence/client/convergence-client-javascript/node_modules/rxjs/src/internal/Subscriber.ts:139:22)
    at Subscriber.next (/Users/michael/development/convergence/client/convergence-client-javascript/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/Users/michael/development/convergence/client/convergence-client-javascript/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/Users/michael/development/convergence/client/convergence-client-javascript/node_modules/rxjs/src/internal/Subscriber.ts:99:12) {
  _code: 'model_not_open',
  _details: undefined
}

We need to wait until after the resync happens if it is in progress, to do the delete. If it is not in progress yet, we could just delete it, but then we need to remove it from the queue.

Right now, we delete the model that is in progress, which triggers it to delete itself locally, which then tries to initiate a close at the server. We should also investigate if that method needs to be smarter to detect that it is resyncing, and thus doesn't need to initiate a close with the server.

Expected Behavior
An error should not be thrown.

@mmacfadden mmacfadden added the bug Something isn't working label Jul 1, 2020
@mmacfadden mmacfadden added this to the 1.0.0-rc.7 milestone Jul 1, 2020
@mmacfadden mmacfadden self-assigned this Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant