Skip to content

NSIS autoUpdater.setFeedURL throws error  #1105

@tvanro

Description

@tvanro
  • electron-builder: 11.2.4
  • electron-auto-updater: 0.10.1
  • Target: win32

We have separate release channels based on the configuration of the user (beta|stable).
Using the "hardcoded" configuration on package.json works fine but when we try to change the feed with autoUpdater.setFeedurl("") it throws an error.

package.json

"build": {
  "appId": "app.test",
  "win": {
    "target": "nsis",
    "signingHashAlgorithms": "sha256",
    "certificateFile": ".certs/testcert.pfx",
    "certificatePassword": "123456789"
  },
  "publish": {
    "provider": "generic",
    "url": "https://releases.test.com/channels/stable"
  }
},

main.js

...
mainWindow.webContents.once("did-frame-finish-load", function(event) {
  dialog.showMessageBox(mainWindow, {title: "autoUpdater", message: 'checking for updates....'});
  autoUpdater.setFeedURL('https://releases.test.com/channels/beta'); // throws error
  autoUpdater.checkForUpdates();
})
...

error

...\resources\electron.asar\renderer\api\remote.js:217 Uncaught Error: Could not call remote function ''. Check that the function signature is correct. Underlying error: Please pass PublishConfiguration object
Error: Could not call remote function ''. Check that the function signature is correct. Underlying error: Please pass PublishConfiguration object
    at callFunction (...\resources\electron.asar\browser\rpc-server.js:235:11)
    at EventEmitter.<anonymous> (...\resources\electron.asar\browser\rpc-server.js:342:5)
    at emitMany (events.js:127:13)
    at EventEmitter.emit (events.js:201:7)
    at WebContents.<anonymous> (...\resources\electron.asar\browser\api\web-contents.js:231:13)
    at emitTwo (events.js:106:13)
    at WebContents.emit (events.js:191:7)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions