Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

JavaScript error shown when using electron 7+ and --tray option (every website) #903

Closed
leinardi opened this issue Feb 16, 2020 · 2 comments · Fixed by #898
Closed

JavaScript error shown when using electron 7+ and --tray option (every website) #903

leinardi opened this issue Feb 16, 2020 · 2 comments · Fixed by #898

Comments

@leinardi
Copy link
Contributor

leinardi commented Feb 16, 2020

Description

The API tray.setHighlightMode(mode) has been be removed in electron v7.0 without replacement.
This causes the display of an error dialog every time an app is shown/hidden if the parameter --tray is used when nativefying. This is completely independent form the website you are nativefying and it happens with all the version of electron after 6.x.

image

source: https://www.electronjs.org/docs/api/breaking-changes#tray
similar fix: https://github.com/maxogden/menubar/pull/250/files#diff-332a438bdcfb7b2a05a4978d1cc7fce7L101

Steps to reproduce issue

  1. nativefy any webside using an electron-version 7+ and the tray parameter
  2. hide or show the app windows

Details

  • Are you nativefying a public website? Yes, and the problem happens with every website
  • Full nativefier command used to build your app: nativefier --name "Google" --platform linux --arch x64 --electron-version 8.0.1 --tray --single-instance --honest https://www.google.com
  • Version of Nativefier (run nativefier --version): 7.7.1
  • Version of node.js (run node --version): v10.15.2
  • OS: Ubuntu 19.10
  • Error message / stack trace (if any): nothing shown in console, see screenshot above
leinardi added a commit to leinardi/nativefier that referenced this issue Feb 16, 2020
… --tray option

The API `tray.setHighlightMode(mode)` has been be removed in electron v7.0
without replacement.
This causes the display of an error dialog every time an app is
shown/hidden if the parameter `--tray` is used when nativefying. This is
completely independent form the website you are nativefying and it
happens with all the version of electron after 6.x.
@ronjouch ronjouch linked a pull request Feb 16, 2020 that will close this issue
5 tasks
@ronjouch
Copy link
Contributor

Yeah. This is fixed in #898, which will be merged soon. Thanks for the feedback!

@leinardi
Copy link
Contributor Author

Awesome! But please consider merging #904 if a new hotfix for 7.7 will be released.

Adam777Z pushed a commit to Adam777Z/nativefier that referenced this issue Nov 9, 2022
…tivefier#904)

The API `tray.setHighlightMode(mode)` has been be removed in electron v7.0
without replacement.

This causes the display of an error dialog every time an app is
shown/hidden if the parameter `--tray` is used when nativefying. This is
completely independent form the website you are nativefying and it
happens with all the version of electron after 6.x.

Source: https://www.electronjs.org/docs/api/breaking-changes#tray
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants