huseyz / obsidian-wallabag

This plugin for Obsidian allows you to sync Wallabag items into Obsidian notes in various ways.
MIT License
66 stars 5 forks source link

Have a way to save credentials when authentication fail #43

Open Mereck13579 opened 2 days ago

Mereck13579 commented 2 days ago

Basically I sometimes get some "authentication failed" error that I don't know the cause of (re-authenticating works just fine). The issue is more of QOL as I have to re-enter every single field each time (Client ID, client Secret, Username, Password). Could there be a way to save them when authentication failed for retry?

huseyz commented 2 days ago

It is difficult to guess what's happening here. Any chance you can open the console and see if there are any helpful logs when you get the authentication failed?

Mereck13579 commented 1 day ago

Sure, I'll try to get you that next time it happens (unfortunately it's pretty random so I have no idea when I'll get that info)

Mereck13579 commented 9 hours ago

Just happened now. Here is the console output (I guess the first time was automatic at launch or something, I only noticed by pressing the sync button manually, getting an error, checked the console at that moment): Likely the token expired, refreshing it. plugin:wallabag:339 Token refresh failed. Error: Request failed, status 400 at new t (app.js:1:1925609) at PU (app.js:1:1925801) at app.js:1:1926480 at app.js:1:237228 at Object.next (app.js:1:237333) at a (app.js:1:236051) plugin:wallabag:341 Uncaught (in promise) Error at eval (plugin:wallabag:341:17) at async eval (plugin:wallabag:334:16) at async SyncArticlesCommand.callback (plugin:wallabag:204:22) 2plugin:wallabag:333 Likely the token expired, refreshing it. plugin:wallabag:339 Token refresh failed. Error: Request failed, status 400 at new t (app.js:1:1925609) at PU (app.js:1:1925801) at app.js:1:1926480 at app.js:1:237228 at Object.next (app.js:1:237333) at a (app.js:1:236051) plugin:wallabag:341 Uncaught (in promise) Error at eval (plugin:wallabag:341:17) at async eval (plugin:wallabag:334:16) at async SyncArticlesCommand.callback (plugin:wallabag:204:22)

Small edit: After that, if I click sync again it just says "Please authenticate with Wallabag first.", no additional log in console (and same problem happens, ID Secret etc is empty again)