- 1 Open the failing jar
If yt-dlp or curl rejects the file, look at column 5. Thirteen digits is the giveaway. Ten digits (around 1.7e9 in 2026) is correct.
- 2 Paste here
The sample is already milliseconds. Convert. Output Netscape with a 10-digit expiry. JSON output stores
expirationDatein seconds. - 3 Replace the file
Feed yt-dlp
--cookiesor curl-bthe rewritten file. Do not convert seconds to milliseconds again in a JS snippet.
Message → cause → fix
| Symptom | Cause | Fix |
|---|---|---|
| Warning: expiry looked like milliseconds | Column 5 or JSON expirationDate > 1e12 | Already converted on this paste |
| Cookie expires ~50,000 years out / client rejects | Milliseconds stored as seconds | Divide by 1000 or use this converter |
| Cookie expired immediately | Playwright expires: -1 treated as a timestamp | storageState guide — we treat ≤0 as session |
| Expiry 0 | Session cookie | Correct for Netscape session rows |
1e12 is about September 2001 in milliseconds and is far above any real Unix-second cookie expiry this century. Real second timestamps for 2026 are ten digits. Same threshold in JSON and Netscape
// JSON parseExpiration:
// num > 1e12 ? Math.floor(num / 1000) : Math.floor(num)
// Netscape column 5:
// 1789200000000 → 1789200000