AssertionError [ERR_ASSERTION]: context not currently entered; can't exit
- Dominant language
- JavaScript
- Stars
- 280
- Forks
- 157
- PR merge metrics
- No merged PRs in 30d
Description
Hello All,
We keep getting the error "AssertionError [ERR_ASSERTION]: context not currently entered; can't exit." followed by below AWS XRAY trace logs in cloudwatch.
Namespace {
--
name: 'AWSXRay',
active: null,
_set: [],
id: -1,
_contexts: Map(54) {
2** => { _ns_name: 'AWSXRay', id: 2**, segment: [Segment] },
6**8 => { _ns_name: 'AWSXRay', id: 6**8, segment: [Subsegment] },
....
.....
.....
.....
at Namespace.exit (/src/node_modules/cls-hooked/context.js:220:12)
We have setup our Node js container service in ECS. Due to this error we get memory leaks / exception and the ECS tasks go to unhealthy state after a while. We couldn't replicate the same error in our local.
we use aws-sdk: 2.1003.0 ; aws-xray-sdk: 3.3.3.
Is this something caused by Xray Module. Can anyone please provide your inputs on this.
Thanks
Contributor guide
Assessment
This issue has not been assessed yet.