electron-builder: publish does not work with generic provider

  • Electron-Builder Version: 22.14.5
  • Node Version: v14.15.1
  • Electron Version: 11.0.1
  • Electron Type (current, beta, nightly):
  • Target: NSIS Winx64

When provider is set to generic and following macro is invoked electron-builder build --win --x64 --publish always electron builder does not emit any request to the web server

Provider looks to be configured correctly, since app is trying to get updates from the server when launched:

"publish": [
      {
        "provider": "generic",
        "url": "http://127.0.0.1:8000/api/apps/My First App"
      }
    ],

[13/Dec/2021 10:46:37] "GET /api/apps/My%20First%20App/beta.yml?noCache=1fmpivgae HTTP/1.1" 200 448

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 21 (3 by maintainers)

Most upvoted comments

https://github.com/electron-userland/electron-builder/issues/6493#issuecomment-1174220411

Hey @mmaietta! I’d be interested to add a Google Cloud publisher. Can I take you up on your offer for pointers? Happy to take this discussion offline since it’s not directly related to this issue. My email is in my profile!

I upgraded to 23.1.0 today to get the python fix for OSX and started hitting this error as well:

-> Options related to how build Linux targets.
   Details:
    * configuration.linux.publish[0].provider should be "github".
      -> The provider. Must be `github`.
    * configuration.linux.publish[0].provider should be "s3".
      -> The provider. Must be `s3`.
    * configuration.linux.publish[0].provider should be "spaces".
      -> The provider. Must be `spaces`.
    * configuration.linux.publish[0].provider should be "custom".
      -> The provider. Must be `custom`.
    * configuration.linux.publish[0].provider should be "keygen".
      -> The provider. Must be `keygen`.
    * configuration.linux.publish[0].provider should be "snapStore".
      -> The provider. Must be `snapStore`.
    * configuration.linux.publish[0].provider should be "bitbucket".
      -> The provider. Must be `bitbucket`.

Happening for all windows/mac/linux on a previously working configuration. Example:

"publish": [
        {
          "provider": "generic",
          "url": "https://{redacted}/AppBuilds/linux",
          "useMultipleRangeRequest": false,
          "publishAutoUpdate": false,
        },
        {
          "provider": "s3",
          "bucket": "{redacted}",
          "path": "AppBuilds/linux",
          "publishAutoUpdate": true,
          "region": "us-west-2"
        }
      ]

Looking at the source code seems publish functionality for generic provider is not implemented at all 😦

...
/** @internal */
  scheduleUpload(publishConfig: PublishConfiguration, event: UploadTask, appInfo: AppInfo): void {
    if (publishConfig.provider === "generic") {
      return
    }

    const publisher = this.getOrCreatePublisher(publishConfig, appInfo)
...

This should be correct, as it is up to the developer to upload the dist files manually.