I use nativefier to create an application out of my Home Assistant webpage. This worked very well for the ~ last two years.
Today I updated nativefier to version v43.1.0 by running npm install -g nativefier. After that I recreated my two applications with the following command
nativefier --name "My Application" --icon "D:\Nativefier\Home_Assistant_Logo.ico" --maximize "https://my.domain.com"
After launching the applications, I was logged out of my instance. That never happend before after an update. I logged in again, but on reloading the page or closing the app and reopen it, I was logged out again. This happens every single time.
nativefier --verbose --name "Google" --icon "D:\Nativefier\Home_Assistant_Logo.ico" --maximize "https://google.com"
PS D:\Nativefier> nativefier --verbose --name "Google" --icon "D:\Nativefier\Home_Assistant_Logo.ico" --maximize "https://google.com"
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 12.0.6 / 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 Google from options. No inferring needed
Sanitized filename for Google : Google
Associated electron v12.0.6 to chrome v89.0.4389.128
Given chrome 89.0.4389.128 on win32, using user agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36options {
packager: {
appCopyright: undefined,
appVersion: undefined,
arch: 'x64',
asar: false,
buildVersion: undefined,
darwinDarkModeSupport: false,
dir: 'C:\\Users\\User\\scoop\\persist\\nvm\\nodejs\\v12.22.1\\node_modules\\nativefier\\app',
electronVersion: '12.0.6',
icon: 'D:\\Nativefier\\Home_Assistant_Logo.ico',
name: 'Google',
out: 'D:\\Dev\\HomeAutomation\\Nativefier',
overwrite: true,
platform: 'win32',
portable: false,
targetUrl: 'https://google.com/',
tmpdir: false,
upgrade: false,
upgradeFrom: undefined,
win32metadata: {
ProductName: 'Google',
InternalName: 'Google',
FileDescription: 'Google'
}
},
nativefier: {
accessibilityPrompt: true,
alwaysOnTop: false,
backgroundColor: null,
basicAuthPassword: null,
basicAuthUsername: null,
blockExternalUrls: false,
bookmarksMenu: null,
bounce: false,
browserwindowOptions: undefined,
clearCache: false,
counter: false,
crashReporter: undefined,
disableContextMenu: undefined,
disableDevTools: undefined,
disableGpu: false,
diskCacheSize: null,
disableOldBuildWarning: false,
enableEs3Apis: false,
fastQuit: false,
fileDownloadOptions: undefined,
flashPluginDir: null,
fullScreen: false,
globalShortcuts: null,
hideWindowFrame: undefined,
ignoreCertificate: false,
ignoreGpuBlacklist: false,
inject: [],
insecure: false,
internalUrls: null,
lang: undefined,
maximize: true,
nativefierVersion: '43.1.0',
processEnvs: undefined,
proxyRules: null,
showMenuBar: false,
singleInstance: false,
titleBarStyle: null,
tray: false,
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36',
userAgentOverriden: false,
verbose: true,
versionString: undefined,
width: 1280,
height: 800,
minWidth: undefined,
minHeight: undefined,
maxWidth: undefined,
maxHeight: undefined,
widevine: false,
x: undefined,
y: undefined,
zoom: 1
}
}
Preparing Electron app...
Copying electron app from C:\Users\User\scoop\persist\nvm\nodejs\v12.22.1\node_modules\nativefier\app to C:\Users\User\AppData\Local\Temp\nativefier-1-24-48-app--20824-HhZ8NZAIFGP4
Writing app config to C:\Users\User\AppData\Local\Temp\nativefier-1-24-48-app--20824-HhZ8NZAIFGP4\nativefier.json
No files to inject, skipping copy.
Updating C:\Users\User\AppData\Local\Temp\nativefier-1-24-48-app--20824-HhZ8NZAIFGP4\package.json 'name' field to google-nativefier-236660
Converting icons...
Building for Windows and icon is already a .ico, no conversion needed
Copying icons if necessary
Copying icon D:\Nativefier\Home_Assistant_Logo.ico to C:\Users\User\AppData\Local\Temp\nativefier-1-24-48-app--20824-HhZ8NZAIFGP4\icon.ico
Packaging... This will take a few seconds, maybe minutes if the requested Electron isn't cached yet...
electron-packager Electron Packager 15.2.0
electron-packager Node v12.22.1
electron-packager Host Operating system: win32 10.0.19043 (x64) +0ms
electron-packager Packager Options: {"arch":"x64","asar":false,"darwinDarkModeSupport":false,"dir":"C:\\Users\\User\\AppData\\Local\\Temp\\nativefier-1-24-48-app--20824-HhZ8NZAIFGP4","electronVersion":"12.0.6","icon":"D:\\Nativefier\\Home_Assistant_Logo.ico","name":"Google","out":"D:\\Dev\\HomeAutomation\\Nativefier","overwrite":true,"platform":"win32","portable":false,"targetUrl":"https://google.com/","tmpdir":false,"upgrade":false,"win32metadata":{"ProductName":"Google","InternalName":"Google","FileDescription":"Google"}} +1ms
electron-packager Target Platforms: win32 +1ms
electron-packager Target Architectures: x64 +1ms
electron-packager Requiring author in package.json, as CompanyName was not specified for win32metadata +0ms
electron-packager Inferring appVersion from version in C:\Users\User\AppData\Local\Temp\nativefier-1-24-48-app--20824-HhZ8NZAIFGP4\package.json +20ms
electron-packager Inferring win32metadata.CompanyName from author in C:\Users\User\AppData\Local\Temp\nativefier-1-24-48-app--20824-HhZ8NZAIFGP4\package.json +1ms
electron-packager Application name: Google +22ms
electron-packager Target Electron version: 12.0.6 +1ms
electron-packager Ignored path regular expressions: [
'/package-lock\\.json$',
'/yarn\\.lock$',
'/\\.git($|/)',
'/node_modules/\\.bin($|/)',
'\\.o(bj)?$'
] +0ms
electron-packager Downloading Electron with options {"platform":"win32","arch":"x64","version":"12.0.6","artifactName":"electron"} +0ms
Packaging app for platform win32 x64 using electron v12.0.6
electron-packager Creating D:\Nativefier\win32-x64-template +7ms
electron-packager Extracting C:\Users\User\AppData\Local\electron\Cache\739809e58a9d0011b22ab70d11516a49a099dadf81ec40aabf349af3c1154da6\electron-v12.0.6-win32-x64.zip to D:\Nativefier\win32-x64-template +2ms
electron-packager Initializing app in D:\Nativefier\Google-win32-x64 from D:\Nativefier\win32-x64-template template +0ms
electron-packager Ignored paths based on the out param: [
'D:\\Nativefier\\Google-darwin-x64',
'D:\\Nativefier\\Google-darwin-arm64',
'D:\\Nativefier\\Google-linux-ia32',
'D:\\Nativefier\\Google-linux-x64',
'D:\\Nativefier\\Google-linux-armv7l',
'D:\\Nativefier\\Google-linux-arm64',
'D:\\Nativefier\\Google-linux-mips64el',
'D:\\Nativefier\\Google-mas-x64',
'D:\\Nativefier\\Google-mas-arm64',
'D:\\Nativefier\\Google-win32-ia32',
'D:\\Nativefier\\Google-win32-x64',
'D:\\Nativefier\\Google-win32-arm64'
] +2s
electron-packager Renaming electron.exe to Google.exe in D:\Nativefier\Google-win32-x64 +47ms
electron-packager Running rcedit with the options {"version-string":{"FileDescription":"Google","InternalName":"Google","OriginalFilename":"Google.exe","ProductName":"Google","CompanyName":"Jia Hao"},"file-version":"1.0.0","product-version":"1.0.0","icon":"D:\\Nativefier\\Home_Assistant_Logo.ico"} +0ms
Finalizing build...
App built to D:\Nativefier\Google-win32-x64, move to wherever it makes sense for you and run the contained .exe file.
Stay logged in like in the versions before.
I don't stay logged in with the current version.
Homework
nativefier --helpand https://github.com/nativefier/nativefier/blob/master/docs/api.mdBug description
I use nativefier to create an application out of my Home Assistant webpage. This worked very well for the ~ last two years.
Today I updated nativefier to version v43.1.0 by running
npm install -g nativefier. After that I recreated my two applications with the following commandAfter launching the applications, I was logged out of my instance. That never happend before after an update. I logged in again, but on reloading the page or closing the app and reopen it, I was logged out again. This happens every single time.
When I downgrade to v43.0.2 via
npm install -g nativefier@43.0.2everything works fine again. I'm even logged in after recompiling and opening the application (without any login).Steps to reproduce
Give your full nativefier command and its logs, with the
--verboseflag, on a public site:Expected behavior
Stay logged in like in the versions before.
Actual behavior
I don't stay logged in with the current version.
Debug info
none
Context
Last working: 43.0.2
First broken: 43.1.0