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

Unable to publish when setting endpoint url to CloudFront #2414

Closed
miickel opened this issue Dec 27, 2017 · 6 comments
Closed

Unable to publish when setting endpoint url to CloudFront #2414

miickel opened this issue Dec 27, 2017 · 6 comments

Comments

@miickel
Copy link

miickel commented Dec 27, 2017

  • Version: 19.49.0
  • electron-updater version: 2.17.6

We have this app that we're about to distribute globally using S3 + CloudFront.

S3 is setup correctly and I can publish as usual using build --mac --win -p always, but if I set the publish.endpoint option to the CloudFront URL (e.g. https://d3tpy77yecs5fp.cloudfront.net) it fails with:

Error: Cannot Cleanup [...] XMLParserError: Unexpected close tag

Is S3 + CloudFront supported? Do I need to use setFeedURL?

Thanks

@develar
Copy link
Member

develar commented Jan 2, 2018

Could you please provide full error? Is publish successful?

@bithavoc
Copy link

Cloudfront won't take S3 upload requests, so you can not point endpoint to cloudfront.

However, it'd be really great to allow specify the front-end url for distribution. I know GenericServerOptions has an option for this.

@develar develar closed this as completed Apr 24, 2018
@develar
Copy link
Member

develar commented Apr 24, 2018

@bithavoc You can set 2 publish providers, first one will be used for electron-updater, all will be used to publish (so, as you said, just use GenericServerOptions for CouldFront).

@bartoszhernas
Copy link
Contributor

Did anyone get this working? What I am really looking for is:

  1. Upload to S3
  2. But download from CloudFront via autoupdate.

Is it enough to set up GenericServer (CloudFront) as first on the list, and S3 as second? Then publish will upload to S3 all files, but use CF to fetch the files?

@shadow-light
Copy link

You can set the publish config as S3 in package.json but then in your Electron script overwrite the config with a generic one for your cloudfront:

autoUpdater.setFeedURL({
    provider: 'generic',
    url: 'https://anydomain.com/',
})
autoUpdater.checkForUpdatesAndNotify()

@KomTak001
Copy link

KomTak001 commented Nov 24, 2020

I was investigating a similar case.
The solution is similar, but in my case I also had to specify a "channel".
This is because we used the development build tag name X.Y.Z-dev.
In this case, the uploaded feed check yml file will be generated in dev.yml.
For production builds, the tag will be X.Y.Z, so channel will be latest.

    publish:
      - provider: s3
        region: [s3 Region]
        bucket: [s3 bucket]
        path: [s3 upload prefix]
        acl: private
        autoUpdater.setFeedURL ({
          provider: "generic",
          url: "https://[CDNDomain]/[s3 upload prefix]/",
          channel: "dev",
        });

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

No branches or pull requests

6 participants