-
Notifications
You must be signed in to change notification settings - Fork 59
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
Cannot read properties of undefined (reading 'pushError') #573
Comments
Thanks for reporting @FutureKode Would you mind sharing your Faro init code? |
Thanks for looking @codecapitano faro init:
Error boundary:
|
@FutureKode Config looks good so far. Here's an example form the Faro Demo app faro-web-sdk/demo/src/client/index.tsx Line 14 in b06dd9c
|
Maybe one other thing to try. You mentioned the following dependencies: When you use faro-react you only need to install Can you test if the error goes away if you only install those two packages? |
@codecapitano Yes faro is initialized like your example, from the app entry point, and I see a console.log from inside the initialisation code. I tried removing "@grafana/faro-web-sdk" and just using faro-react and faro-web-tracing. But still the error persists 😿 |
Hi @FutureKode I found the problem aka I've overseen this part in the init code. So the problem is that you still need to manually instantiate the Future wise You need to add this to the Cheers If you want to instrument the React router you do this via the |
Thanks @codecapitano - that fixed it 👍🏻 |
Description
Trying to replace my ErrorBoundary with FaroErrorBoundar, this error appears when the boundary is hit:
Cannot read properties of undefined (reading 'pushError')
Steps to reproduce
Expected behavior
It should work as intended.
Actual behavior
Fails with error message
Environment
"@grafana/faro-react": "^1.7.0",
"@grafana/faro-web-sdk": "^1.7.0",
"@grafana/faro-web-tracing": "^1.7.0",
MacBook Air
macOS Sonoma
Chrome 124
Demo
Context
The text was updated successfully, but these errors were encountered: