-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
qcif/data-curator
#563Labels
Description
- Version:
electron-builder 13.5.0
electron-updater 1.6.1
- Target:
Win x64
MacOS
It looks like appUpdater checks for app-update.yml
inside the electron dist/resources
folder. Without it you'll get an error like:
Error: Error: ENOENT: no such file or directory, open
'C:\Users\mike\AppData\Roaming\npm\node_modules\electron\dist\resources\app-update.yml'
This is problematic because if you install electron globally and use it to run applications using electron path/to/app
, you will need to change the file depending on which app you're running. Even if electron is installed locally you have to place the file in there to do any testing.
I would suggest first looking in the app folder that is running, and then falling back to the electron folder if not found. Or make it configurable so we can set the location.
FelikZ, liliakai, mbtakanov, cawa-93 and dolby360
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
develar commentedon Feb 14, 2017
auto-update supported only for installed applications. In the dev mode you should not use it. Please use https://github.com/sindresorhus/electron-is-dev to check.
Anyway — PR will be accepted.
mikecao commentedon Feb 14, 2017
Ok, I was able to get it to work by adding this to my code:
The reason I need to run it in dev is because my application allows the user to trigger the update check manually, so I need to make sure that everything is working. Thanks for the great work on this project.
develar commentedon Feb 14, 2017
@mikecao How does it work on macOS where code sign is required?
develar commentedon Feb 14, 2017
Ah, I see that your error about windows (where code sign will be required later ;) if exe is signed).
mikecao commentedon Feb 14, 2017
@develar I haven't tested macOS yet but plan to soon. I'll let you know if I run into any issues.
It is fine if the install part doesn't work because I can always build an installer and test that. But during dev I need to make sure I can at least trigger the update check and perform the download. So far it's working on Windows. When I exit my dev application, it installs the application update externally, so dev doesn't actually get the update, but that's ok.
develar commentedon Feb 14, 2017
Too many complains. Reconsidered to be fixed.
mikecao commentedon Feb 14, 2017
@develar You're right, code signing does cause a problem. I tested macOS and got the error,
Could not get code signature for running application
. I assume the same thing will happen when Windows signing is required.I think my workaround is good enough for now since it allows me to at least test the update request. This probably doesn't need a fix. But It might be helpful to update the wiki to tell people they need to manually copy the
app-update.yml
after building if they want to test in dev. Or load it themselves usingupdateConfigPath
.mikecao commentedon Feb 14, 2017
Maybe something like this will work?
Production can still use the
app-update.yml
file while in dev you will have to configure it manually.develar commentedon Apr 10, 2017
In the next version file
dev-app-update.yml
will be searched in theapp path
in a dev mode. Prefixdev-
is used to make it clear, that file only for a dev mode.feat(electron-updater): Location of app-update.yml in the dev mode