question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

generic publisher config does not accept any requestHeaders

See original GitHub issue
  • Electron-Builder Version: 22.14.13
  • Node Version: 16.14.0
  • Electron Version: 17.0.0
  • Electron Type (current, beta, nightly): current
  • Target: MacOS

Hi Guys,

i am trying to use the generic publisher option in electron-builder, but it seems not to accept any request headers. My publish config in builder.config.js:

module.exports = {
...
    publish: {
        provider: "generic",
        url: "http://localhost:3000/electron_publish",
        requestHeaders: {
            "access-token": "some-access-token-here"
        }
    }
}

If i try to build i just receive an error message:

 - configuration.publish should be one of these:
   object { provider, channel?, host?, owner?, private?, protocol?, publishAutoUpdate?, publisherName?, releaseType?, repo?, requestHeaders?, token?, updaterCacheDirName?, vPrefixedTagName? } | object { bucket, provider, acl?, channel?, encryption?, endpoint?, path?, publishAutoUpdate?, publisherName?, region?, requestHeaders?, storageClass?, updaterCacheDirName? } | object { name, provider, region, acl?, channel?, path?, publishAutoUpdate?, publisherName?, requestHeaders?, updaterCacheDirName? } | object { provider, url, channel?, publishAutoUpdate?, publisherName?, requestHeaders?, updaterCacheDirName?, useMultipleRangeRequest? } | object { provider, component?, distribution?, owner?, package?, publishAutoUpdate?, publisherName?, repo?, requestHeaders?, token?, updaterCacheDirName?, user? } | object { provider, publishAutoUpdate?, publisherName?, requestHeaders?, updateProvider?, updaterCacheDirName?, <key>: {} } | object { account, product, provider, channel?, platform?, publishAutoUpdate?, publisherName?, requestHeaders?, updaterCacheDirName? } | object { provider, channels?, publishAutoUpdate?, publisherName?, repo?, requestHeaders?, updaterCacheDirName? } | object { owner, provider, slug, channel?, publishAutoUpdate?, publisherName?, requestHeaders?, token?, updaterCacheDirName?, username? } | [object { provider, channel?, host?, owner?, private?, protocol?, publishAutoUpdate?, publisherName?, releaseType?, repo?, requestHeaders?, token?, updaterCacheDirName?, vPrefixedTagName? } | object { bucket, provider, acl?, channel?, encryption?, endpoint?, path?, publishAutoUpdate?, publisherName?, region?, requestHeaders?, storageClass?, updaterCacheDirName? } | object { name, provider, region, acl?, channel?, path?, publishAutoUpdate?, publisherName?, requestHeaders?, updaterCacheDirName? } | object { provider, url, channel?, publishAutoUpdate?, publisherName?, requestHeaders?, updaterCacheDirName?, useMultipleRangeRequest? } | object { provider, component?, distribution?, owner?, package?, publishAutoUpdate?, publisherName?, repo?, requestHeaders?, token?, updaterCacheDirName?, user? } | object { provider, publishAutoUpdate?, publisherName?, requestHeaders?, updateProvider?, updaterCacheDirName?, <key>: {} } | object { account, product, provider, channel?, platform?, publishAutoUpdate?, publisherName?, requestHeaders?, updaterCacheDirName? } | object { provider, channels?, publishAutoUpdate?, publisherName?, repo?, requestHeaders?, updaterCacheDirName? } | object { owner, provider, slug, channel?, publishAutoUpdate?, publisherName?, requestHeaders?, token?, updaterCacheDirName?, username? } | string, ...] | null | string
   Details:
    * configuration.publish.requestHeaders has an unknown property 'access-token'. These properties are valid:
      object {}

I guess i am passing the wrong configuration. In this case please tell me how to do it right, because i can not find my mistake related to the documentation.

Thank you very much

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

1reaction
fauxsoupcommented, Mar 25, 2022

Hmmm That’s for configuration/scheme validation, it doesn’t have any application to the rest of the build process. It’s autogenerated. From the commit you linked though, I do see

-    "@types/node": "^14.10.3",
+    "@types/node": "^14.11.2",

Could that be related?

I believe so. Validation is asserting an empty object for request headers, I’m just not sure where the validation rule comes from

0reactions
mmaiettacommented, Apr 11, 2022

I force installed via pnpm upgrade @types/node@14.10.3 and then reran pnpm schema and the scheme.json file did not change, so I’m not what changed additionalProperties: false. That being said, I found a way to override it since it as I guess the schema generator is not parsing NodeJS.Dict<number | string | string[]> properly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Electron builder - publish to local artifactory, and add ...
I'm trying to understand the Docs regarding custom publishing in electron builder, i have a local artifactory server with ...
Read more >
Publish - electron-builder
To force publishing to another providers, explicitly specify publish configuration for snap . You can publish to multiple providers. For example, to publish ......
Read more >
Best practices for working with Microsoft Graph
This article describes best practices that you can apply to help your applications get the most out of Microsoft Graph—whether that involves ...
Read more >
Writing REST Services with RESTEasy Reactive - Quarkus
Any method parameter with no annotation will receive the method body., ... Any request with a part size exceeding this configuration will ......
Read more >
Publish messages to topics | Cloud Pub/Sub - Google Cloud
Small batches of messages during peak publishing time can help you control latency. Configure batch messaging in a client library. You can batch...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found