yubioath-flutter icon indicating copy to clipboard operation
yubioath-flutter copied to clipboard

Where's the window? Gnome on Debian 12 bookworm

Open eshattow opened this issue 1 year ago • 5 comments

Hello, I ran a few times and used yubico-authenticator successfully, there was an icon in the Gnome launcher bar and everything worked great with my YubiKey device. However after these few times there is now no UI displayed when I run:

$ ./authenticator 
23:02:30.512 [desktop.init] INFO: Logging initialized, outputting to stderr
23:02:30.514 [desktop.init] INFO: Starting Helper subprocess: /home/es/software/other/yubioath-desktop-main-linux/helper/authenticator-helper
23:02:30.517 [desktop.init] INFO: Helper process started

(authenticator:6954): libayatana-appindicator-CRITICAL **: 23:02:30.520: app_indicator_set_menu: assertion 'IS_APP_INDICATOR (self)' failed

(authenticator:6954): Gtk-CRITICAL **: 23:02:30.672: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
23:02:30.773 [helper.ykman.logging] INFO: Logging at level: INFO
23:02:30.773 [helper.helper.device] INFO: Log level set to: INFO
23:02:30.773 [desktop.init] INFO: Helper log level set
23:02:31.518 [desktop.devices] INFO: USB state change
{"data":{"state":5740354900026072187,"pids":{}},"actions":["get","scan"],"children":{}}
23:02:31.518 [desktop.devices] INFO: USB state updated, unaccounted for: {}

I do not see any visible window, and there's nothing in the Gnome launcher bar. When run with the YubiKey device inserted the output is slightly different, but there is no visible UI. Checking the window list from ALT+F2,'lg' there's none listed. What's wrong with it?

eshattow avatar Apr 22 '23 06:04 eshattow

Hi, I cannot reproduce this, could you provide more information? Which exact version on bookworm are you running?

To integrate Yubico Authenticator with linux desktop environment execute ./desktop_integration.sh -i from the archive. Doing this will update Gnome .desktop file to point to the app in the directory where you executed the script. Note that if you move the directory, the .desktop will point to a wrong location and it will not be possible to run the app through the Gnome launcher. To fix this, just rerun ./desktop_integration.sh -i from the authenticator directory.

The application stores some preferences in ~/.local/share/authenticator/shared_preferences.json. Could you try to delete the file and restart the app to see if you still get the same issue?

AdamVe avatar Apr 24 '23 15:04 AdamVe

Update: For my case, I got the reason. When I close the UI via Command+W the UI is hidden not closed and the icon disappears from the dock. Then when I clicked the app icon from Launchpad, nothing happened. Even if I force quit the app from Activity Monitor, when I reopen the app, the app is hidden by default. Finally, I notice the icon on the status menu bar and have an option Show window. I think Commend+W should have the same behavior when I click the close button since the app only has one window.

image


Hi @AdamVe, ~~The same behavior on macOS, the app was auto-updated to 6.2.0 by the app store. macOS version is 13.3.1. When I reinstall it from the app store, the UI can be opened successfully several times.~~

~~I also deleted /var/db/receipts/com.yubico.yubioath.bom and /var/db/receipts/com.yubico.yubioath.plist, but still not work.~~

~~Do you know where it stores preferences on macOS? Thanks.~~

kozzzx avatar Apr 26 '23 11:04 kozzzx

Hi @kozzzx, thanks for the update, I was just writing reply about the tray icon :). We are going to review this!

Btw, the file which holds the preferences on Mac OS is $HOME/Library/Containers/com.yubico.yubioath/Data/Library/Preferences/com.yubico.yubioath.plist

AdamVe avatar Apr 26 '23 12:04 AdamVe

The application stores some preferences in ~/.local/share/authenticator/shared_preferences.json. Could you try to delete the file and restart the app to see if you still get the same issue?

Contents of existing file are:

{"flutter.DESKTOP_WINDOW_WIDTH":400.0,"flutter.DESKTOP_WINDOW_HEIGHT":720.0,"flutter.DESKTOP_WINDOW_LEFT":10.0,"flutter.DESKTOP_WINDOW_TOP":10.0,"flutter.APP_STATE_THEME":"light","flutter.DESKTOP_WINDOW_HIDDEN":true}

Removing that file and starting authenticator works, the window appears.

So this is some hidden window problem. I don't see any tray icon in Gnome 43 for authenticator, and it was not in the window list when minimized. Confirming this is very much like @kozzzx is reporting however in Gnome there is no click-and-point way to recover from it (when this happens), starting a new process of authenticator will basically not create any window to interact with if in the preferences the state is saved as hidden, so nothing ever happens. Normally in Gnome though the launcher icon for the running process of authenticator if it did start normally and was later minimized, this is enough to get the window to show. I'm not sure how it got into that invalid state, having trouble to reproduce this now.

eshattow avatar Apr 26 '23 13:04 eshattow

Hey, I don't want to muddy the waters with this, but I came across something I thought I should point out in case it's helpful or relevant. I don't know much about GObjects or GNOME, I should add.

I came across the same errors, similar to

(authenticator:6954): libayatana-appindicator-CRITICAL **: 23:02:30.520: app_indicator_set_menu: assertion 'IS_APP_INDICATOR (self)' failed

I was looking to fix another, unrelated issue, but ended up discovering this issue filed in the libayatana-appindicator repository, which says the macro was renamed from IS_APP_INDICATOR to APP_IS_INDICATOR.

I have no clue what, if any, issues this causes, or how that macro effects the tray or icons, if at all. BUT! It seems like a fairly straightforward thing to fix, so if nothing else, maybe fixing it removes some noise at worst, at best, fixes unexpected side effects/issues? If I'm being honest, I'm having a hard time digging in to see where libayatana-appindicator's app_indicator_set_menu function is referenced. It's possible that I'm mistaken, and any issues originate with the lib/dependency?

acidDrain avatar Jul 14 '23 16:07 acidDrain