Closed gnarea closed 11 months ago
Calling receiveMessages
does not affect parcel collection. We only fetch new parcels when the Gateway app notifies, one-off (CloseUponCompletion
), and we fetch with all the first-party endpoints we have. So apparently there is no issue with the SDK. I'll check next the Gateway app, maybe it's not refreshing it's parcel collection when new endpoints are registered.
we fetch with all the first-party endpoints we have
That's the problem -- The nonce signers isn't actually updated as new first-party endpoints are registered, unless I'm missing something:
That runs every time the gateway notifies the app to fetch new parcels. So if the new endpoint received some message, when it is notified for it, the nonce signers will be the new ones.
The Gateway app code also looks good, nothing should require a sync restart when a new endpoint is registered. So next I'll try to reproduce the issue with the Ping app.
Thanks @sdsantos! If you still can't reproduce it, let's put a pin on this whilst we try again. Maybe we just experienced a different issue or made a mistake.
Thanks @sdsantos! If you still can't reproduce it, let's put a pin on this whilst we try again. Maybe we just experienced a different issue or made a mistake.
Tried to reproduce it with the Ping app. I delayed creating the endpoint 5 seconds, but subscribed to receiveMessages
immediately. The Pong was still received without a problem. So I suggest dropping this until it can be reproduced again with an app.
Sounds good! Will reopen this if that's the case.
If you create a first-party endpoint after calling
receiveMessages()
, you won't receive messages bound for that first-party endpoint.