-
-
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
TypeError: d.m_ is not a function after upgrading to @sentry/ember 7.100.1 #10566
Comments
Hey, can you double check that all |
@mydea from the looks of it everything does seem to have the correct version: The only entry in |
This should be exported:
sentry-javascript/packages/ember/addon/instance-initializers/sentry-performance.ts Line 9 in 737fb0e
If you do import * as Sentry from '@sentry/ember';
console.log(Sentry.startBrowserTracingPageLoadSpan); what gets emitted? |
Did you try this: import * as Sentry from '@sentry/ember';
console.log(Sentry.startBrowserTracingPageLoadSpan); Can you let us know what you see there? |
@mydea That's what my screenshot is showing. Here's the first 5 lines of our sentry config file. For that screenshot, I just added the import * as Sentry from '@sentry/ember';
import { Event, EventHint, Breadcrumb } from '@sentry/types';
import { httpClientIntegration, extraErrorDataIntegration } from '@sentry/integrations';
console.log(Sentry.startBrowserTracingPageLoadSpan); |
Ah, sorry, I didn't understand that, thank you! OK, so this is not about this method but about something else... Some questions:
|
@mydea here's what it looks like with sourcemaps loaded: And here's the source of the error: I'm wondering now if this has to do with tree shaking and the function is being removed? We using embroider now with all compile-time static analysis features turned on. If I pause execution at that line, If I stringify them all, this is what I get:
|
Hmm, so a few things immediately jump to mind there:
|
Actually, maybe the problem is that it thinks this should be lazy loaded/imported - will try to put up a fix! |
We released https://github.com/getsentry/sentry-javascript/releases/tag/7.106.0 which may fix this - please give it a try and let us know! |
Hmm, damn! The problem seems to be that it is minifying and tree shaking this function (?) away, incorrectly 🤔 But I don't understand why, sadly. Could you share your ember build config? |
Here's a slightly minified output:
|
Thank you, I was able to reproduce this locally. Still no idea why it is doing that, but this PR fixed the issue for me locally, at least: #11026 |
It seems that this is tree shaken weirdly through the async await import, for some reason. Maybe we can overall refactor this to instead use build time flags (instead of async import) but I'll look into this separately, possibly. I was able to reproduce this with a small local app, and this seemed to fix it. Closes #10566
Thanks for taking a look and for the fix @mydea! Looking forward to the v7 release with this! |
Thanks for the heads up @AbhiPrasad! Looks like this fixes it 😄 |
Great to hear that! 🚀 |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/ember
SDK Version
7.100.1
Framework Version
7.100.1
Link to Sentry event
https://codecrafters.sentry.io/issues/4953498292/?project=5922961&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=24h&stream_index=0
SDK Setup
Steps to Reproduce
Load any page with Sentry enabled.
Expected Result
No errors in console
Actual Result
Errors are present in the console.
The text was updated successfully, but these errors were encountered: