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

[ERR_ASSERTION]: host must be a valid HTTPS URL when using ElectronPublicUpdateService #155

Open
fttx opened this issue Jul 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@fttx
Copy link

fttx commented Jul 18, 2024

This code:

updateElectronApp({
    updateSource: {
        type: UpdateSourceType.ElectronPublicUpdateService,
        repo: 'owner/repo',
    },
})

is causing this error:

Uncaught Exception:
AssertionError [ERR_ASSERTION]: host must be a valid HTTPS URL
at validateInput (/myapp/electron/dist/mac-arm64/myapp.app/Contents/Resources/app.asar/node_modules/update-electron-app/dist/index.js:141:34)
at updateElectronApp (/myapp/electron/dist/mac-arm64/myapp.app/Contents/Resources/app.asar/node_modules/update-electron-app/dist/index.js:26:22)
at UpdateHandler.doUpdate (/myapp/electron/dist/mac-arm64/myapp.app/Contents/Resources/app.asar/bin/handlers/update.handler.js:53:9)
at IpcMainImpl.<anonymous> (/myapp/electron/dist/mac-arm64/myapp.app/Contents/Resources/app.asar/bin/handlers/update.handler.js:32:60)
at IpcMainImpl.emit (events.js:376:20)
at Object.<anonymous> (electron/js2c/browser_init.js:161:9959)
at Object.emit (events.js:376:20)

That means that it is failing to set the default value for the host parameter, in fact, when setting it to host: "https://update.electronjs.org" it goes away.

@erickzhao erickzhao added the bug Something isn't working label Jul 18, 2024
@erickzhao erickzhao self-assigned this Jul 18, 2024
@Bug-Reaper
Copy link

Bug-Reaper commented Jul 30, 2024

@fttx Thanks for making an issue, just bumped into this and got stuck!

@erickzhao Do you know if it matters what website the host is? Trying to figure out what is the purpose of a host-url is when we're just pointing at a GH repo?

tomas-javurek added a commit to ScreenSaverGallery/windows that referenced this issue Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants