No token found error after installing v1.1.2
After installing version 1.1.2, Cursor Status won't show any info anymore. It show this red text at the status bar:
"Cursor Stats: No token found"
And this info on hover:
⚡ Cursor Usage Stats ⚠️ Error State
⚠️ Could not retrieve Cursor token from database---
Can you share the diagnostic report (command pallete > diagnostic report)
I'm experiencing the same issue here. In my case, here's my diagnostic report.
{
"timestamp": "2025-05-24T08:20:06.811Z",
"extensionVersion": "1.1.2",
"os": "darwin 24.4.0",
"vsCodeVersion": "1.96.2",
"cursorStats": null,
"usageLimitResponse": null,
"premiumUsage": null,
"teamInfo": null,
"teamUsage": null,
"rawResponses": {},
"logs": [],
"errors": {
"token": "Failed to retrieve token from database"
}
}
```Hope this helps with debugging the issue!
Can you check the logs? (output >cursor stats)
@pstanton237 @pcarielo
also can you check how big is your state.vscdb file
Can you check the logs? (output >cursor stats)
The Cursor Stat output console is visible and accessible, but there are no logs displayed in it.
also can you check how big is your state.vscdb file
My state.vscdb file is 167MB. :)
I am adding some logs to the code so we can understand what is going on there I will give you the test build in 5m
I am adding some logs to the code so we can understand what is going on there I will give you the test build in 5m
Sure, I can help with that.
Oh wait, I've enabled debug logging and I can see errors in the output. Please hold on a moment.
Here are the logs from the output:
[2025-05-24T08:57:10.746Z] [INFO] [Command] Manually refreshing stats...
[2025-05-24T08:57:10.747Z] [INFO] [Stats] ====================================================================================================
[2025-05-24T08:57:10.747Z] [INFO] [Stats] Starting stats update...
[2025-05-24T08:57:10.747Z] [INFO] [Database] Attempting to open database at: /Users/pstanton237/Library/Application Support/Cursor/User/globalStorage/state.vscdb
[2025-05-24T08:57:10.749Z] [INFO] [Database] Error with database operation: SQLite3Error: unable to open database file true
[2025-05-24T08:57:10.750Z] [INFO] [Database] Database error details: {"message":"unable to open database file","stack":"SQLite3Error: unable to open database file\n\tat Database._handleError (/Users/pstanton237/.cursor/extensions/dwtexe.cursor-stats-1.1.2/node_modules/node-sqlite3-wasm/dist/node-sqlite3-wasm.js:7:5956)\n\tat new Statement (/Users/pstanton237/.cursor/extensions/dwtexe.cursor-stats-1.1.2/node_modules/node-sqlite3-wasm/dist/node-sqlite3-wasm.js:7:6076)\n\tat Database.prepare (/Users/pstanton237/.cursor/extensions/dwtexe.cursor-stats-1.1.2/node_modules/node-sqlite3-wasm/dist/node-sqlite3-wasm.js:7:5368)\n\tat Database._query (/Users/pstanton237/.cursor/extensions/dwtexe.cursor-stats-1.1.2/node_modules/node-sqlite3-wasm/dist/node-sqlite3-wasm.js:7:5694)\n\tat Database.get (/Users/pstanton237/.cursor/extensions/dwtexe.cursor-stats-1.1.2/node_modules/node-sqlite3-wasm/dist/node-sqlite3-wasm.js:7:5614)\n\tat getCursorTokenFromDB (/Users/pstanton237/.cursor/extensions/dwtexe.cursor-stats-1.1.2/out/services/database.js:46:24)\n\tat updateStats (/Users/pstanton237/.cursor/extensions/dwtexe.cursor-stats-1.1.2/out/utils/updateStats.js:19:65)\n\tat /Users/pstanton237/.cursor/extensions/dwtexe.cursor-stats-1.1.2/out/extension.js:95:49\n\tat mK.h (file:///Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:135:33048)\n\tat mK.$executeContributedCommand (file:///Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:135:33898)\n\tat det.S (file:///Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:44:116266)\n\tat det.Q (file:///Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:44:116046)\n\tat det.M (file:///Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:44:115134)\n\tat det.L (file:///Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:44:114239)\n\tat h2.value (file:///Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:44:113033)\n\tat C.B (file:///Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:2391)\n\tat C.fire (file:///Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:2609)\n\tat eo.fire (file:///Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:44:9489)\n\tat h2.value (file:///Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:195:13392)\n\tat C.B (file:///Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:2391)\n\tat C.fire (file:///Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:2609)\n\tat eo.fire (file:///Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:44:9489)\n\tat MessagePortMain.<anonymous> (file:///Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:195:11677)\n\tat MessagePortMain.emit (node:events:518:28)\n\tat MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2949)\n\tat Object.callbackTrampoline (node:internal/async_hooks:130:17)"} true
[2025-05-24T08:57:10.751Z] [INFO] [Critical] No valid token found true
[2025-05-24T08:57:10.751Z] [INFO] [Status Bar] Updated status bar with no token message
[2025-05-24T08:57:10.752Z] [INFO] [Status Bar] Status bar visibility updated after no token
To be clear, the state.vscdb file mentioned in the logs does actually exist.
$ ls -al "/Users/pstanton237/Library/Application Support/Cursor/User/globalStorage/state.vscdb"
-rw-r--r--@ 1 pstanton237 staff 175030272 May 24 17:56 /Users/pstanton237/Library/Application Support/Cursor/User/globalStorage/state.vscdb
ls -ald "/Users/pstanton237/Library/Application Support/Cursor/User/globalStorage/"
can you run this
Sure, here's the output.
drwxr-xr-x@ 10 pstanton237 staff 320 May 24 17:57 .
drwxr-xr-x@ 11 pstanton237 staff 352 May 24 17:54 ..
drwxr-xr-x@ 2 pstanton237 staff 64 Mar 15 01:00 mgtrrz.terraform-completer
drwxr-xr-x@ 3 pstanton237 staff 96 Nov 26 15:24 ms-python.python
-rw-r--r--@ 1 pstanton237 staff 175030272 May 24 18:04 state.vscdb
-rw-r--r--@ 1 pstanton237 staff 32768 May 24 17:56 state.vscdb-shm
-rw-r--r--@ 1 pstanton237 staff 4148872 May 24 18:07 state.vscdb-wal
-rw-r--r--@ 1 pstanton237 staff 175030272 May 24 17:56 state.vscdb.backup
-rw-r--r--@ 1 pstanton237 staff 92695 May 24 17:57 storage.json
drwxr-xr-x@ 12 pstanton237 staff 384 Mar 16 00:30 tamasfe.even-better-toml
Also, I wanted to mention that it works fine with version 1.1.1
yes I changed the sqlite libs because the old one couldnt handle the 2gb+ state.vscdb files
I'll be away for a while - no rush, but feel free to drop any info when convenient and I'll respond when I'm back
I will not be at the computer for a while, unfortunately, I hope to solve the problem during the day.
I'm experiencing the same issue
Heyo, getting the same issue, not sure if its because of the extension update or cursor update(just updated from 50.4 to 50.7 on linux), logs:
[2025-05-26T07:49:58.817Z] [INFO] [Command] Manually refreshing stats...
[2025-05-26T07:49:58.817Z] [INFO] [Stats] ====================================================================================================
[2025-05-26T07:49:58.817Z] [INFO] [Stats] Starting stats update...
[2025-05-26T07:49:58.817Z] [INFO] [Database] Attempting to open database at: /home/thatmike1/.config/Cursor/User/globalStorage/state.vscdb
[2025-05-26T07:49:58.818Z] [INFO] [Database] Error with database operation: SQLite3Error: unable to open database file true
[2025-05-26T07:49:58.818Z] [INFO] [Database] Database error details: {"message":"unable to open database file","stack":"SQLite3Error: unable to open database file\n\tat Database._handleError (/home/thatmike1/.cursor/extensions/dwtexe.cursor-stats-1.1.2/node_modules/node-sqlite3-wasm/dist/node-sqlite3-wasm.js:7:5956)\n\tat new Statement (/home/thatmike1/.cursor/extensions/dwtexe.cursor-stats-1.1.2/node_modules/node-sqlite3-wasm/dist/node-sqlite3-wasm.js:7:6076)\n\tat Database.prepare (/home/thatmike1/.cursor/extensions/dwtexe.cursor-stats-1.1.2/node_modules/node-sqlite3-wasm/dist/node-sqlite3-wasm.js:7:5368)\n\tat Database._query (/home/thatmike1/.cursor/extensions/dwtexe.cursor-stats-1.1.2/node_modules/node-sqlite3-wasm/dist/node-sqlite3-wasm.js:7:5694)\n\tat Database.get (/home/thatmike1/.cursor/extensions/dwtexe.cursor-stats-1.1.2/node_modules/node-sqlite3-wasm/dist/node-sqlite3-wasm.js:7:5614)\n\tat getCursorTokenFromDB (/home/thatmike1/.cursor/extensions/dwtexe.cursor-stats-1.1.2/out/services/database.js:46:24)\n\tat updateStats (/home/thatmike1/.cursor/extensions/dwtexe.cursor-stats-1.1.2/out/utils/updateStats.js:19:65)\n\tat /home/thatmike1/.cursor/extensions/dwtexe.cursor-stats-1.1.2/out/extension.js:95:49\n\tat mK.h (file:///tmp/.mount_cursororrpEL/usr/share/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:135:33048)\n\tat mK.$executeContributedCommand (file:///tmp/.mount_cursororrpEL/usr/share/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:135:33898)\n\tat det.S (file:///tmp/.mount_cursororrpEL/usr/share/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:44:116266)\n\tat det.Q (file:///tmp/.mount_cursororrpEL/usr/share/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:44:116046)\n\tat det.M (file:///tmp/.mount_cursororrpEL/usr/share/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:44:115134)\n\tat det.L (file:///tmp/.mount_cursororrpEL/usr/share/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:44:114239)\n\tat h2.value (file:///tmp/.mount_cursororrpEL/usr/share/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:44:113033)\n\tat C.B (file:///tmp/.mount_cursororrpEL/usr/share/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:2391)\n\tat C.fire (file:///tmp/.mount_cursororrpEL/usr/share/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:2609)\n\tat eo.fire (file:///tmp/.mount_cursororrpEL/usr/share/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:44:9489)\n\tat h2.value (file:///tmp/.mount_cursororrpEL/usr/share/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:195:13392)\n\tat C.B (file:///tmp/.mount_cursororrpEL/usr/share/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:2391)\n\tat C.fire (file:///tmp/.mount_cursororrpEL/usr/share/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:2609)\n\tat eo.fire (file:///tmp/.mount_cursororrpEL/usr/share/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:44:9489)\n\tat MessagePortMain.<anonymous> (file:///tmp/.mount_cursororrpEL/usr/share/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:195:11677)\n\tat MessagePortMain.emit (node:events:518:28)\n\tat MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2949)"} true
[2025-05-26T07:49:58.819Z] [INFO] [Critical] No valid token found true
[2025-05-26T07:49:58.819Z] [INFO] [Status Bar] Updated status bar with no token message
[2025-05-26T07:49:58.820Z] [INFO] [Status Bar] Status bar visibility updated after no token