-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
"mod.require is not a function" Error after upgrading from 5.23.0 to >=5.24.0 #2971
Comments
@sergio-dreamcode can you provide a simple repro app? |
@rbisol Here's the repo https://github.com/kamilchlebek/sentry-express-demo Run: I think it's caused by webpack bundling, have a look at this thread: #2515 |
Thanks for the sample repo @kamilchlebek. As you mentioned it is possible to be related with webpack by checking #2515. That PR removed the usage of |
@sergio-dreamcode wil #2515 be re-instated? Or was the #2820 reintroduction intentional? |
@ybrodsky I'm not sure, I checked in #2515 that removed |
Hi, we have encountered the same issue, the only workaround for us was to downgrade to 5.22.0. Any progress on a problem yet? |
@rbisol Any updates from Sentry on this? |
Hi all, we're running sentry in nodejs angular universal project and we also get this error (in 5.24 and higher versions). I'll be glad to help, if If you need me to try anything. I tried using
Any other ideas? |
To reproduce this, take angular universal zip from https://angular.io/guide/universal and add @sentry/node to it. A request to |
@rbisol I think we should remove the |
@rbisol This has been open and reproducible nearly three months. Downgrading the package version not an appropriate solution. Any updates? |
setup "@sentry/node": "6.0.2", |
figured out that the problem is in package when adding app.use(Sentry.Handlers.tracingHandler()) to server code from the docs |
Hi, all. This should be fixed once #3210 is released. Please let me know if you're still running into trouble. |
the same issue |
|
Hi @kamilchlebek we've been using the latest upgrade since 6.0.4 and it worked like a charm. Thanks again. Since the fix was released we added Sentry performance tracing to our applications and it worked perfectly. We wanted to improve our tracing by adding the Postgres tracing integration to the backend. We found that the same issue happens in the tracing system but not in the same way as the original bug was in this issue, it does not crash the library either but prevents Postgres tracing to work. We are using version When adding the Postgres tracing integration as the documentation recommends, after testing we noticed that the Postgres tracing was not working and found the next error in our logs:
After checking the Postgres integration source (same happens for other database integrations) I found that it calls to the In order to validate that we were having the same error I cloned a local copy of
The code that I modified to get the ...
public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {
let client: PgClient;
try {
const pgModule = dynamicRequire(module, 'pg') as { Client: PgClient };
client = pgModule.Client;
} catch (e) {
logger.error('Postgres Integration was unable to require `pg` package.');
logger.error(e); // <<<< the line I added to validate
return;
}
... Should I open a new issue or we could re-open this one? |
@sergio-dreamcode I think you've mentioned wrong "Kamil" :) -> @kamilogorek PS. 6.0.4 works for me too. |
@sergio-dreamcode - Can you please open a separate issue, specifically about the DB integrations? Thanks. |
Package + Version
@sentry/browser
@sentry/node
raven-js
raven-node
(raven for node)Version:
Description
Hello, we use Sentry for our Serverless applications which use NestJS and the nest-raven library that implements an interceptor to catch the errors and report them to Sentry.io and everything is bundled using Webpack. After we upgraded from
5.23.0
to the last version5.26.0
we noticed that when an exception happens we receive an Internal Server Error and the original Exception is not reported to Sentry.io because it is the Sentry library that is having problems. The backend logs we have are:After analyzing the bundle we noticed that the it happens in the
dynamicRequire
function specifically when it's called from packages/utils/src/node.ts line 93 which was introduced in version5.24.0
.Checking the stacktrace it happens when
Handlers.parseRequests
is called from the Nest-Raven library we useSo far the workaround is to keep using
@sentry/[email protected]
where the error does not happen.The text was updated successfully, but these errors were encountered: