Nativefier: Windows 10: {Taskbar, Notification} app name displays function code string and Electron icon

Created on 27 Aug 2020  路  1Comment  路  Source: jiahaog/nativefier

Homework

Bug description

*Edit: After reboot of system Icon was updated. Name is still incorrect.

The properties icon and name when right clicking on the Windows 10 taskbar is incorrect

the application name is shown as a function string:

function(str) {
  if (arguments.length === 0) return this._name;
  this._name = str;
  return this;
}

Picture:
image

Steps to reproduce

Run nativefier on a Home assistant instance:

nativefier https://hass.example.tld -n "Home Assistant" --win32metadata "{\"ProductName\":\"Home Assistant\",\"InternalName\":\"Home Assistant\",\"FileDescription\":\"Home Assistant in an Electron App\"}" --tray --single-instance -i ./out.ico`

or just

nativefier https://hass.example.tld`

Run the nativefied application

Right click on the taskbar icon


verbose build output

C:\Users\Dugite code>nativefier https://hass.example.tld --verbose -n "Home Assistant" --win32metadata "{\"ProductName\":\"Home Assistant\",\"InternalName\":\"Home Assistant\",\"FileDescription\":\"Home Assistant in an Electron App\"}" --tray --single-instance -i ./out.ico
Running in verbose mode! This will produce a mountain of logs and is recommended only for troubleshooting or if you like Shakespeare.

Performing async options post-processing.
Inferring user agent for electron 9.2.0 / win32
Grabbing electron<->chrome versions file from https://atom.io/download/atom-shell/index.json
Got icon from options. Using it, no inferring needed
Got name Home Assistant from options. No inferring needed
Sanitized filename for Home Assistant : Home Assistant
Associated electron v9.2.0 to chrome v83.0.4103.122
Given chrome 83.0.4103.122 on win32, using user agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.122 Safari/537.36

Preparing Electron app...
Copying electron app from C:\Users\Dugite code\AppData\Roaming\npm\node_modules\nativefier\app to C:\Users\DUGITEC~1\AppData\Local\Temp\nativefier-11-53-6-app--1904-rv7JixWY0pxn
Writing app config to C:\Users\DUGITEC~1\AppData\Local\Temp\nativefier-11-53-6-app--1904-rv7JixWY0pxn\nativefier.json
No files to inject, skipping copy.
Updating C:\Users\DUGITEC~1\AppData\Local\Temp\nativefier-11-53-6-app--1904-rv7JixWY0pxn\package.json 'name' field to home-assistant-nativefier-787f8b

Converting icons...
Building for Windows and icon is already a .ico, no conversion needed

Packaging... This will take a few seconds, maybe minutes if the requested Electron isn't cached yet...
  electron-packager Electron Packager 15.1.0
  electron-packager Node v13.7.0
  electron-packager Host Operating system: win32 10.0.18363 (x64) +0ms
  electron-packager Packager Options: {"arch":"x64","asar":false,"darwinDarkModeSupport":false,"dir":"C:\\Users\\DUGITEC~1\\AppData\\Local\\Temp\\nativefier-11-53-6-app--1904-rv7JixWY0pxn","electronVersion":"9.2.0","icon":"./out.ico","name":"Home Assistant","out":"C:\\Users\\Dugite code","overwrite":true,"platform":"win32","targetUrl":"https://hass.example.tld/","tmpdir":false,"win32metadata":{"ProductName":"Home Assistant","InternalName":"Home Assistant","FileDescription":"Home Assistant in an Electron App"}} +0ms
  electron-packager Target Platforms: win32 +3ms
  electron-packager Target Architectures: x64 +0ms
  electron-packager Requiring author in package.json, as CompanyName was not specified for win32metadata +0ms
  electron-packager Inferring appVersion from version in C:\Users\DUGITEC~1\AppData\Local\Temp\nativefier-11-53-6-app--1904-rv7JixWY0pxn\package.json +7ms
  electron-packager Inferring win32metadata.CompanyName from author in C:\Users\DUGITEC~1\AppData\Local\Temp\nativefier-11-53-6-app--1904-rv7JixWY0pxn\package.json +2ms
  electron-packager Application name: Home Assistant +10ms
  electron-packager Target Electron version: 9.2.0 +1ms
  electron-packager Ignored path regular expressions: [ '/\\.git($|/)', '/node_modules/\\.bin($|/)', '\\.o(bj)?$' ] +0ms
  electron-packager Downloading Electron with options {"platform":"win32","arch":"x64","version":"9.2.0","artifactName":"electron"} +0ms
Packaging app for platform win32 x64 using electron v9.2.0
  electron-packager Creating C:\Users\Dugite code\win32-x64-template +5ms
  electron-packager Extracting C:\Users\Dugite code\AppData\Local\electron\Cache\httpsgithub.comelectronelectronreleasesdownloadv9.2.0electron-v9.2.0-win32-x64.zip\electron-v9.2.0-win32-x64.zip to C:\Users\Dugite code\win32-x64-template +2ms
  electron-packager Initializing app in C:\Users\Dugite code\Home Assistant-win32-x64 from C:\Users\Dugite code\win32-x64-template template +0ms
  electron-packager Ignored paths based on the out param: [
  'C:\\Users\\Dugite code\\Home Assistant-darwin-x64',
  'C:\\Users\\Dugite code\\Home Assistant-darwin-arm64',
  'C:\\Users\\Dugite code\\Home Assistant-linux-ia32',
  'C:\\Users\\Dugite code\\Home Assistant-linux-x64',
  'C:\\Users\\Dugite code\\Home Assistant-linux-armv7l',
  'C:\\Users\\Dugite code\\Home Assistant-linux-arm64',
  'C:\\Users\\Dugite code\\Home Assistant-linux-mips64el',
  'C:\\Users\\Dugite code\\Home Assistant-mas-x64',
  'C:\\Users\\Dugite code\\Home Assistant-mas-arm64',
  'C:\\Users\\Dugite code\\Home Assistant-win32-ia32',
  'C:\\Users\\Dugite code\\Home Assistant-win32-x64',
  'C:\\Users\\Dugite code\\Home Assistant-win32-arm64'
] +2s
  electron-packager Renaming electron.exe to Home Assistant.exe in C:\Users\Dugite code\Home Assistant-win32-x64 +52ms
  electron-packager Running rcedit with the options {"version-string":{"FileDescription":"Home Assistant in an Electron App","InternalName":"Home Assistant","OriginalFilename":"Home Assistant.exe","ProductName":"Home Assistant","CompanyName":"Jia Hao"},"file-version":"1.0.0","product-version":"1.0.0","icon":"./out.ico"} +0ms

Finalizing build...
Copying icons if necessary
Copying icon ./out.ico to C:\Users\Dugite code\Home Assistant-win32-x64\resources\app\icon.ico
App built to C:\Users\Dugite code\Home Assistant-win32-x64

C:\Users\Dugite code>

Context

  • Nativefier: 9.2.0
  • Node.js: v13.7.0
  • Npm: 6.13.6
  • OS: Windows 10 build 1909
bug windows

Most helpful comment

https://github.com/jiahaog/nativefier/issues/1050 notes that the text of Notifications are affected too:

notification with function code

>All comments

https://github.com/jiahaog/nativefier/issues/1050 notes that the text of Notifications are affected too:

notification with function code

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DougBeney picture DougBeney  路  5Comments

mklaber picture mklaber  路  5Comments

luco picture luco  路  4Comments

shnbhg picture shnbhg  路  5Comments

desimaniac picture desimaniac  路  4Comments