mcndt / obsidian-toggl-integration

A Toggl integration plugin for the popular knowledge base application Obsidian.
GNU General Public License v3.0
267 stars 19 forks source link

400 errors #109

Closed tsbertalan closed 1 year ago

tsbertalan commented 1 year ago

A simple block like

Summary FROM 2022-11-23 TO 2022-11-23
SORT DESC

just results in "Loading Toggl report" indefinitely, with this output in the console:

Loading obsidian-toggl-integration 0.9.0
3app.js:1 Uncaught (in promise) Error: Request failed, status 400
    at new t (app.js:1:699319)
    at Xb (app.js:1:699511)
    at app.js:1:700188
    at app.js:1:235201
    at Object.next (app.js:1:235306)
    at a (app.js:1:234045)
plugin:obsidian-file-path-to-uri:137 Loading plugin FilePathToUri...
​ Error reaching Toggl API
updateCurrentTimer @ plugin:obsidian-toggl-integration:12525
​ Error: net::ERR_NETWORK_CHANGED
    at SimpleURLLoaderWrapper.<anonymous> (node:electron/js2c/browser_init:101:7169)
    at SimpleURLLoaderWrapper.emit (node:events:390:28)
updateCurrentTimer @ plugin:obsidian-toggl-integration:12526
app.js:1 Uncaught (in promise) Error: Request failed, status 400
    at new t (app.js:1:699319)
    at Xb (app.js:1:699511)
    at app.js:1:700188
    at app.js:1:235201
    at Object.next (app.js:1:235306)
    at a (app.js:1:234045)
​ Loading obsidian-toggl-integration 0.9.0
2app.js:1 Uncaught (in promise) Error: Request failed, status 400
    at new t (app.js:1:699319)
    at Xb (app.js:1:699511)
    at app.js:1:700188
    at app.js:1:235201
    at Object.next (app.js:1:235306)
    at a (app.js:1:234045)
plugin:obsidian-toggl-integration:25390 Loading obsidian-toggl-integration 0.9.0
3app.js:1 Uncaught (in promise) Error: Request failed, status 400
    at new t (app.js:1:699319)
    at Xb (app.js:1:699511)
    at app.js:1:700188
    at app.js:1:235201
    at Object.next (app.js:1:235306)
    at a (app.js:1:234045)

The toggl sidebar doesn't show my active time entry. Obsidian is v1.0.3, installer v1.0.0; up-to-date. The plugins "check for update" button doesn't reveal any.

However, the "Test API connection" button succeeds, and this API key has worked and continues to work fine with other Obsidian installations.

jasper-bosch commented 1 year ago

I had the same problem. Closing Obsidian and restarting it fixed it for me.

tsbertalan commented 1 year ago

I'll note that, for large vaults, restarting Obsidian can take anywhere from 5 to 20 minutes, so the underlying issue should still be resolved. I guess if it's just "close and reopen the document/tab", then that's fine.

mcndt commented 1 year ago

I understand, however without clear steps to reproduce it's hard to fix anything :/

In the 0.10.0 update, API errors should give more info so don't hesitate to re-open this issue when it occurs again and you got more details about the error!

tsbertalan commented 1 year ago

Fair enough, will do.