Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

After latest release we have blocker issue #172

Closed
cristiboariu opened this issue Jan 5, 2022 · 11 comments · Fixed by #174
Closed

After latest release we have blocker issue #172

cristiboariu opened this issue Jan 5, 2022 · 11 comments · Fixed by #174

Comments

@cristiboariu
Copy link

cristiboariu commented Jan 5, 2022

After your latest release (v0.14.6) we encounter:

Error encountered when starting the app: TypeError: Cannot use 'in' operator to search for 'context' in null
/opt/app/node_modules/opentracing/lib/reference.js:14
    if (contextOrSpan instanceof span_1.default || 'context' in contextOrSpan) {
                                                             ^

TypeError: Cannot use 'in' operator to search for 'context' in null
    at toContext (/opt/app/node_modules/opentracing/lib/reference.js:14:62)
    at new Reference (/opt/app/node_modules/opentracing/lib/reference.js:37:35)
    at Object.requestTrace [as request] (/opt/app/node_modules/dd-trace/packages/datadog-plugin-http/src/client.js:57:11)
    at retriableRequest (/opt/app/node_modules/dd-trace/packages/dd-trace/src/exporters/agent/request.js:13:22)
    at request (/opt/app/node_modules/dd-trace/packages/dd-trace/src/exporters/agent/request.js:53:24)
    at makeRequest (/opt/app/node_modules/dd-trace/packages/dd-trace/src/exporters/agent/writer.js:127:3)
    at Writer._sendPayload (/opt/app/node_modules/dd-trace/packages/dd-trace/src/exporters/agent/writer.js:31:5)
    at Writer.flush (/opt/app/node_modules/dd-trace/packages/dd-trace/src/exporters/agent/writer.js:80:12)
    at Timeout._onTimeout (/opt/app/node_modules/dd-trace/packages/dd-trace/src/exporters/agent/index.js:14:58)
@cristiboariu
Copy link
Author

cristiboariu commented Jan 5, 2022

@yurishkuro can you please help? Our PROD build is no longer working :(

Bug seems to be introduced here: 1380d0f#diff-d0d962ccc0784d6699fb4dcfc79d3acd8cff4d081f77e13a164510c48459d35fR14

@lmuench
Copy link

lmuench commented Jan 6, 2022

we are experiencing the same issue. non-stop uncaught exceptions in some of our services (opentracing is pulled in by those services' dd-trace dependency)

@jneal-afs
Copy link

Seeing this as well

@jneal-afs
Copy link

@yurishkuro Just want to make sure you are aware. We are currently trying to force a rollback to v0.14.5 in our systems as we currently can't deploy any new code.

@AMOpportunitiesDeveloper
Copy link

AMOpportunitiesDeveloper commented Jan 6, 2022

dd-trace datadogs agent uses this dependency and we can not deploy any code now. this is a major issue.

@yurishkuro
Copy link
Member

apologies, everyone, I am reverting the change in a new patch

@yurishkuro
Copy link
Member

[email protected] published that is equal to [email protected]

@yurishkuro
Copy link
Member

btw, I think the original null-ptr issue is here: https://github.com/DataDog/dd-trace-js/blob/21179be27f7f9487e8287056fa08e404f5e6ef14/packages/datadog-plugin-http/src/client.js#L54

This code is calling new Reference(type, parentCtx) constructor with parentCtx=null, which is invalid per constructor signature:

constructor(type: string, referencedContext: SpanContext | Span) {

@yurishkuro
Copy link
Member

While not ideal, #174 adds support for previous "illegal" usage of the constructor.

@dhay
Copy link

dhay commented Jan 6, 2022

I was facing this issue as well and can confirm that the 0.14.7 build fixes the problem. I was about to post this exact issue with the suggestion that the line in question add a null/undefined check...but, without digging further, that may just kick the problem further downstream

@yurishkuro
Copy link
Member

@cristiboariu @lmuench @jneal-afs @amopportunities @dhay can you test your code with PR #174 (it's on a public branch) to confirm if it resolves the issue?

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

Successfully merging a pull request may close this issue.

6 participants