-
Notifications
You must be signed in to change notification settings - Fork 141
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
v 4.11.0 - Cannot read properties of undefined (reading 'INTAKE_SITE_US5') #1562
Comments
Hello @feedmypixel, So If I understand correctly, you can't reproduce the issue outside of your setup? Given the fix that we did for #1547, still having a dependency loop here seems quite odd to me 🤔 |
correct
A custom company build system
Yeah it feels like a really weird bug. I have removed |
Ok so sanity checked this. The bug is as originally described. The error I am getting in my console after removing
|
OK, we are currently removing all the dependency cycles (cf #1559) and it should be done in the coming days. |
Just to let you know, I'm experiencing the same issue. However, for me, it starts to fail at |
Just to keep you updated, the last circular dependencies have been removed with #1567 . We'll release a new version on Monday if everything's right. |
@BenoitZugmeyer thanks for the update. I'll report back once you have released and we have upgraded the package and tested |
A new version have been released, but I still spoted some circular depencies! Your issue might be solved without waiting for the last circular dependencies to be fixed though. Let me know. |
Thanks @BenoitZugmeyer I can't get to this until next week. But will update and report back and close this issue if all is resolved |
The last circular dependencies are fixed with v4.11.3. Feel free to reopen if you still experience the issue. |
I can confirm https://github.com/DataDog/browser-sdk/releases/tag/v4.11.5 works for us - thanks for the fix |
Of Note
This appears to be different to #1547
@datadog/browser-rum:
with"react": "18.1.0"
and"react-dom": "18.1.0"
@datadog/browser-rum: 4.11.0
- errors@datadog/browser-rum: 4.9.0
- worksVersions that work
The version our code last worked with is
@datadog/browser-rum
4.9.0
Version that don't work
Using
@datadog/browser-rum
>=4.10.0
we have the below problemThis issue is also present on:
@datadog/browser-rum
4.10.4
@datadog/browser-rum
4.11.0
Issue
When placing
datadog.init
within an if statement so it only runs in a particular environment (production):And we run the code in the not allowed environment (not production), we get the error:
Uncaught TypeError: Cannot read properties of undefined (reading 'INTAKE_SITE_US5')
Note this works fine on
v4.11.0
when it is in the allowed environment (production). But gives us the error when it is not in the allowed environment.datadogRum.init
call that is inside the if that is not executed, then I do not get the error.datadogRum.init
doesn't run when you are not in the allowed environmentdatadogRum.init
in the code, even though it is not being ran, is causing this error.v4.11.0
inside an if that is not executed, it runs without an error - https://stackblitz.com/edit/react-ts-luwuak?file=App.tsx"@datadog/browser-rum"
from"4.9.0"
to4.11.0
it gives us theUncaught TypeError: Cannot read properties of undefined (reading 'INTAKE_SITE_US5')
error in environments where the code inside the if statement is not executed"@datadog/browser-rum"
is causing this issue but only in our setup. I'm struggling to see what else is causing this or what is missing betweenv4.9.0
andv4.11.0
v4.11.0
runs fine in the "allowed" environment (production)Fix
My current fix is to lock
@datadog/browser-rum:
tov4.9.0
, this works in all environments, but is not idealPlease let me know if you need anything else that could be of help?
The text was updated successfully, but these errors were encountered: