Open Bug 1617503 Opened 4 years ago Updated 2 years ago

Bookmark button not working after system returning from standby

Categories

(Firefox :: Bookmarks & History, defect, P3)

73 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: bingham.jackson49, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0

Steps to reproduce:

I opened many tabs with websites loaded and/or multiple windows.

Actual results:

When I have lots of tabs open while working on stuff, the bookmark star button does not work. It does not show anything. I click on it and it does nothing. It does not bookmark the page. Note: the keyboard shortcut works to bookmark but the new bookmark menu still doesn't show up.

Expected results:

The website to be bookmarked and the new bookmark menu to pop up asking were i want the bookmark to be saved.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Bookmarks & History

it may be profile corruption, please open about:support, run Places Database integrity check and report results here.

Flags: needinfo?(bingham.jackson49)

I ran it and here is the output:

Task: checkIntegrity

  • The places.sqlite database is sane
  • The favicons.sqlite database is sane

Task: invalidateCaches

  • The caches have been invalidated

Task: checkCoherence

  • The database is coherent

Task: expire

  • Database cleaned up

Task: originFrecencyStats

  • Recalculated origin frecency stats

Task: vacuum

  • Initial database size is 20480KiB
  • The database has been vacuumed
  • Final database size is 20480KiB

Task: stats

  • Places.sqlite size is 20480KiB
  • Favicons.sqlite size is 19840KiB
  • pragma_user_version is 53
  • pragma_page_size is 32768
  • pragma_cache_size is -2048
  • pragma_journal_mode is wal
  • pragma_synchronous is 1
  • History can store a maximum of 143510 unique pages
  • Table moz_origins has 2508 records
  • Table moz_places has 31692 records
  • Table moz_historyvisits has 55134 records
  • Table moz_inputhistory has 24 records
  • Table moz_bookmarks has 829 records
  • Table moz_bookmarks_deleted has 0 records
  • Table moz_keywords has 0 records
  • Table sqlite_sequence has 1 records
  • Table moz_anno_attributes has 3 records
  • Table moz_annos has 376 records
  • Table moz_items_annos has 0 records
  • Table moz_meta has 8 records
  • Table sqlite_stat1 has 17 records
  • Index sqlite_autoindex_moz_origins_1
  • Index sqlite_autoindex_moz_inputhistory_1
  • Index sqlite_autoindex_moz_bookmarks_deleted_1
  • Index sqlite_autoindex_moz_keywords_1
  • Index sqlite_autoindex_moz_anno_attributes_1
  • Index moz_places_url_hashindex
  • Index moz_places_hostindex
  • Index moz_places_visitcount
  • Index moz_places_frecencyindex
  • Index moz_places_lastvisitdateindex
  • Index moz_places_guid_uniqueindex
  • Index moz_places_originidindex
  • Index moz_historyvisits_placedateindex
  • Index moz_historyvisits_fromindex
  • Index moz_historyvisits_dateindex
  • Index moz_bookmarks_itemindex
  • Index moz_bookmarks_parentindex
  • Index moz_bookmarks_itemlastmodifiedindex
  • Index moz_bookmarks_dateaddedindex
  • Index moz_bookmarks_guid_uniqueindex
  • Index moz_keywords_placepostdata_uniqueindex
  • Index moz_annos_placeattributeindex
  • Index moz_items_annos_itemattributeindex

Task: _refreshUI

Flags: needinfo?(bingham.jackson49)

Sorry it automatically put it in markdown.

When you say a lot of tabs, is that tens, hundreds, thousands?

Flags: needinfo?(bingham.jackson49)

I would probably have about 20-30 open in one window. Sometimes more than one window, having just as many tabs in some cases. After a while the bookmark button would stop working. Sometimes it would take longer than other times for this to happen.
Other Note I failed to mention earlier: It usually happened after waking up the computer from sleep mode and after I have had Firefox open fire at least a day.

Flags: needinfo?(bingham.jackson49)

That is useful, sleep mode may confuse some code that in the end causes this.
Could you please check, when this happens, if there's any error reported in the Browser Console (not the Web Console)?

