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

Upload release failed. Response status: 401 Unauthorized #1385

Closed
FelikZ opened this issue Mar 20, 2017 · 0 comments · May be fixed by qcif/data-curator#563
Closed

Upload release failed. Response status: 401 Unauthorized #1385

FelikZ opened this issue Mar 20, 2017 · 0 comments · May be fixed by qcif/data-curator#563
Labels

Comments

@FelikZ
Copy link

FelikZ commented Mar 20, 2017

  • Version: 15.6.1 (also tested on 15.1.0+ versions, works fine at 7.12.1 though)
  • Version: 1.10.4
  • Target: win x64 nsis

Upload release, for some reason is broken and the reason is that POST request to upload release app is skips authorization header ( "authorization": "" used ).

Log:

Mon, 20 Mar 2017 06:01:24 GMT electron-builder Explicit publish provider: [
  {
    "provider": "github",
    "owner": "felikz",
    "repo": "vicaption"
  }
]
Publishing to Github (owner: felikz, project: vicaption, version: 0.2.5)
Uploading Vicaption-Setup-0.2.5.exe to GitHub
Mon, 20 Mar 2017 06:01:24 GMT electron-builder HTTPS request: {
  "hostname": "api.github.com",
  "port": null,
  "path": "/repos/felikz/vicaption/releases",
  "headers": {
    "Accept": "application/vnd.github.v3+json",
    "authorization": "token a6c2b50d84366aa656681e39b75b6d87e9d67479",
    "User-Agent": "electron-builder",
    "Cache-Control": "no-cache"
  }
}
Mon, 20 Mar 2017 06:01:25 GMT electron-builder Response status: 200 OK, request options: {
  "hostname": "api.github.com",
  "port": null,
  "path": "/repos/felikz/vicaption/releases",
  "headers": {
    "Accept": "application/vnd.github.v3+json",
    "authorization": "<skipped>",
    "User-Agent": "electron-builder",
    "Cache-Control": "no-cache"
  }
}
Release with tag v0.2.5 doesn't exist, creating one
Mon, 20 Mar 2017 06:01:25 GMT electron-builder HTTPS request: {
  "hostname": "api.github.com",
  "port": null,
  "path": "/repos/felikz/vicaption/releases",
  "headers": {
    "Accept": "application/vnd.github.v3+json",
    "authorization": "token a6c2b50d84366aa656681e39b75b6d87e9d67479",
    "User-Agent": "electron-builder",
    "Cache-Control": "no-cache",
    "Content-Type": "application/json",
    "Content-Length": 69
  },
  "method": "post"
}
Mon, 20 Mar 2017 06:01:25 GMT electron-builder Response status: 201 Created, request options: {
  "hostname": "api.github.com",
  "port": null,
  "path": "/repos/felikz/vicaption/releases",
  "headers": {
    "Accept": "application/vnd.github.v3+json",
    "authorization": "<skipped>",
    "User-Agent": "electron-builder",
    "Cache-Control": "no-cache",
    "Content-Type": "application/json",
    "Content-Length": 69
  },
  "method": "post"
}
Mon, 20 Mar 2017 06:01:25 GMT electron-builder HTTPS request: {
  "hostname": "api.github.com",
  "port": null,
  "path": "/repos/FelikZ/vicaption/releases/5797521",
  "headers": {
    "Accept": "application/vnd.github.v3+json",
    "authorization": "<skipped>",
    "User-Agent": "electron-builder",
    "Cache-Control": "no-cache",
    "Content-Type": "application/json",
    "Content-Length": 69
  },
  "method": "post",
  "protocol": "https:",
  "slashes": true,
  "auth": null,
  "host": "api.github.com",
  "hash": null,
  "search": null,
  "query": null,
  "pathname": "/repos/FelikZ/vicaption/releases/5797521",
  "href": "https://api.github.com/repos/FelikZ/vicaption/releases/5797521"
}
Mon, 20 Mar 2017 06:01:26 GMT electron-builder Response status: 401 Unauthorized, request options: {
  "hostname": "api.github.com",
  "port": null,
  "path": "/repos/FelikZ/vicaption/releases/5797521",
  "headers": {
    "Accept": "application/vnd.github.v3+json",
    "authorization": "<skipped>",
    "User-Agent": "electron-builder",
    "Cache-Control": "no-cache",
    "Content-Type": "application/json",
    "Content-Length": 69
  },
  "method": "post",
  "protocol": "https:",
  "slashes": true,
  "auth": null,
  "host": "api.github.com",
  "hash": null,
  "search": null,
  "query": null,
  "pathname": "/repos/FelikZ/vicaption/releases/5797521",
  "href": "https://api.github.com/repos/FelikZ/vicaption/releases/5797521"
}

To solve this, I commented out safe.headers.authorization = "<skipped>"; in ./node_modules/electron-builder/node_modules/electron-builder-http/out/httpExecutor.js which is this line in src

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

Successfully merging a pull request may close this issue.

2 participants