bookmarks icon indicating copy to clipboard operation
bookmarks copied to clipboard

Add bookmark dialog hangs when triggered from Bookmarklet and using Firefox Multi-Account Containers

Open reimer-atb opened this issue 4 years ago • 2 comments

Describe the bug

To Reproduce Steps to reproduce the behavior:

  1. Install Firefox Multi-Account Containers extension
  2. Configure it to always open your Nextcloud instance in container "A" and "some other page" in container "B".
  3. Logout of Nextcloud
  4. Open "some other page"
  5. Use the Bookmarklet to add a new bookmark for "some other page"
  6. You are redirected to Nextcloud Login screen
  7. Login with your Nextcloud username and password - I also use 2FA with a FIDO2 key
  8. After successful login you are redirected to the "Add bookmark" form
  9. Click Save
  10. A spinning circle appears next to the "Add Bookmark" heading but you remain on the page with the "Add bookmark" form. If you manually go to the bookmarks app your new bookmark will be listed there. So saving the bookmark actually works.

If you try to bookmark a page that is open in the same container "A" as your Nextcloud instance, then the Nextcloud login page and "Add bookmark" page will appear in a popup instead of a full-sized tab. After clicking save, the popup is automatically closed.

Expected behavior After bookmark was successfully saved the user should be redirected to the Bookmarks App's page and see her new bookmark listed there. Or if that is not the intended behaviour of the "Add bookmark" page then maybe just close the page.

Screenshots

Desktop (please complete the following information):

  • OS: MacOS X
  • Browser: Firefox
  • Version: 79.0

Server (please complete the following information):

  • OS: not sure, it's a hosted instance
  • HTTP server: Apache
  • Database: MySQL 5.7.30
  • PHP version: v7.3.19
  • Nextcloud version: 18.0.7
  • Bookmarks app version: 3.3.4
  • Activated Nextcloud Apps:
  • Nextcloud configuration:
  • Nextcloud external user backend:

Additional context Add any other context about the problem here.

Web server error log

Insert your webserver log here

Nextcloud log (nextcloud/data/nextcloud.log)

Insert your Nextcloud log here

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...

reimer-atb avatar Aug 18 '20 23:08 reimer-atb

Confirmed. The reason for this is that the code tries to close the window once the bookmark is created. Firefox Containers forces the window to be opened in a tab, however, which cannot be closed programmatically. So, the best solution, IMO, would be to also display a success message, so the user is not left hanging in the balance.

marcelklehr avatar Sep 21 '20 13:09 marcelklehr

the code for the bookmarklet is here: https://github.com/nextcloud/bookmarks/blob/master/src/components/ViewBookmarklet.vue#L153

marcelklehr avatar Sep 21 '20 13:09 marcelklehr