Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Electron Application Cannot find Squirrel

I am writing an Electron Application for Windows with auto update capabilities, using the autoUpdater API.

app.on('ready', function(){
  console.log('application emitted "ready"');

  var autoUpdater = require('auto-updater');

  autoUpdater.setFeedURL(releaseUrl);
  console.log('releaseUrl: ' + releaseUrl);

  autoUpdater
    .on('error', function(){
      console.log(arguments);
    })
    .on('checking-for-update', function() {
      console.log('Checking for update');
    })
    .on('update-available', function() {
      console.log('Update available');
    })
    .on('update-not-available', function() {
      console.log('Update not available');
      createWindow();
    })
    .on('update-downloaded', function() {
      console.log('Update downloaded');
    });

  autoUpdater.checkForUpdates();

});

So far the only event that I can get to fire is the error event and it logs out this message:

{ '0': [Error: Can not find Squirrel],
  '1': 'Can not find Squirrel' }

Am I supposed to install some Squirrel package? I cant find anything in the documentation about installing extra packages for Squirrel.

This is in electron v0.36.0

like image 814
tt9 Avatar asked Feb 07 '23 12:02

tt9


1 Answers

If your app isn't installed, calling out to Squirrel won't work. You need to have an installed app.

like image 84
Ana Betts Avatar answered Feb 10 '23 22:02

Ana Betts