appcenter icon indicating copy to clipboard operation
appcenter copied to clipboard

AppCenter updates count shows zero (0) on dock

Open queeup opened this issue 4 years ago • 23 comments

Prerequisites

  • [X] I have searched open and closed issues for duplicates.

Describe the bug

AppCenter updates counts always showing zero (0) on plank.

Expected behavior

In the example below, plank should show 1 update on the AppCenter icon.

Screenshots or screen recordings

2019-11-15 13-27-15 ekran görüntüsü

2019-11-16 17-52-49 ekran görüntüsü

Platform Information

  • OS: elementary OS

  • OS Version: Juno

  • Hardware info: Thinkpad T430

  • [X] I'm using the latest released stable version

Additional context

appcenter:	3.2.0+r2067+pkg81~ubuntu5.0.1
plank:	        0.11.4+git20190318.fb624c21-0elementary5.0.1

queeup avatar Nov 15 '19 10:11 queeup

In my case, there are updates showing in the app window with the badge there but on the plank icon there is no badge showing. I'm guessing some race condition in the updates_number being set in the calls to async refresh_updates () https://github.com/elementary/appcenter/blob/22cc4ca358c7bceb3cc337dc7caec64afa17ae40/src/Core/Client.vala#L64

vjr avatar Dec 11 '19 15:12 vjr

@vjr Unfortunately, I can't tell if your guess is correct. But I also have the problem with two computers that the badge on plank icon is not shown at all.

4jNsY6fCVqZv avatar Dec 11 '19 19:12 4jNsY6fCVqZv

I've been havin this issue lately. Definitely didn't happen before 'hera' to me.

Julioevm avatar Dec 20 '19 16:12 Julioevm

This has been happening to me since I installed 5.1. I have a strong hunch this has something to do with the Flatpak integration.

When there are Flatpak updates, the AppCenter shows up in my dock with the badge showing "0" updates. When I open AppCenter and go to updates, AppCenter says there's like 2gb worth of updates but only shows 2 Flatpak apps that need updating.

After I update, suddenly there's like 5 or 6 more non-Flatpak apps that need updates and the update badge on the dock suddenly shows however many apps need updating.

I haven't dug much deeper into this issue because it's little more than annoying but I'm a bit surprised that nobody else is really talking about it.

egeexyz avatar Jan 04 '20 08:01 egeexyz

I hope that my report can contribute to this issue.


Prerequisites

  • [x] I have searched open and closed issues for duplicates.

Describe the bug

When updates are available and AppCentre is not pinned to the Dock, the AppCentre icon shows a red dot with zero updates.

To reproduce

  1. Wait for AppCentre to in the background check for updates.
  2. Assuming that at least one component is outdated, the AppCentre icon is updated to show a red dot which contains a non-zero number of available updates. Right click the icon and unpin it from the Dock.
  3. Restart the system and log in.
  4. Wait for AppCentre to in the background again check for updates.
  5. The AppCentre icon is updated to show a red dot which contains the number zero.

Note that this error can, as far as I can tell, only be reproduced once per user session.

Expected behaviour

The AppCentre icon always shows the correct number of available updates.

Screenshots or screen recordings

Steps 1 and 2 Steps 4 and 5

Platform information

System information

  • [ ] I am using the latest version from GitHub which I have manually compiled
  • [x] I am using the latest released stable version

Language: French Keyboard: English (US) - English (Dvorak intl., with dead keys) Location: Paris

Additional context

The testing system is installed on a small partition on a ThinkPad T470 laptop. Aside from specifying the language, keyboard, location, initial user, computer name, and the specific partition in which to install the system, all of the default settings were used during the installation. No Internet connection was used during the installation. The only system-wide changes which have been made after the installation are that the system is able to connect to the Internet via a wireless connection and that Screen Recorder has been installed via AppCentre.

Before this test was performed, the following steps were followed:

  1. All system components were updated via the blue “Update All” button in AppCentre.
  2. A new administrator user named “Essai” or “Essai 2” was created with the password “komalleana”.
  3. The current user was logged out and the new user was logged in.
  4. The old user was deleted, the screen resolution was set to 800x600 at 60 Hz, tap clicking was disabled, and the touchpad pointer speed was set to the maximal value.
  5. The computer was rebooted.
  6. The test user was logged in.

ghost avatar Jan 24 '20 20:01 ghost

The issue still persists on the newest version, though it only seems to happen when the appcenter has not yet loaded the actual updates page. In theory, maybe it could check how many there are when the appcenter first launches in the background?

hanaral avatar May 21 '20 18:05 hanaral

I can confirm this issue persists.

Julioevm avatar May 22 '20 07:05 Julioevm

There has been a PR merged that potentially improves/fixes this issue: https://github.com/elementary/appcenter/pull/1298

If anyone that can reproduce the issue is comfortable building and installing AppCenter from source using the instructions in the README and then rebooting, feel free to do so and report back on the results.

You can always re-install the stable/released version of AppCenter after doing this using the command: sudo apt install --reinstall appcenter

davidmhewitt avatar May 22 '20 08:05 davidmhewitt

I’ve been testing it, and it seems to be fixed. I will edit this if I find otherwise @davidmhewitt

Edit: It seems to still appear when I first open the appcenter, but the correct number appears shortly after. Would it be possible to not show the badge until the counter is at least 1?

hanaral avatar May 24 '20 16:05 hanaral

@davidmhewitt I have updated the comment

hanaral avatar May 31 '20 19:05 hanaral

I'm having a similar issue, but in my case the badge shows 1 update available even thought there are no updates. The issue persists even through reboots.

image

eliocamp avatar Jun 09 '20 15:06 eliocamp

@eliocamp Can you run AppCenter with debugging output by running the following commands and then copy and paste the output:

killall io.elementary.appcenter
G_MESSAGES_DEBUG=all io.elementary.appcenter

davidmhewitt avatar Jun 09 '20 16:06 davidmhewitt

Killing the app reseted the badge. Then it took a while to look for updates and now again it shows the 1 update badge even though there is no update listed. However, now closing the app does remove the Plank icon.

Here's the result: https://pastebin.com/8g41GrBU

eliocamp avatar Jun 09 '20 16:06 eliocamp

@eliocamp Great, that helps a lot, thanks.

It looks like there is a Flatpak update that AppCenter isn't able to show for some reason.

If you run flatpak update in the terminal, you should be able to clear it.

davidmhewitt avatar Jun 09 '20 16:06 davidmhewitt

Yes! It's now fixed. Thanks!

eliocamp avatar Jun 09 '20 19:06 eliocamp

Today it happened again and was also solved by running flatpack update.

eliocamp avatar Jun 10 '20 12:06 eliocamp

This should have been fixed by recent AppCenter updates. If it crops again again, feel free to comment and we can re-open.

cassidyjames avatar Dec 09 '20 17:12 cassidyjames

I'm still having some issues with the update indicator. Now when it does its auto update, it shows the notification on Plank, but with zero, even though the notification on the top right does display the correct number.

image image

Then, if I open AppCenter it updates again before showing me the actual updates and now Plank displays the correct number too.

eliocamp avatar Dec 18 '20 13:12 eliocamp

@eliocamp I'm not able to reproduce it, so I presume it is fixed in the Odin version.

hanaral avatar Dec 18 '20 13:12 hanaral

It's happening again on my stable odin install. @cassidyjames, please reopen this.

queeup avatar Aug 20 '21 09:08 queeup

@queeup can you provide more information about what happened before you experienced it again? Do you have a third-party Flatpak remote added? What shows up when you run flatpak update in Terminal?

cassidyjames avatar Aug 24 '21 21:08 cassidyjames

❯ LC_ALL=C flatpak remote-list 
Name        Options
appcenter   system
flathub     system
freedesktop system,filtered
appcenter   user
flathub     user

update_badge_bug

update_badge_bug2

queeup avatar Aug 24 '21 22:08 queeup

Same here on Odin

$ LC_ALL=C flatpak remote-list
Name        Options
appcenter   system
freedesktop system,filtered
appcenter   user
flathub     user

Gabriel-p avatar Sep 03 '21 12:09 Gabriel-p

Still happening in Horus

Captura de pantalla de 2023-02-22 08 47 45

Gabriel-p avatar Feb 22 '23 11:02 Gabriel-p

Still happening in Horus

Captura de pantalla de 2023-02-22 08 47 45

Can confirm this for Horus, too. After logging in it showed a red bubble with "0". Then opened appcenter and clicked that orange icon on the top. image

But I decided to not install the updates right now. Closed app center. Few seconds later, the count on the icon switched to "2"

spotlesscoder avatar Mar 04 '23 07:03 spotlesscoder