-
-
Notifications
You must be signed in to change notification settings - Fork 598
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest versions of Parse Server and the Parse JS SDK.
Issue Description
I am using saveEventually and have noted the following:
Data is pinned(saved locally on the device) correctly during a valid session when no network is found.
I noted data is not saved at all locally if a session expires...
Upon the network connection returning data gets sent correctly [ although receiving doubles or multiples ] the data is at least found on parse server.
However if the connection returns and meanwhile the session has expired an attempt is still made and essentially the data gets transmitted and discarded, never saved to parse server and getting essentially lost.
I have checked the code in the SDK for saveEventually and it seems the server only polls for status ok..... and then attempts to send the queue.
Steps to reproduce
to reproduce one has to set a very short session expiry on parse server.
Actual Outcome
The outcome is lost data upon session expiry both locally and on parse server.
Expected Outcome
I expected the data to live locally until a user gets logged in again(not just network restored again) and has a valid session.
I expected the data to still be saved locally on the device even if the session expires.
Environment
Server
- Parse Server version: 5.1.0
- Operating system: n/a
- Local or remote host Local
Database
- System (MongoDB or Postgres): n/a
- Database version: n/a
- Local or remote host n/a
Client
- Parse JS SDK version: parse@4.1.0
Logs
info: Create new client: f5e9c41b-2378-4d16-a167-d849dbef9d9c
error: Session token is expired. {"code":209,"stack":"Error: Session token is expired.\n at Object.getAuthForSessionToken (/usr/local/parse-server/node_modules/parse-server/lib/Auth.js:132:11)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async handleParseSession (/usr/local/parse-server/node_modules/parse-server/lib/middlewares.js:292:21)"}