Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taskbar icon not working #2627

Closed
Dominiquini opened this issue Sep 14, 2023 · 17 comments · Fixed by #2650
Closed

Taskbar icon not working #2627

Dominiquini opened this issue Sep 14, 2023 · 17 comments · Fixed by #2650
Labels
area/windows Windows kind/bug A bug in existing code (including security flaws) need/author-input Needs input from the original author need/maintainers-input Needs input from the current maintainer(s) topic/windows Windows specific

Comments

@Dominiquini
Copy link

  • OS: Windows 10 x64
  • Version of IPFS Desktop: 0.30.2

Describe the bug
I'm unable to right-click on the IPFS icon on the taskbar to quit the application. No menu appears. I'm only able to open the GUI with left-click!

To Reproduce
Steps to reproduce the behavior:

  1. Start IPFS
  2. Right-click on the icon on the taskbar
  3. Nothing happens!

Expected behavior
Menu with options should appear!

Screenshots

Additional context
The icon also don't change color when I'm connected!
The version 0.30.1 works fine!

combined.log
error.log

Thanks

@Dominiquini Dominiquini added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Sep 14, 2023
@welcome
Copy link

welcome bot commented Sep 14, 2023

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@yatounoneko
Copy link

yatounoneko commented Sep 16, 2023

Try to change C:\Users\<USER NAME FILE>\AppData\Roaming\IPFS Desktop\config.json language to "", is was work for me.

My guess is that this is another one of those bugs in the translation configuration.

  • Version 0.30.0 started to cause the tray menu to function in a confusing way, and the migration function didn't work.
  • Version 0.30.1 fixes the migration function, but still does not fix the tray menu language problem.
  • Version 0.30.2 fixes the default language(EN?) for tray menu, but use other languages cause prevent right-clicking icons.

Seems like the language system has been screwed up since version 0.30.0
#2600 FYI

@Azulan
Copy link

Azulan commented Sep 17, 2023

Try to change C:\Users\<USER NAME FILE>\AppData\Roaming\IPFS Desktop\config.json language to "", is was work for me.

My guess is that this is another one of those bugs in the translation configuration.

  • Version 0.30.0 started to cause the tray menu to function in a confusing way, and the migration function didn't work.
  • Version 0.30.1 fixes the migration function, but still does not fix the tray menu language problem.
  • Version 0.30.2 fixes the default language(EN?) for tray menu, but use other languages cause prevent right-clicking icons.

Seems like the language system has been screwed up since version 0.30.0 #2600 FYI

Worked for me.

@Dominiquini
Copy link
Author

Worked for me too!

Thanks.

@whizzzkid
Copy link
Contributor

Thanks for submitting this issue @Dominiquini and thanks for providing a resolution @Azulan, this sounds like the correct assumption. IPFS-Desktop started lazy-lazy loading app-context which makes the loads much more faster and reduces the amount of initial load tasks.

However, this transition has not been as smooth as we'd hoped for, especially on the taskbar issues as testing taskbar in a cross-env fashion is hard. Taskbar was not covered with tests and hence it has seen a regression. There is an issue to tracking this.

This issue is currently not reproducible on a mac, and maybe is limited to windows only. Based on the logs you provided, looks like i18n is not initializing properly (which is not the case on a mac):

2023-09-14T03:42:11.812Z info: [ctx] getting i18n.initDone
2023-09-14T03:42:11.812Z info: [ctx] Could not find property i18n.initDone
2023-09-14T03:42:11.812Z info: [launch on startup] disabled
2023-09-14T03:42:11.823Z error: [i18n] init failed

@SgtPooki I think there is a weird race condition (on windows) where the i18n is not being initialized properly.

@whizzzkid whizzzkid added area/windows Windows need/author-input Needs input from the original author need/maintainers-input Needs input from the current maintainer(s) topic/windows Windows specific and removed need/triage Needs initial labeling and prioritization labels Sep 18, 2023
@Azulan
Copy link

Azulan commented Sep 18, 2023

@whizzzkid to be clear, it was @yatounoneko who provided the work around and analysis. But thank you all for your hard work!

@whizzzkid
Copy link
Contributor

Thanks for the correction @Azulan, thanks @yatounoneko I confused the names

Thanks!

@SgtPooki
Copy link
Member

thanks for the clarification on ipfs-desktop versions and where you're seeing problems, also, providing the logs is super helpful.

I'll get on my windows machine today to start diving in, and possibly look into getting a remote windows VM that both @whizzzkid and I can look at when deploying & testing ipfs-desktop updates.

@SgtPooki
Copy link
Member

I was not able to reproduce this error on my windows 10 machine. Right clicking the taskbar icon works fine no matter what language I have selected.

  1. I tried changing languages and then right clicking: it works
  2. I tried changing languages and closing ipfs-desktop, re-opening, and then right clicking the icon: it works
  3. I tried pinning the icon to the task bar (instead of the windows task bar mini popout): it still works

I'm guessing an error is occurring on some machines preventing the systray menu from being set up properly.. but it's hard to find a solution if i can't reproduce.

@SgtPooki
Copy link
Member

note: I was able to attempt to right click the icon while ipfs-desktop was loading and the menu did not appear, but re-trying it after a few seconds (the status screen had JUST populated the bandwidth over time chart) and it worked.

This is an artifact of things loading faster, and UI being available before ready. The solution for this is probably blocking the systray from even appearing until everything is ready.

@whizzzkid
Copy link
Contributor

@SgtPooki can confirm, I am seeing a similar behaviour while using win11 in Parallels. It seems to work as expected.

parallels

@Dominiquini @yatounoneko can you please re-check and provide a better way to reproduce this error?

@yatounoneko
Copy link

yatounoneko commented Sep 24, 2023

@SgtPooki can confirm, I am seeing a similar behaviour while using win11 in Parallels. It seems to work as expected.

parallels @Dominiquini @yatounoneko can you please re-check and provide a better way to reproduce this error?

I don't know what language value in your C:\Users\<USER NAME FILE>\AppData\Roaming\IPFS Desktop\config.json config.
But I try to change config "language": "", to en or "" is normal, if change to en-US or zh-HK or zh-CN will get the GUI page normal and taskbar icon not working.

This case may be just affcet to update from 0.28.0 or before version user?

For my error config, you can apply this config to try ;)
OS: Windows 11 / Windows server 2019

{
	"ipfsConfig": {
		"type": "go",
		"path": "D:\\IPFS-DATA\\.ipfs",
		"flags": [
			"--agent-version-suffix=desktop",
			"--migrate",
			"--enable-pubsub-experiment"
		]
	},
	"language": "zh-HK",
	"experiments": {
		"pubsub": true,
		"pubsubNamesys": false
	},
	"binaryPath": "",
	"__internal__": {
		"migrations": {
			"version": "0.30.2"
		}
	},
	"automaticGC": false,
	"openWebUIAtLaunch": true,
	"daemonConfigRevision": 5,
	"window": {
		"width": 1131,
		"height": 630
	},
	"autoLaunch": true
}

@dysbulic
Copy link

I was seeing the same issue on Ubuntu, and setting language to the empty string fixed it.

@SgtPooki
Copy link
Member

SgtPooki commented Oct 4, 2023

@yatounoneko thanks for the extra info! it sounds like to reproduce, setting "language" to "en-US" should trigger the error.. retrying now

@SgtPooki
Copy link
Member

SgtPooki commented Oct 4, 2023

Heyo! reproduced by manually setting language to "en-US" in /Users/sgtpooki/Library/Application Support/IPFS Desktop/config.json

thanks all.. working on fix.

SgtPooki added a commit that referenced this issue Oct 5, 2023
i18next has some auto-magical loading of translation files that kicks
off loading multiple languages (e.g. 'en', 'en-US', 'en-UK', etc.) but
we don't have all of those files for IPFS-Desktop. i18next.init
will fire an error if any of those files fail to load, even if one
succeeds.

This fix ensures that `i18n.initDone` is set on context even if we see
an error.

fixes #2627
@SgtPooki
Copy link
Member

SgtPooki commented Oct 5, 2023

The fix is out: #2650. It's a super simple fix for an odd behavior from i18next: it shows an error when it cannot find a file for a language, even if it successfully resolves to a file for that language.

@SgtPooki
Copy link
Member

Note that this is still not released due to some failures with windows build in CI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/windows Windows kind/bug A bug in existing code (including security flaws) need/author-input Needs input from the original author need/maintainers-input Needs input from the current maintainer(s) topic/windows Windows specific
Projects
No open projects
Status: Done
6 participants