damko / freedommarks-browser-webextension

A cross-browser webextension for Nextcloud Bookmarks
https://addons.mozilla.org/en-US/firefox/addon/freedommarks/
GNU General Public License v2.0
106 stars 15 forks source link

Uselessly prompts for credentials #25

Open jeanrajotte opened 3 years ago

jeanrajotte commented 3 years ago

On Firefox on MacOS, when I click the "Search" button on the toolbar tool, the extension prompts for credentials (that it already has in the settings). I click on Cancel and the search completes. Clearly it is using the credentials in settings (to save new bookmarks and to search the existing ones). The prompting is redundant.

damko commented 3 years ago

Thanks Jean for your donation, really appreciated.

The thing is that my addon is dated. The nextcloud bookmark app has changed a its API and I didn't follow up yet. I will definitely review the PRs and add the required changes but I'm extraordinary busy since a while now.

IzzySoft commented 3 years ago

I've also tapped into this annoying issue. Unfortunately, while the web server logs indicate search results were returned, for me the menu just closes when leaving that credential prompt – so I cannot see the results. Couldn't find a way to work around that, hints welcome (@jeanrajotte did you something to keep the list open that I might have missed? Which Nextcloud & Bookmarks version are you using? Maybe it behaves differently on MacOS; I'm on Linux here).

@damko any chance you'll find some time to look into this? I still didn't give up hope, and Freedommarks is an essential part in my workflows. After being unable to upgrade Nextcloud for quite a while (had to wait for a dist upgrade to get PHP > 7.0) I'm no afraid that when upgrading, my workflows will be broken…

Related: #24 – which might explain why it still worked with NC16 (Bookmarks 2.3.4) as with NC17 Bookmarks got upgraded to 3.3.4.

IzzySoft commented 3 years ago

PS: I grabbed the URL called by FM (<nextcloud_server>/index.php/apps/bookmarks/public/rest/v2/bookmark?search%5B%5D=&conjunction=and&page=0&limit=30) and ran it in my browser directly. I get the very same credential prompt. Feeding it with my credentials, the JSON is retrieved. On subsequent calls, there's no more credential prompt.

AAAND: from then on, Freedommarks simply works! So the work-around with NC17/Bookmarks 3.3.4 is to simply call that URL once in a tab directly. Ugh, workflow saved :smile:

IzzySoft commented 3 years ago

Funnily, this seems to be browser-specific: in Waterfox Classic, I don't have this issue. In Waterfox G3, I have it (but the work-around does its job).

jeanrajotte commented 3 years ago

@IzzySoft thanks for these stories :) I don't have the issue anymore. I didn't have to use a workaround. The extension just works now.

FYI, I use the Brave browser.

IzzySoft commented 3 years ago

I still have to use it every now and then (on G3 only, though), so I made it a bookmark. Another explanation might be it's not the browser itself, but the fact that in Classic I always have a pinned tab open to my NC calendar, which keeps the browser logged-in. I meanwhile reached NC19 in my update run, and all is working smoothly \o/ Unfortunately, I cannot update further as with NC20 at least one of the apps I use would stop working (requiring PHP7.3 while my LTS is limited to 7.2). But hey, at least I reached a supported version again :rofl: And FreedomMarks is still working, yay!