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.

Publishing to github fails due to deprecated options in @octokit/rest.js

See original GitHub issue
  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:

Using v5.2.0, attempting to publish to github releases. Seems like the github api host (api.github.com) is undefined for some reason. Possibly an issue with octokit

Console output when you run electron-forge with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

josh:gif-goat pixelfiend$ DEBUG=electron-forge:* electron-forge publish
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Checking your system +0ms
  electron-forge:lifecycle Process Succeeded: Checking your system +1s
  electron-forge:runtime-config setting key: verbose to value: false +0ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:publish triggering make +0ms
  electron-forge:lifecycle Process Started: Resolving Forge Config +0ms
  electron-forge:project-resolver searching for project in: /Users/pixelfiend/workspace/gif-goat +0ms
  electron-forge:project-resolver electron-forge compatible package.json found in /Users/pixelfiend/workspace/gif-goat/package.json +1ms
  electron-forge:lifecycle Process Succeeded: Resolving Forge Config +8ms
  electron-forge:require-search searching [ '../makers/darwin/dmg.js',
  '../makers/generic/dmg.js',
  'electron-forge-maker-dmg',
  'dmg',
  '/Users/pixelfiend/workspace/gif-goat/dmg',
  '/Users/pixelfiend/workspace/gif-goat/node_modules/dmg',
  '/Users/pixelfiend/.nvm/versions/node/v6.14.1/lib/node_modules/electron-forge/dist/makers/darwin/dmg.js',
  '/Users/pixelfiend/.nvm/versions/node/v6.14.1/lib/node_modules/electron-forge/dist/makers/generic/dmg.js',
  '/Users/pixelfiend/.nvm/versions/node/v6.14.1/lib/node_modules/electron-forge/dist/api/electron-forge-maker-dmg',
  '/Users/pixelfiend/.nvm/versions/node/v6.14.1/lib/node_modules/electron-forge/dist/api/dmg',
  '/Users/pixelfiend/workspace/gif-goat/dmg',
  '/Users/pixelfiend/workspace/gif-goat/node_modules/dmg',
  '/Users/pixelfiend/.nvm/versions/node/v6.14.1/lib/node_modules/electron-forge/dist/api/makers/darwin/dmg.js',
  '/Users/pixelfiend/.nvm/versions/node/v6.14.1/lib/node_modules/electron-forge/dist/api/makers/generic/dmg.js',
  '/Users/pixelfiend/.nvm/versions/node/v6.14.1/lib/node_modules/electron-forge/dist/api/node_modules/electron-forge-maker-dmg',
  '/Users/pixelfiend/.nvm/versions/node/v6.14.1/lib/node_modules/electron-forge/dist/api/node_modules/dmg',
  '/Users/pixelfiend/workspace/gif-goat/dmg',
  '/Users/pixelfiend/workspace/gif-goat/node_modules/dmg' ] relative to /Users/pixelfiend/.nvm/versions/node/v6.14.1/lib/node_modules/electron-forge/dist/api +0ms
  electron-forge:require-search testing ../makers/darwin/dmg.js +6ms
We need to package your application before we can make it
  electron-forge:lifecycle Process Started: Preparing to Package Application for arch: x64 +15ms
  electron-forge:project-resolver searching for project in: /Users/pixelfiend/workspace/gif-goat +20ms
  electron-forge:project-resolver electron-forge compatible package.json found in /Users/pixelfiend/workspace/gif-goat/package.json +1ms
  electron-forge:hook could not find hook: generateAssets +0ms
  electron-forge:hook could not find hook: prePackage +0ms
  electron-forge:packager packaging with options { asar: false,
  overwrite: true,
  packageManager: 'npm',
  icon: './src/assets/imgs/icon-1024.png',
  afterCopy: [ [Function] ],
  afterExtract: [ [Function] ],
  afterPrune: [ [Function] ],
  dir: '/Users/pixelfiend/workspace/gif-goat',
  arch: 'x64',
  platform: 'darwin',
  out: '/Users/pixelfiend/workspace/gif-goat/out',
  electronVersion: '1.8.4',
  quiet: true } +0ms
  electron-forge:lifecycle Process Succeeded: Preparing to Package Application for arch: x64 +50s
  electron-forge:lifecycle Process Started: Compiling Application +2ms
  electron-forge:lifecycle Process Succeeded: Compiling Application +2s
  electron-forge:lifecycle Process Started: Preparing native dependencies +13s
  electron-forge:lifecycle Process Succeeded: Preparing native dependencies +737ms
  electron-forge:lifecycle Process Started: Packaging Application +1ms
  electron-forge:hook could not find hook: postPackage +1m
  electron-forge:lifecycle Process Succeeded: Packaging Application +12s
