Skip to content

[NodeJS Agent] When oap-server had stoped, java invokes node, the node app will raise "TypeError" and exit. #7505

@chlook

Description

@chlook

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
    • Question or discussion
    • [*] Bug
    • Requirement
    • Feature or performance improvement

Question

  • What do you want to know?

    When the node agent cannot connect to the server after the server is stopped, the default value is null。Want to confirm whether it can be solved。


Bug

  • Which version of SkyWalking, OS, and JRE?

    • env: k8s for aliyun cloud
    • docker-engine: 1.18.8-aliyun.1
    • oap-server: skywalking-oap-server:8.6.0-es7
    • skywalking-backend-js: master
  • Which company or project?

    • no
  • What happened?
    If possible, provide a way to reproduce the error. e.g. demo application, component version.

    • env: k8s for aliyun cloud

    • docker-engine: 1.18.8-aliyun.1

    • oap-server: skywalking-oap-server:8.6.0-es7

    • java: 8.6.0

    • node: skywalking-backend-js: master

    • ERROR

      TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
          at new NodeError (node:internal/errors:278:15)
          at Function.from (node:buffer:317:9)
          at ContextCarrier._this.decode (/Users/anyone/Desktop/tmp/code/node-app-handler/node_modules/skywalking-backend-js/lib/trace/context/ContextCarrier.js:42:27)
          at ContextCarrier.set (/Users/anyone/Desktop/tmp/code/node-app-handler/node_modules/skywalking-backend-js/lib/trace/context/ContextCarrier.js:63:50)
          at /Users/anyone/Desktop/tmp/code/node-app-handler/node_modules/skywalking-backend-js/lib/trace/context/ContextCarrier.js:87:133
          at Array.forEach (<anonymous>)
          at Function.ContextCarrier.from (/Users/anyone/Desktop/tmp/code/node-app-handler/node_modules/skywalking-backend-js/lib/trace/context/ContextCarrier.js:87:88)
          at Server._sw_request (/Users/anyone/Desktop/tmp/code/node-app-handler/node_modules/skywalking-backend-js/lib/plugins/HttpPlugin.js:131:63)
          at Server.emit (node:events:376:20)
          at parserOnIncoming (node:_http_server:919:12) {
      code: 'ERR_INVALID_ARG_TYPE'
      }
      

Requirement or improvement

  • Please describe your requirements or improvement suggestions.
    Because there is no exception when Java calls Java after the server stops, but when node is called, node throws an exception and exits, affecting the operation of the application. Hope to improve.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working and you are sure it's a bug!core featureCore and important feature. Sometimes, break backwards compatibility.high priorityHigh priority issue, blocking next release.nodejsNodeJS backend agent related

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions