electron / forge

:electron: A complete tool for building and publishing Electron applications
https://electronforge.io
MIT License
6.45k stars 512 forks source link

publishing to gitthub fails: Searching for target release: 1.0.0 An unhandled error has occurred inside Forge: HttpError: Not Found #1476

Closed stepheneb closed 4 years ago

stepheneb commented 4 years ago

Preflight Checklist

Issue Details

Expected Behavior

Running: $ node_modules/.bin/electron-forge publish would publish a release to github repo: https://github.com/stepheneb/electron-forge-app-webpack-d3

Actual Behavior

While Searching for target release: 1.0.0 and unhandled error occurs:

An unhandled error has occurred inside Forge:
Not Found
HttpError: Not Found
    at /Users/stephen/dev/electron/apps/forg

See full log: electron-publish.log

To Reproduce

Fork and clone https://github.com/stepheneb/electron-forge-app-webpack-d3

Modify publisher-github in package.json to refer to username and repo of forked repository.

https://github.com/stepheneb/electron-forge-app-webpack-d3/blob/master/package.json#L25-L32

$ npm install && npm start

Simple test app should start.

Export appropriate GITHUB_TOKEN

export GITHUB_TOKEN=e1c5b...

Run publish task:

$ node_modules/.bin/electron-forge publish

Additional Information

Running the same command with debugging enabled: DEBUG=electron-forge:* doesn't seem to display any more info about the specific issue.

Here's the debug log anyway: electron-publish-debug.log

config forge section

  "config": {
    "forge": {
      "packagerConfig": {},
      "publishers": [
        {
          "name": "@electron-forge/publisher-github",
          "config": {
            "repository": {
              "owner": "stepheneb",
              "name": "electron-forge-app-webpack-d3"
            },
            "prerelease": true
          }
        }
      ],
      "makers": [
        {
          "name": "@electron-forge/maker-squirrel",
          "config": {
            "name": "forge_app_webpack"
          }
        },
        {
          "name": "@electron-forge/maker-zip",
          "platforms": [
            "darwin"
          ]
        },
        {
          "name": "@electron-forge/maker-dmg",
          "config": {
            "background": "images/cabbage-bw-transparent.png",
            "format": "ULFO"
          }
        },
        {
          "name": "@electron-forge/maker-deb",
          "config": {}
        },
        {
          "name": "@electron-forge/maker-rpm",
          "config": {}
        }
      ],
      "plugins": [
        [
          "@electron-forge/plugin-webpack",
          {
            "mainConfig": "./webpack.main.config.js",
            "renderer": {
              "config": "./webpack.renderer.config.js",
              "entryPoints": [
                {
                  "html": "./src/index.html",
                  "js": "./src/renderer.js",
                  "name": "main_window",
                  "preload": {
                    "js": "./src/preload.js"
                  }
                }
              ]
            }
          }
        ]
      ]
    }
  },

Might be related to this closed issue #493

stepheneb commented 4 years ago

Solved by adding additional oauth scopes to GITHUB_TOKEN.

X-OAuth-Scopes: public_repo, repo:status, repo_deployment

nzhul commented 1 year ago

hey @stepheneb , how did you added those additional oauth scopes ? Is it somewhere in the github UI, or you added them to your yml file using permissions: ?

Can you give an example please.

baselakasha commented 8 months ago

Anyone fixed this?