Making for the following targets:
  electron-forge:hook could not find hook: preMake +3ms
  electron-forge:lifecycle Process Started: Making for target: dmg - On platform: darwin - For arch: x64 +6ms
  electron-forge:lifecycle Process Succeeded: Making for target: dmg - On platform: darwin - For arch: x64 +22s
  electron-forge:hook could not find hook: postMake +22s
  electron-forge:project-resolver searching for project in: /Users/pixelfiend/workspace/gif-goat +2m
  electron-forge:project-resolver electron-forge compatible package.json found in /Users/pixelfiend/workspace/gif-goat/package.json +1ms
  electron-forge:lifecycle Process Started: Resolving publish target: github +2ms
  electron-forge:require-search searching [ '../publishers/github.js',
  'electron-forge-publisher-github',
  'github',
  '/Users/pixelfiend/workspace/gif-goat/github',
  '/Users/pixelfiend/workspace/gif-goat/node_modules/github',
  '/Users/pixelfiend/.nvm/versions/node/v6.14.1/lib/node_modules/electron-forge/dist/publishers/github.js',
  '/Users/pixelfiend/.nvm/versions/node/v6.14.1/lib/node_modules/electron-forge/dist/api/electron-forge-publisher-github',
  '/Users/pixelfiend/.nvm/versions/node/v6.14.1/lib/node_modules/electron-forge/dist/api/github',
  '/Users/pixelfiend/workspace/gif-goat/github',
  '/Users/pixelfiend/workspace/gif-goat/node_modules/github',
  '/Users/pixelfiend/.nvm/versions/node/v6.14.1/lib/node_modules/electron-forge/dist/api/publishers/github.js',
  '/Users/pixelfiend/.nvm/versions/node/v6.14.1/lib/node_modules/electron-forge/dist/api/node_modules/electron-forge-publisher-github',
  '/Users/pixelfiend/.nvm/versions/node/v6.14.1/lib/node_modules/electron-forge/dist/api/node_modules/github',
  '/Users/pixelfiend/workspace/gif-goat/github',
  '/Users/pixelfiend/workspace/gif-goat/node_modules/github' ] relative to /Users/pixelfiend/.nvm/versions/node/v6.14.1/lib/node_modules/electron-forge/dist/api +2m
  electron-forge:require-search testing ../publishers/github.js +4ms
  electron-forge:lifecycle Process Succeeded: Resolving publish target: github +262ms
  electron-forge:lifecycle Process Started: Searching for target release +3ms
DEPRECATED: protocol option is no longer supported
  electron-forge:lifecycle Process Failed: Searching for target release +116ms

An unhandled error has occurred inside Forge:
request to https://undefined/repos/positlabs/gif-goat/releases?per_page=100 failed, reason: getaddrinfo ENOTFOUND undefined undefined:443
HttpError: request to https://undefined/repos/positlabs/gif-goat/releases?per_page=100 failed, reason: getaddrinfo ENOTFOUND undefined undefined:443
    at fetch.then.then.catch.error (/Users/pixelfiend/.nvm/versions/node/v6.14.1/lib/node_modules/electron-forge/node_modules/@octokit/rest/lib/request/request.js:88:13)
    at process._tickCallback (internal/process/next_tick.js:109:7)

What command line arguments are you passing?

electron-forge publish --target=github --platform=darwin

What does your config.forge data in package.json look like?

  "config": {
    "forge": {
      "make_targets": {
        "darwin": [
          "dmg"
        ]
      },
      "electronPackagerConfig": {
        "packageManager": "npm",
        "icon": "./src/assets/imgs/icon-1024.png"
      },
      "github_repository": {
        "owner": "positlabs",
        "name": "gif-goat"
      }
    }
  }

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to reproduce your problem. Using electron-forge init is a good starting point, if that is not the source of your problem.

https://github.com/positlabs/gif-goat

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
maleptcommented, May 4, 2018

Reopening since the 5.x PR isn’t merged yet (it’s being weird in CI)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Publishing to github fails due to deprecated options in ...
I have searched the issue tracker for an issue that matches the one I want to file, without success. ... Console output when...
Read more >
octokit/rest.js
baseUrl: 'https://api.github.com',. For custom logging, pass an object with debug , info , warn and error methods as the log option.
Read more >
How to use the deprecation.Deprecation function in deprecation
See (https://octokit.github.io/rest.js/#authentication)' ]; deprecationMethod( octokit.log, new Deprecation("[@octokit/rest] " + deprecationMessapge) ); ...
Read more >
Open Source automation and maintenance with bots & Octokit
Join us live for Open Source Fridays at https://www.meetup.com/ GitHub -Virtual-MeetupWatch Gregor, the maintainer of octokit/rest. js, Probot, ...
Read more >
https://git.2li.ch/keeweb/keeweb/commit/0e1b086096...
[ - deprecateAuthBasic, - 'Setting the "new Octokit({ auth })" option to a Basic Auth string is deprecated. Use https://github.com/octokit/auth-basic.js ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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