Skip to content

runInContextCb error using composable-middleware in node app running on newrellic V12 #2806

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

Closed
karankapur999 opened this issue Nov 29, 2024 · 6 comments

Comments

@karankapur999
Copy link

After upgrading newrelic from V10.0 ^---> V12.0^ in node js app, app started getting errors

Description

I am using composable-middleware and the app crashes with attached errors on new version

Expected Behavior

Troubleshooting or NR Diag results

Steps to Reproduce

Screenshot 2024-11-29 at 2 55 54 PM

Your Environment

  • ex: Browser name and version:
  • ex: Node version:
  • ex: Operating System and version:

Additional context

Screenshot 2024-11-29 at 2 55 54 PM

@workato-integration
Copy link

@newrelic-node-agent-team newrelic-node-agent-team moved this to Triage Needed: Unprioritized Features in Node.js Engineering Board Nov 29, 2024
@karankapur999 karankapur999 changed the title runInContextCb error using composable-middleware on node V12 runInContextCb error using composable-middleware in node app running on newrellic V12 Nov 29, 2024
@bizob2828
Copy link
Member

bizob2828 commented Dec 2, 2024

@karankapur999 can you provide a reproduction case. I'm not sure how composable-middleware is used in this context.

@karankapur999
Copy link
Author

@bizob2828

Sure , We have been using

https://www.npmjs.com/package/composable-middleware

and on invoking a function having integration with above package , it breaks

Note: This works fine on newrelic V10 and breaking on V12

@jsumners-nr
Copy link
Contributor

👋 thank you for the report. Please provide a minimal reproducible example. Doing so will help us diagnose the issue. It should be the bare minimum code needed to trigger the issue, and easily runnable without any changes or extra code.

You may use a GitHub repository to host the code if it is too much to fit into a code block (or two).

@bizob2828
Copy link
Member

@karankapur999 as @jsumners-nr we need a reproduction case. I cannot reproduce by doing:

const express = require('express')
const composableMw = require('composable-middleware')
const app = express()
const { PORT = 3000 } = process.env

const mw = composableMw().use(function(req, res, next) {
  console.log('in first')
  next()
}).use(function second(req, res, next) {
  console.log('in second')
  next()
})

app.use(mw)

app.get('/named-route', (req, res) => {
  res.send('hi')
})


app.listen(PORT, () => console.log(`Example app listening on port ${PORT}!`))

@bizob2828
Copy link
Member

Closing because we cannot reproduce. If you can provide a reproducation case @karankapur999, please link it and re-open issue

@github-project-automation github-project-automation bot moved this from Triage Needed: Unprioritized Features to Done: Issues recently completed in Node.js Engineering Board Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants