Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSIS autoUpdater.setFeedURL throws error #1105

Closed
tvanro opened this issue Jan 12, 2017 · 5 comments · May be fixed by qcif/data-curator#563
Closed

NSIS autoUpdater.setFeedURL throws error #1105

tvanro opened this issue Jan 12, 2017 · 5 comments · May be fixed by qcif/data-curator#563

Comments

@tvanro
Copy link

tvanro commented Jan 12, 2017

  • 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)
@develar develar closed this as completed Jan 12, 2017
@develar
Copy link
Member

develar commented Jan 12, 2017

Hmm... it seems if you set as string, we should just update url in the default publish configuration. Reopened — usability issue.

@develar develar reopened this Jan 12, 2017
@develar
Copy link
Member

develar commented Jan 12, 2017

BTW, generic provider supports channel — you can set channel to beta and file beta.yml will be generated/requested instead of default latest.yml (default channel name latest).

You can use --em.build.publish.channel=beta to inject.

@tvanro
Copy link
Author

tvanro commented Jan 12, 2017

Ok, got it. Thank you so much for your reply (and this great package!)

@develar
Copy link
Member

develar commented Jan 12, 2017

You can expect that this issue will be fixed next week (or earlier), after #1089.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants