Skip to content

Invalid configuration object for snap #6327

Description

@lutzroeder
  • Electron-Builder Version: 22.13.1
  • Node Version: 16.11.0
  • Electron Version: 15.1.2
  • Target: snapStore
~/Projects/example: npx electron-builder --linux snap --x64 --publish never
  • electron-builder  version=22.13.1 os=20.6.0
  • loaded configuration  file=/Users/username/Projects/example/electron-builder.yml
  ⨯ Invalid configuration object. electron-builder 22.13.1 has been initialized using a configuration object that does not match the API schema.
 - configuration.snap should be one of these:
   object { after?, appPartStage?, artifactName?, assumes?, autoStart?, buildPackages?, category?, confinement?, description?, desktop?, environment?, executableArgs?, grade?, hooks?, layout?, mimeTypes?, plugs?, publish?, slots?, stagePackages?, summary?, synopsis?, title?, useTemplateApp? } | null
   -> Snap options.
   Details:
    * configuration.snap.publish[0].provider should be "github".
      -> The provider. Must be `github`.
    * configuration.snap.publish[0].provider should be "s3".
      -> The provider. Must be `s3`.
    * configuration.snap.publish[0].provider should be "spaces".
      -> The provider. Must be `spaces`.
    * configuration.snap.publish[0].provider should be "generic".
      -> The provider. Must be `generic`.
    * configuration.snap.publish[0].provider should be "bintray".
      -> The provider. Must be `bintray`.
    * configuration.snap.publish[0].provider should be "custom".
      -> The provider. Must be `custom`.
    * configuration.snap.publish[0].provider should be "keygen".
      -> The provider. Must be `keygen`.
     How to fix:
     1. Open https://www.electron.build/configuration/snap
     2. Search the option name on the page (or type in into Search to find across the docs).
       * Not found? The option was deprecated or not exists (check spelling).
       * Found? Check that the option in the appropriate place. e.g. "title" only in the "dmg", not in the root.
  failedTask=build stackTrace=ValidationError: Invalid configuration object. electron-builder 22.13.1 has been initialized using a configuration object that does not match the API schema.
 - configuration.snap should be one of these:
   object { after?, appPartStage?, artifactName?, assumes?, autoStart?, buildPackages?, category?, confinement?, description?, desktop?, environment?, executableArgs?, grade?, hooks?, layout?, mimeTypes?, plugs?, publish?, slots?, stagePackages?, summary?, synopsis?, title?, useTemplateApp? } | null
   -> Snap options.
   Details:
    * configuration.snap.publish[0].provider should be "github".
      -> The provider. Must be `github`.
    * configuration.snap.publish[0].provider should be "s3".
      -> The provider. Must be `s3`.
    * configuration.snap.publish[0].provider should be "spaces".
      -> The provider. Must be `spaces`.
    * configuration.snap.publish[0].provider should be "generic".
      -> The provider. Must be `generic`.
    * configuration.snap.publish[0].provider should be "bintray".
      -> The provider. Must be `bintray`.
    * configuration.snap.publish[0].provider should be "custom".
      -> The provider. Must be `custom`.
    * configuration.snap.publish[0].provider should be "keygen".
      -> The provider. Must be `keygen`.
     How to fix:
     1. Open https://www.electron.build/configuration/snap
     2. Search the option name on the page (or type in into Search to find across the docs).
       * Not found? The option was deprecated or not exists (check spelling).
       * Found? Check that the option in the appropriate place. e.g. "title" only in the "dmg", not in the root.
    at Object.validateConfig (/Users/username/Projects/example/node_modules/app-builder-lib/src/util/config.ts:240:3)
    at Packager._build (/Users/username/Projects/example/node_modules/app-builder-lib/src/packager.ts:342:5)
    at Packager.build (/Users/username/Projects/example/node_modules/app-builder-lib/src/packager.ts:337:12)
    at Object.executeFinally (/Users/username/Projects/example/node_modules/builder-util/src/promise.ts:12:14)

electron-builder.yml

snap:
  plugs:
  - default
  - removable-media
  publish:
  - provider: snapStore
    channels:
    - stable

@mmaietta #6193 @mhatvan #6190

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions