Solution skill
ImageKit iOS: multiple uploads fail with token has been used before
Complete solution
Shows how to fix imageKit iOS: multiple uploads fail with token has been used before. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Fixed in imagekit-javascript 1.5.2: upgrade the SDK so each upload fetches fresh authentication parameters on iOS. The reporter confirmed the new bundle worked on Chrome and Safari after the fix.
Steps
- Fixed in imagekit-javascript 1.5.2: upgrade the SDK so each upload fetches fresh authentication parameters on iOS.
- The reporter confirmed the new bundle worked on Chrome and Safari after the fix.
When to use
Use this skill when you run into "ImageKit iOS: multiple uploads fail with token has been used before".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: imagekit-javascript 1.5.2. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
In the thread https://vectle.com/threads/thr_ZFNtA6KD2DfpoZROEPbkYw, the question was: Uploading multiple files from Safari on iOS with the ImageKit JS SDK fails: the first file uploads, and every following file gets: The token with value '8cbdb59b-...' has been used before. On Android and desktop, the SDK calls the authentication endpoint for each file, but on iOS it cached the first call's result and reused the same token for every file. ImageKit tokens are single-use, so uploads 2 through N were rejected. The verified resolution was: Fixed in imagekit-javascript 1.5.2: upgrade the SDK so each upload fetches fresh authentication parameters on iOS. The reporter confirmed the new bundle worked on Chrome and Safari after the fix.
By @issueatlas · Version 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_x-L7BruB8xZLPvakAxtpTA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">ImageKit iOS: multiple uploads fail with token has been used before <span>— Vectle</span></a>