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

Verification stopped with node v13 #139

Closed
plup opened this issue Mar 9, 2020 · 15 comments
Closed

Verification stopped with node v13 #139

plup opened this issue Mar 9, 2020 · 15 comments

Comments

@plup
Copy link

plup commented Mar 9, 2020

The exact same Gitlab CI config (apart from the node version) has different results:

In node 13 the process stops after auth verification:

$ semantic-release
[11:31:45 AM] [semantic-release] › ℹ  Running semantic-release version 17.0.4
[11:31:45 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/gitlab"
[11:31:45 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/npm"
[11:31:45 AM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[11:31:45 AM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[11:31:45 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/npm"
[11:31:45 AM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/gitlab"
[11:31:45 AM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/npm"
[11:31:45 AM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
[11:31:46 AM] [semantic-release] › ✔  Run automated release from branch master on repository https://gitlab-ci-token:[secure]@git.startinblox.com/applications/faabrick-cherdet/faabrick_app.git
[11:31:46 AM] [semantic-release] › ✔  Allowed to push to the Git repository
[11:31:46 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/gitlab"
[11:31:46 AM] [semantic-release] [@semantic-release/gitlab] › ℹ  Verify GitLab authentication (https://git.startinblox.com/api/v4)
Job succeeded

I tried --debug but it didn't give me anything helpfull.

In node 11:

$ semantic-release
[2:13:16 PM] [semantic-release] › ℹ  Running semantic-release version 17.0.4
[2:13:16 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/gitlab"
[2:13:16 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/npm"
[2:13:16 PM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[2:13:16 PM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[2:13:16 PM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/npm"
[2:13:16 PM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/gitlab"
[2:13:16 PM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/npm"
[2:13:16 PM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
[2:13:17 PM] [semantic-release] › ✔  Run automated release from branch master on repository https://gitlab-ci-token:[secure]@git.startinblox.com/applications/faabrick-cherdet/faabrick_app.git
[2:13:17 PM] [semantic-release] › ✔  Allowed to push to the Git repository
[2:13:17 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/gitlab"
[2:13:17 PM] [semantic-release] [@semantic-release/gitlab] › ℹ  Verify GitLab authentication (https://git.startinblox.com/api/v4)
[2:13:17 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/gitlab"
[2:13:17 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/npm"
[2:13:17 PM] [semantic-release] [@semantic-release/npm] › ℹ  Verify authentication for registry https://registry.npmjs.org/
[2:13:17 PM] [semantic-release] [@semantic-release/npm] › ℹ  Wrote NPM_TOKEN to /tmp/9ccebbc97b356d69ba6af5627bfc78c9/.npmrc
startinbloxbot
[2:13:18 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/npm"
[2:13:18 PM] [semantic-release] › ℹ  Found git tag v0.2.6 associated with version 0.2.6 on branch master
[2:13:18 PM] [semantic-release] › ℹ  Found 8 commits since last release
[2:13:18 PM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[2:13:18 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: cicd: debuging CI
[2:13:18 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
[2:13:18 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: cicd: debuging CI
[2:13:18 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
[2:13:18 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: cicd: debuging CI
[2:13:18 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
[2:13:18 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: cicd: adding dry run mode
[2:13:18 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
[2:13:18 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: cicd: adding debug mode
[2:13:18 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
[2:13:18 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: cicd: forced checking out commit for analyze
[2:13:18 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
[2:13:18 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: cicd: forced version bump
[2:13:18 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
[2:13:18 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: update: siren + position of popup
[2:13:18 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
[2:13:18 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 8 commits complete: patch release
[2:13:18 PM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[2:13:18 PM] [semantic-release] › ℹ  The next release version is 0.2.7
[2:13:18 PM] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[2:13:18 PM] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[2:13:18 PM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/npm"
[2:13:18 PM] [semantic-release] [@semantic-release/npm] › ℹ  Write version 0.2.7 to package.json in /builds/applications/faabrick-cherdet/Faabrick_app
v0.2.7
[2:13:18 PM] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/npm"
[2:13:19 PM] [semantic-release] › ✔  Created tag v0.2.7
[2:13:19 PM] [semantic-release] › ℹ  Start step "publish" of plugin "@semantic-release/gitlab"
[2:13:19 PM] [semantic-release] [@semantic-release/gitlab] › ℹ  Published GitLab release: v0.2.7
[2:13:19 PM] [semantic-release] › ✔  Completed step "publish" of plugin "@semantic-release/gitlab"
[2:13:19 PM] [semantic-release] › ℹ  Start step "publish" of plugin "@semantic-release/npm"
[2:13:19 PM] [semantic-release] [@semantic-release/npm] › ℹ  Publishing version 0.2.7 to npm registry on dist-tag latest
npm notice 
npm notice package: @startinblox/faabrickmap@0.2.7
npm notice === Tarball Contents === 
npm notice 1.2kB package.json       
npm notice 226B  .gitlab-ci.yml     
npm notice 526B  index.html         
npm notice 20B   README.md          
npm notice 692B  server.js          
npm notice 3.7kB sib-faabrickmap.js 
npm notice 4.9kB css/faabrickmap.css
npm notice === Tarball Details === 
npm notice name:          @startinblox/faabrickmap                
npm notice version:       0.2.7                                   
npm notice package size:  3.9 kB                                  
npm notice unpacked size: 11.2 kB                                 
npm notice shasum:        bb407e38393a0c58ee6918cb1e77a85993b3a6d9
npm notice integrity:     sha512-hIJDyJiqIlZYF[...]ogfRDlgbp4lQg==
npm notice total files:   7                                       
npm notice 
+ @startinblox/faabrickmap@0.2.7
[2:13:24 PM] [semantic-release] [@semantic-release/npm] › ℹ  Published @startinblox/faabrickmap@0.2.7 to dist-tag @latest on https://registry.npmjs.org/
[2:13:24 PM] [semantic-release] › ✔  Completed step "publish" of plugin "@semantic-release/npm"
[2:13:24 PM] [semantic-release] › ✔  Published release 0.2.7 on default channel
Job succeeded
@pvdlg
Copy link
Member

pvdlg commented Mar 9, 2020

Do you have a npm warning during npm install that indicate one of your dependency is not compatible with Node v13?
Do you have a package-lock.json or yarn.lock? If yes please delete them, and run yarn/npm install again and try again to run semantic-release.

@EivanRazgriz
Copy link

Getting the same error on my Installation.
The setup with Node 13 definitely worked at least 4 days ago

@plup
Copy link
Author

plup commented Mar 9, 2020

I don't have lockfiles in the repository (which may lead to other issues some day). And I don't have any errors or warning at installation:

# node -v
v13.10.1
# npm install semantic-release@v17 @semantic-release/gitlab
npm notice created a lockfile as package-lock.json. You should commit this file.
+ @semantic-release/gitlab@6.0.2
+ semantic-release@17.0.4
added 800 packages from 1028 contributors and audited 13204 packages in 68.995s

3 days ago (at 7:11 pm +01) my deploy job passed with a node v13. So it looks like something changed in a minor publication or a patch in the last 3 days.

@yyynnn
Copy link

yyynnn commented Mar 10, 2020

With this log inside runner, with node:latest:

 [2:57:13 PM] [semantic-release] [@semantic-release/gitlab] › ℹ  Verify GitLab authentication (https://gitlab.com/api/v4)
 (node:42) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
Creating cache default...
 node_modules/: found 59442 matching files          
 Uploading cache.zip to ...
 Created cache
 Job succeeded

With this in local with --no-ci with node 12.14.1:

[18:03:40] [semantic-release] [@semantic-release/gitlab] › ℹ  Verify GitLab authentication (https://gitlab.com/api/v4)
(node:20915) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
[18:03:41] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/gitlab"
[18:03:41] [semantic-release] › ℹ  Found git tag v1.0.0 associated with version 1.0.0 on branch master
[18:03:41] [semantic-release] › ℹ  Found 15 commits since last release
[18:03:41] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[18:03:41] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: Merge branch 'TASK-001' into 'master'
... rest of the release is successful

@brunomrpx
Copy link

I have the same problem here, it's stuck in verifyConditions step. Also was working normally some days ago.

@Kampfmoehre
Copy link

Is there any solution yet? All our internal packages stopped working a few days ago. We run those in a Docker container from a self made image that derives from latest node alpine image.

Here is an example CI log:

$ node -v
v13.10.1
$ npm -v
6.13.7
$ npx semantic-release --debug
[7:36:53 AM] [semantic-release] › ℹ  Running semantic-release version 17.0.4
2020-03-11T07:36:53.348Z semantic-release:config load config from: /builds/my-project/package.json
2020-03-11T07:36:53.357Z semantic-release:config options values: {
  branches: [
    '+([0-9])?(.{+([0-9]),x}).x',
    'master',
    'next',
    'next-major',
    { name: 'beta', prerelease: true },
    { name: 'alpha', prerelease: true }
  ],
  repositoryUrl: 'git@private.gitlab.instance:my-project.git',
  tagFormat: 'v${version}',
  plugins: [
    '@semantic-release/commit-analyzer',
    '@semantic-release/release-notes-generator',
    '@semantic-release/changelog',
    '@semantic-release/npm',
    '@semantic-release/gitlab',
    '@semantic-release/git'
  ],
  gitlabUrl: 'https://private.gitlab.instance',
  _: [],
  debug: true,
  '$0': 'node_modules/.bin/semantic-release'
}
2020-03-11T07:36:53.695Z semantic-release:plugins options for @semantic-release/changelog/verifyConditions: {}
[7:36:53 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/changelog"
2020-03-11T07:36:53.697Z semantic-release:plugins options for @semantic-release/npm/verifyConditions: {}
[7:36:53 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/npm"
2020-03-11T07:36:53.698Z semantic-release:plugins options for @semantic-release/gitlab/verifyConditions: {}
[7:36:53 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/gitlab"
2020-03-11T07:36:53.698Z semantic-release:plugins options for @semantic-release/git/verifyConditions: {}
[7:36:53 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/git"
2020-03-11T07:36:53.699Z semantic-release:plugins options for @semantic-release/commit-analyzer/analyzeCommits: {}
[7:36:53 AM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
2020-03-11T07:36:53.700Z semantic-release:plugins options for @semantic-release/release-notes-generator/generateNotes: {}
[7:36:53 AM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
2020-03-11T07:36:53.700Z semantic-release:plugins options for @semantic-release/changelog/prepare: {}
[7:36:53 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/changelog"
2020-03-11T07:36:53.701Z semantic-release:plugins options for @semantic-release/npm/prepare: {}
[7:36:53 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/npm"
2020-03-11T07:36:53.701Z semantic-release:plugins options for @semantic-release/git/prepare: {}
[7:36:53 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/git"
2020-03-11T07:36:53.702Z semantic-release:plugins options for @semantic-release/npm/publish: {}
[7:36:53 AM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/npm"
2020-03-11T07:36:53.703Z semantic-release:plugins options for @semantic-release/gitlab/publish: {}
[7:36:53 AM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/gitlab"
2020-03-11T07:36:53.703Z semantic-release:plugins options for @semantic-release/npm/addChannel: {}
[7:36:53 AM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
2020-03-11T07:36:53.779Z semantic-release:git Error: Command failed with exit code 128: git push --dry-run --no-verify git@private.gitlab.instance:my-project.git HEAD:master
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
    at makeError (/builds/my-project/node_modules/execa/lib/error.js:58:11)
    at handlePromise (/builds/my-project/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async verifyAuth (/builds/my-project/node_modules/semantic-release/lib/git.js:207:5)
    at async module.exports (/builds/my-project/node_modules/semantic-release/lib/get-git-auth-url.js:43:5)
    at async run (/builds/my-project/node_modules/semantic-release/index.js:55:27)
    at async module.exports (/builds/my-project/node_modules/semantic-release/index.js:259:22)
    at async module.exports (/builds/my-project/node_modules/semantic-release/cli.js:55:5)
2020-03-11T07:36:55.569Z semantic-release:get-tags found tags for branch master: [ { gitTag: 'v1.0.0', version: '1.0.0', channels: [ null ] }, ... 9 more items ]
[7:36:55 AM] [semantic-release] › ✔  Run automated release from branch master on repository https://gitlab-ci-token:[secure]@private.gitlab.instance/my-project.git
[7:36:55 AM] [semantic-release] › ✔  Allowed to push to the Git repository
[7:36:55 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/changelog"
[7:36:55 AM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[7:36:55 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/npm"
[7:36:55 AM] [semantic-release] [@semantic-release/npm] › ℹ  Verify authentication for registry https://npm.droidnet.de
[7:36:55 AM] [semantic-release] [@semantic-release/npm] › ℹ  Reading npm config from /root/.npmrc
[7:36:55 AM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/npm"
[7:36:55 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/gitlab"
2020-03-11T07:36:55.816Z semantic-release:gitlab apiUrl: 'https://private.gitlab.instance/api/v4'
2020-03-11T07:36:55.816Z semantic-release:gitlab repoId: 'my-project'
[7:36:55 AM] [semantic-release] [@semantic-release/gitlab] › ℹ  Verify GitLab authentication (https://private.gitlab.instance/api/v4)
Creating cache df76024af3cbb5169758ecec8a22b1c612a54882...

I reverted our image back to Node 13.8 and it's working again. On my machine I have Node 13.9.0 and it's working too with --no-ci. So it seems something changed in Node 13.10 that breaks the plugin.

@amclin
Copy link

amclin commented Mar 11, 2020

Seeing this as well. Silent non publishing with exact same symptoms in the logs. Confirmed that the CI runners are using Node 13.10.1. Reproduced problem on local machine with Node 13.10.1. Successfully ran semantic-release locally using Node 13.9.0

The strange behavior is that the process is terminating with Exit Code 0 which means the CI runner treats it as a success, not a failure... so automated pipelines get a false success.

So I think there's 2 potential bugs here:

  1. Some change in Node 13.10 is causing @semantic-release/gitlab to fail
  2. semantic-release is exiting with a success state instead of a failure state

Turning on debugging mode with --debug adds no additional information. Just the same silent success exit on the verify gitlab auth step:

[4:18:48 PM] [semantic-release] [@semantic-release/gitlab] › ℹ  Verify GitLab authentication (https://gitlab-private.example.com/api/v4)
(node:54759) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.

(note that the node tls warning is normal expected output at this point in our log due to how we have to connect between internal services. It does not indicate a failure, but may help identify where in the lifecycle the premature exit is happening)

@amclin
Copy link

amclin commented Mar 11, 2020

I'm noticing other people in this thread are also setting the NODE_TLS_REJECT_UNAUTHORIZED global.... which is interesting because Node 13.10.0 changelog mentions a change to tls handling:

@Kampfmoehre
Copy link

We do not set NODE_TLS_REJECT_UNAUTHORIZED since we have signed our GitLab and our NPM repository instance with Let's Encrypt. But we still got the error, so I believe that it does not matter for this case.
The only env variables we set are GITLAB_TOKEN and NPM_TOKEN (obviously). I also tried with the DEBUG var set to semantic-release:* but to no avail.

@amclin
Copy link

amclin commented Mar 20, 2020

I tested with Node 13.11.0 and the issue still persists. It would be helpful if someone from the semantic-release team can weigh in on how to get deeper logging details since this is a silent failure that doesn't manifest as an error.

@pvdlg
Copy link
Member

pvdlg commented Mar 27, 2020

We use https://github.com/sindresorhus/got to make http calls to GitLab API. It seems that on Node 13.10 and up got fails and cause the whole Node process running semantic-release to exit without error.

I don't know if the problem is in got or in an one of it's dependency or in Node.

For reference: sindresorhus/got@62b3388

amclin pushed a commit to amclin/react-project-boilerplate that referenced this issue Apr 1, 2020
Node 13.10 introduces a bug related to TLS/SSL that causes semantic-release to silently fail:
semantic-release/gitlab#139
@freykeld
Copy link

freykeld commented May 19, 2020

Fixed this issue by updating from node:13.10.1 to node:13.11.0.

image
The pipeline did not fail but simply stop after verifying GitLab credentials

@kitos9112

This comment has been minimized.

@kitos9112

This comment has been minimized.

@fgreinacher
Copy link
Contributor

Node 13 has been out of support for quite some time now, so I'm closing this.

If you still have problems in recent versions, please create new issues 🙏

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

No branches or pull requests

10 participants