Yah, Ill get back to you when it happens again. Sorry for not mentioning sleep mode earlier, it totally slipped my mind.

Summary: Bookmark button not working → Bookmark button not working after system returning from standby

I am having the problem again. I am getting a butt load off errors in the browser console.
Most of them say:

Refreshing device list failed.
Object { error: Exception, errorString: "[Exception... "NS_ERROR_UNKNOWN_HOST" nsresult: "0x804b001e (NS_ERROR_UNKNOWN_HOST)" location: "JS frame :: resource://services-common/rest.js :: onStopRequest :: line 488" data: no]", message: null, code: null, errno: null, toString: toString() }
browser-sync.js:249:15

Thanks for helping us debug! That error is unfortunately expected, it's because we're racing to sync just as your computer is reconnecting to the network—but having Sync turned on is a valuable clue! When the star button isn't working, are you able to open the Library and edit bookmarks (like dragging them up and down in the list to move them, moving them to different folders, changing titles and URLs), or is that also broken?

Yes, I am able to edit stuff in the library.

UPDATE: I cannot edit anything in the library! It won't let me delete bookmarks!

That's good to know, thank you—though I'm at a loss for how to explain it! ☹️ I asked on a hunch, because we've seen issues before where the connection to the bookmarks and history database gets wedged (for example, this loop would return SQLITE_BUSY indefinitely when we used a separate connection for bookmark sync, causing the connection's async thread to get stuck in an infinite loop). It sure sounds like that's happening here. But that separate connection got removed in bug 1567238, so something else—maybe the bookmark merge runnable—is locking up the thread, and preventing other queries from running.

Depending on how comfortable you are with the command line, there are a couple of things you can try to help us figure this out:

  • Please install the About Sync add-on and open about:sync. Under "General Options", set "Please describe how you intend using about:sync" to "I'd prefer to adjust these preferences manually", and set "Level of messages written by Sync engines" and "Level of messages written to dump - useful primarily for developers" to "Debug". To see those logs, you'll need to launch firefox.exe from the Command Prompt, and use it until you see the problem. We're looking for any lines that mention Sync.Engine.Bookmarks.Mirror. The bookmark merger reports its progress, so the last line before the hang should help us see where it's getting stuck.
  • Also, from the command prompt, try running cmd /V /C "set MOZ_LOG=timestamp,mozStorage:5&& firefox.exe" (I think that's the command, but I don't have a Windows box on hand right now to test if this works, unfortunately 😭)—that'll log all SQL statements that Firefox runs, and might also help narrow down what it's doing before wedging.

Both of those things would definitely take more of your time and effort, so I can totally understand if you'd rather not. But, if you have cycles to help us out and feel comfortable with trying them, we'd really appreciate it. Thank you again!

The priority flag is not set for this bug.
:mak, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mak)

(In reply to :Lina Cambridge from comment #13)

  • Please install the About Sync add-on and open about:sync. Under "General Options", set "Please describe how you intend using about:sync" to "I'd prefer to adjust these preferences manually", and set "Level of messages written by Sync engines" and "Level of messages written to dump - useful primarily for developers" to "Debug". To see those logs, you'll need to launch firefox.exe from the Command Prompt, and use it until you see the problem. We're looking for any lines that mention Sync.Engine.Bookmarks.Mirror. The bookmark merger reports its progress, so the last line before the hang should help us see where it's getting stuck.

Actually, there's a much easier way to do this that doesn't require the command line! 😅

  1. Open about:config, and click through the scary "Accept the Risk and Continue" warning.
  2. Search for the pref name services.sync.log.appender.console.
  3. Click the Edit button, and change it to Debug.

When you notice the Library or star UI is stuck, please open the browser console, and search for "Sync.Engine.Bookmarks.Mirror". Then, copy-paste the lines that appear there into this bug.

Reporter, please could you try Lina's comment 15 and get back to us?

Flags: needinfo?(bingham.jackson49)

Ok. Sorry for not responding for a while, its been a bit cray with all that's going on right now. I will get to this when I get a sec later tonight. Thanks for being patient with me.

Flags: needinfo?(bingham.jackson49)

*crazy

Flags: needinfo?(mak)
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.