-
Notifications
You must be signed in to change notification settings - Fork 504
Description
Description
Hi,
Some of our users have reported encountering errors when uploading files after a certain period of time. Specifically, the DSpace client displays an “Error Loading File” message once the JWT token is renewed by the front-end client.
This issue arises when a user’s submission process exceeds 30 minutes. The front-end client renews the token 2 minutes before session timeout; however, it does not use the new token if the user attempts to upload files after the renewal.
We are currently using DSpace 7.6.2. Could you provide any insights or recommendations on resolving this issue?
Thanks.
Steps to Reproduce
Steps to reproduce the behavior:
- Log in to DSpace using local authentication.
- Start a new submission.
- Upload files periodically (e.g., every few minutes). Initially, all uploads succeed.
- The DSpace client automatically renews the JWT token via a server call to the /login endpoint.
- After the token renewal, any subsequent file upload attempts fail with a 401 Unauthorized error.
Expected behavior
The JWT token timeout is set to 30 minutes. By default, the client renews the token 2 minutes before expiration. Once the new token is received, it should be used for all subsequent file uploads without failure.
Observed Issue
Currently, file uploads continue to use the expired token instead of the newly issued one.
On failed upload requests, the Bearer token in the request header differs from the token stored in the cookie, indicating a mismatch.
Screenshots:
In the screenshot below, I monitored network traffic using Google Chrome Developer Tools
Image1: Three uploads were done successfully
Image 2: DSpace renews the token. This happens 2 min before it expires.
Image 3: All uploads attempts fail after the token renewal. I attempted to upload two files.
Image 4: The failed upload request contains a different token in the header compared to the one in the cookie. It uses the old one in the header, and the new one in the cookie.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status




