Skip to content
This repository has been archived by the owner on Jun 9, 2019. It is now read-only.

TypeError: Cannot read property 'autoUpdater' of undefined at install #19

Closed
manosim opened this issue Jun 2, 2016 · 1 comment
Closed

Comments

@manosim
Copy link
Contributor

manosim commented Jun 2, 2016

Hello! When I'm trying to use updater.install() but it seems that updater is undefined. Here you can find the source code.

Details

  • Electron 1.0.2
  • electron-gh-releases 2.0.3 (Also tried 2.0.2)

Source Code

const updater = new GhReleases(autoUpdateOptions);

updater.on('error', (event, message) => {
  console.log('ERRORED.');
  console.log('Event: ' + JSON.stringify(event) + '. MESSAGE: ' + message);
});

updater.on('update-downloaded', (info) => {
  console.log('Update downloaded');
  confirmAutoUpdate(updater.install);
});

The Error

Uncaught Exception:
TypeError: Cannot read property 'autoUpdater' of undefined
    at install (/Applications/Gitify.app/Contents/Resources/app.asar/node_modules/electron-gh-releases/GhReleases.js:197:11)
    at Function.<anonymous> (/Applications/Gitify.app/Contents/Resources/app.asar/main.js:45:9)

Screenshots

The value of updater:
screen shot 2016-06-02 at 13 44 17

The error:
screen shot 2016-06-02 at 13 44 26

Update

It looks like it is actually updating the app but it still throws that error

@manosim
Copy link
Contributor Author

manosim commented Jun 2, 2016

Looks like the problem was that I had to pass the updater object instead of the updater.install function. Works great now!

@manosim manosim closed this as completed Jun 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant