Skip to content
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

fix: Make sure that handler exists for linkederrors integration #2742

Merged
merged 2 commits into from Jul 14, 2020

Conversation

kamilogorek
Copy link
Contributor

Fixes #2599

@kamilogorek kamilogorek requested a review from a team July 14, 2020 13:09
@getsentry-bot
Copy link
Contributor

Fails
🚫

TSLint failed: @sentry/node

  • ERROR: /home/travis/build/getsentry/sentry-javascript/packages/node/src/integrations/linkederrors.ts[47, 23]: Avoid referencing unbound methods which may cause unintentional scoping of 'this'.
  • ERROR: /home/travis/build/getsentry/sentry-javascript/packages/node/src/integrations/linkederrors.ts[47, 16]: Expression is always true.
Warnings
⚠️ Please add a changelog entry for your changes.
Messages
📖

@sentry/browser bundle gzip'ed minified size: (ES5: 17.1846 kB) (ES6: 16.2871 kB)

Generated by 🚫 dangerJS against 407baf4

@kamilogorek kamilogorek merged commit 9041c1d into master Jul 14, 2020
@kamilogorek kamilogorek deleted the integrations-guard branch July 14, 2020 13:29
@fraywing
Copy link

fraywing commented Jul 24, 2020

@kamilogorek we're getting this still on 5.20.0

self.handler is not a function

Array.forEach
    Called from:
    /opt/app/node_modules/@sentry/node/node_modules/@sentry/utils/src/syncpromise.ts in SyncPromise._executeHandlers
TypeError: self.handler is not a function
  File "/opt/app/node_modules/winston-sentry-log/node_modules/@sentry/node/src/integrations/linkederrors.ts", line 46, col 22, in null.<anonymous>
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/hub/src/scope.ts", line 105, col 24, in null.<anonymous>
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/utils/src/syncpromise.ts", line 30, col 7, in new SyncPromise
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/hub/src/scope.ts", line 99, col 12, in Scope._notifyEventProcessors
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/hub/src/scope.ts", line 111, col 16, in null.<anonymous>
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/utils/src/syncpromise.ts", line 30, col 7, in new SyncPromise
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/hub/src/scope.ts", line 99, col 12, in Scope._notifyEventProcessors
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/hub/src/scope.ts", line 413, col 17, in Scope.applyToEvent
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/core/src/baseclient.ts", line 275, col 27, in NodeClient.BaseClient._prepareEvent
  File "/opt/app/node_modules/@sentry/node/src/client.ts", line 44, col 31, in NodeClient._prepareEvent
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/core/src/baseclient.ts", line 421, col 12, in null.<anonymous>
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/utils/src/syncpromise.ts", line 30, col 7, in new SyncPromise
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/core/src/baseclient.ts", line 420, col 12, in NodeClient.BaseClient._processEvent
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/core/src/baseclient.ts", line 126, col 10, in NodeClient.BaseClient.captureEvent
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/core/src/baseclient.ts", line 95, col 24, in null.<anonymous>
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/utils/src/syncpromise.ts", line 103, col 21, in Object.onfulfilled
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/utils/src/syncpromise.ts", line 223, col 19, in null.<anonymous>
  ?, in Array.forEach
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/utils/src/syncpromise.ts", line 216, col 20, in SyncPromise._executeHandlers
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/utils/src/syncpromise.ts", line 204, col 10, in SyncPromise._attachHandler
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/utils/src/syncpromise.ts", line 93, col 12, in null.<anonymous>
  File "/opt/app/node_modules/@sentry/node/node_modules/@sentry/utils/src/syncpromise.ts", line 30, col 7, in new SyncPromise

@kamilogorek
Copy link
Contributor Author

@fraywing stacktrace you provided points to winston-sentry-log which has locked version on 5.15.5 - https://github.com/franciscofsales/winston-sentry-log/blob/master/package.json#L31

AbhiPrasad added a commit that referenced this pull request Aug 3, 2021
We should port the fixes done in the Node SDK in
#2742 to the browser
SDK.

This makes sure that the handler class method is defined in the linked
errors integration.
AbhiPrasad added a commit that referenced this pull request Aug 3, 2021
…3861)

We should port the fixes done in the Node SDK in
#2742 to the browser
SDK.

This makes sure that the handler class method is defined in the linked
errors integration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: self._handler is not a function in @sentry/node 5.15.5
4 participants