You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
The text was updated successfully, but these errors were encountered:
AnderLuiz
changed the title
OfflineStore removeEntry expects v1:queue:yyyy but is called with queue:yyyy
OfflineStore removeEntry expects v1:queue:yyyy but it's called with queue:yyyy
Oct 19, 2020
Also experiencing this issue (version 0.15.5) and I would like to add that this has severe consequences since each success in the current session will remove an unproccesed entry.
If you were to restart the app after at least one entry success/failure (anything that calls the removeEntry method) and before ALL entries have been processed, the restoration of the entries will fail.
Furthermore, any future enqueues will be added but since the restoration (requeue) will fail due to an undefined entry value, this breaks the entire queue restoration mechanism.
Thank you for logging the issue.
I think this happened recently when we added v1 logic and it requires some chain of operations. @AnderLuiz I think your proposed fix would work. If you are happy to create PR - myself and @kingsleyzissou can help to merge this
Hi @AnderLuiz, we have made the decision to move away from the Apollo client and we have decided to deprecate our Offix packages and release our Datastore. I will be closing this issue, but if you have any questions, please feel free to let us know.
Bug Report
The following function is the
removeEntry
function. It will only remove the entry ifarrayOfKeys
hasentry.qid
.https://github.com/aerogear/offix/blob/master/packages/offix/scheduler/src/store/OfflineStore.ts#L53
If
entry.qid
is not found, then it will remove the last one fromarrayOfKeys
, but will remove from storage the correct key.Some logs:
steps to reproduce
When the app goes online, the
removeEntry
will be called withentry.qid
===queue:XXXXX
, but it will only work ifentry.qid
===v1:queue:XXXXX
EDIT:
This works:
The text was updated successfully, but these errors were encountered: