question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

checkForUpdates() with dev-app-update.yml returns null result instead of expected object

See original GitHub issue
  • Electron-Builder Version: 22.14.13
  • Node Version: 14.17.6
  • Electron Version: 17.4.0
  • Electron Type (current, beta, nightly): current
  • Target: Unpackaged/DEV (but running on Windows)

We have a code like below and I’ve confirmed the path is correct and that the dev-app-update.yml points to our S3 bucket, but the updateCheckResult is always null. Shouldn’t we be receiving the proper versionInfo and updateInfo in an object?

I’ve already confirmed that the updater works outside of DEV, so why null result in DEV? This did not used to be the behavior but I don’t know when it changed. We haven’t touched our code or changed our update bucket path in ages.

autoUpdater.updateConfigPath = path.join(
    __dirname,
    'dev-app-update.yml'
);

autoUpdater
    .checkForUpdates()
    .then(updateCheckResult => {
        handleUpdateCheckResult(updateCheckResult);
    })

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8

github_iconTop GitHub Comments

6reactions
mmaiettacommented, May 30, 2022

Yes, I see that behavior specified here: https://github.com/electron-userland/electron-builder/blob/db0754805b4d6c5d8a4d86af7cb107db87bda303/packages/electron-updater/src/AppUpdater.ts#L252-L255

I wasn’t aware that previously it could still be used locally without packaging the app. The isUpdaterActive check was moved into checkForUpdates due to users reporting error logs that it was checking for a non-existent update file. This was most notable for any distributable that doesn’t support auto-update

Not sure what we should do. Seems like the warning log message needs to be updated, and it seems reasonable that we allow dev-app-update.yml to be usable. Can we use a different flag, or add an arg to checkForUpdates(forceDev = false) { ... } with default false?

3reactions
DogFoxXcommented, May 24, 2022

I also get Skip checkForUpdatesAndNotify because application is not packed although I’m calling autoUpdater.checkForUpdates(). I have dev-app-update.yml in root, and running

function isDev() {
   return !app.isPackaged;
};

if (isDev()) {
   autoUpdater.checkForUpdates();
};

doesn’t change a thing.

Currently on v5.0.1, didn’t have this issue previously on v4.6.5. I really don’t want to package my app every time just to test updates.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - @Value in Springboot returns null
Check out SpringBoot's configuration proeprties to bind external properties to an Object that can be passed. Its cleaner than using @Value ...
Read more >
Function returning null instead of expected value
I am using SQL Developer version 3.2.20.09. When I run a certain custom standalone function, I get a null result instead of the...
Read more >
Calculated Field Returns Null Results | Tableau Software
Calculated fields return NULL or blank values instead of expected results ... containing a field with a NULL value may return NULL values....
Read more >
Script Include returning null for a user who is no...
If the new value within 'Category' field is loading or empty or has not changed, then exit this Client Script
Read more >
How to Avoid Returning Null from a Method
Instead, method was executed successfully but the result is not any particular object that might have been expected. Simply put, the result ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found