Skip to content

current issues with network #653

Description

@gengjiawen
  • node-fetch not working on 18 (maybe only with proxy)
  • proxy only support http, sock5 not working

Activity

  1. aduh95 commented on Oct 27, 2022

    @aduh95
    Contributor

    This is breaking the request-ci workflow on nodejs/node: https://github.com/nodejs/node/actions/runs/3333705931/jobs/5515914780

    Run ./tools/actions/start-ci.sh 45179 
    + REQUEST_CI_LABEL=request-ci
    + REQUEST_CI_FAILED_LABEL=request-ci-failed
    + gh pr edit 451[7](https://github.com/nodejs/node/actions/runs/3333705931/jobs/5515914780#step:6:8)9 --remove-label request-ci
    https://github.com/nodejs/node/pull/45179
    + ci_started=yes
    + rm -f output
    + ncu-ci run 45179
    + cat output
    - Validating Jenkins credentials
    ✔  Jenkins credentials valid
    + [ yes = no ]
    - Starting PR CI job
    (node:1[8](https://github.com/nodejs/node/actions/runs/3333705931/jobs/5515914780#step:6:9)[10](https://github.com/nodejs/node/actions/runs/3333705931/jobs/5515914780#step:6:11)) [https://github.com/node-fetch/node-fetch/issues/[11](https://github.com/nodejs/node/actions/runs/3333705931/jobs/5515914780#step:6:12)67] DeprecationWarning: form-data doesn't follow the spec and requires special treatment. Use alternative package
    (Use `node --trace-deprecation ...` to show where the warning was created)
    
    [DEBUG] FetchError: request to https://ci.nodejs.org/job/node-test-pull-request/build failed, reason: socket hang up
        at ClientRequest.<anonymous> (file:///opt/hostedtoolcache/node/18.[12](https://github.com/nodejs/node/actions/runs/3333705931/jobs/5515914780#step:6:13).0/x64/lib/node_modules/node-core-utils/node_modules/node-fetch/src/index.js:108:11)
        at ClientRequest.emit (node:events:525:35)
        at TLSSocket.socketCloseListener (node:_http_client:467:11)
        at TLSSocket.emit (node:events:525:35)
        at node:net:3[13](https://github.com/nodejs/node/actions/runs/3333705931/jobs/5515914780#step:6:14):12
        at TCP.done (node:_tls_wrap:587:7) {
      type: 'system',
      errno: 'ECONNRESET',
      code: 'ECONNRESET',
      erroredSysCall: undefined
    }
    ✖  Failed to start CI
    
  2. gengjiawen commented on Oct 27, 2022

    @gengjiawen
    MemberAuthor

    @aduh95 Downgrade to Node 16 temporally maybe ?

    In the long run, should we replace node-fetch ?

  3. aduh95 commented on Oct 27, 2022

    @aduh95
    Contributor

    In the long run, should we replace node-fetch ?

    I'd say yes, possibly with globalThis.fetch now that it's available.

  4. gengjiawen commented on Oct 27, 2022

    @gengjiawen
    MemberAuthor

    First issue since v18 became lts :)

  5. gengjiawen commented on Oct 27, 2022

    @gengjiawen
    MemberAuthor

    Related node-fetch issue: node-fetch/node-fetch#1624

  6. richardlau commented on Oct 27, 2022

    @richardlau
    Member

    This is breaking the request-ci workflow on nodejs/node: https://github.com/nodejs/node/actions/runs/3333705931/jobs/5515914780

    There's another issue here which is the breakage doesn't cause the workflow to fail. From that run the request-ci label was removed from nodejs/node#45179 but because of the issue with node-fetch no CI job was actually queued in Jenkins.

  7. avivnakar commented on Nov 15, 2022

    @avivnakar

    I believe the issue is deeper than node-fetch specifically
    This snippet fails at 18 lts, and works with 16

    http.request('http://localhost:4040/api/tunnels')
        .on('response', (res) => {
            let str = '';
            res.on('data', d => str += d);
            res.on('end', () => console.log(
                JSON.parse(str).tunnels[0].public_url
            ))
        }).end()

    All of these are failing on 18 but working on 16.

    node -e "require('node-fetch').default('http://localhost:4040/api/tunnels').then(res=>res.json()).then(res=>res.tunnels[0].public_url).then(console.log)"
    
    node -e "http.request('http://localhost:4040/api/tunnels').on('response',(res)=>{let str=''; res.on('data',d=>str+=d); res.on('end',()=>console.log(JSON.parse(str).tunnels[0].public_url))}).end()"
    
    node -e "fetch('http://localhost:4040/api/tunnels').then(res=>res.json()).then(res=>res.tunnels[0].public_url).then(console.log)"

    Btw it's ngrok api, if you wish testing yourself, run ngrok http 5000 or any other port instead of 5000

  8. gengjiawen commented on Nov 15, 2022

    @gengjiawen
    MemberAuthor

    @avivnakar better report it in nodejs/node repo with repro (ngrok has an npm module IIRC).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions