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

Converting circular structure to JSON error when pushing some error logs #729

Closed
raphaelquati opened this issue Nov 8, 2024 · 4 comments · Fixed by #730
Closed

Converting circular structure to JSON error when pushing some error logs #729

raphaelquati opened this issue Nov 8, 2024 · 4 comments · Fixed by #730
Assignees
Labels
bug Report a bug

Comments

@raphaelquati
Copy link

raphaelquati commented Nov 8, 2024

Description

I'm using iife modules (in a Angular 6 application).

Environment

  • SDK 1.11.0
  • SDK instrumentations: Web SDK, Web Tracing
  • *OS: Windows 11
  • Browser: Edge

Javascript console:

 @grafana/faro-web-sdk:instrumentation-console
 TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'Object'
    |     property 'element' -> object with constructor 'Object'
    |     property 'componentProvider' -> object with constructor 'Object'
    --- property 'parent' closes the circle
    at JSON.stringify (<anonymous>)
    at faro-web-sdk.iife.js:1:41494
    at Array.map (<anonymous>)
    at x.filter.forEach.console.<computed> [as error] (faro-web-sdk.iife.js:1:41470)
    at Object.ca [as factory] (main.62067dc830e2ab5a2304.js:1:17449849)
    at n.logError (main.62067dc830e2ab5a2304.js:1:5713175)
    at n.handleError (main.62067dc830e2ab5a2304.js:1:5604401)
    at main.62067dc830e2ab5a2304.js:1:5632917
    at i.invoke (faro-web-tracing.iife.js:7:25981)
    at r.run (faro-web-tracing.iife.js:7:21270)
    at n.runOutsideAngular (main.62067dc830e2ab5a2304.js:1:5623151)
    at n.tick (main.62067dc830e2ab5a2304.js:1:5632860)
    at main.62067dc830e2ab5a2304.js:1:5631037
    at i.invoke (faro-web-tracing.iife.js:7:25981)
    at Object.onInvoke (main.62067dc830e2ab5a2304.js:1:5622120)

The error occurs here:
Image

I think is related to #587

The error (angular error):

ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'ngIf: true'. Current value: 'ngIf: false'
@raphaelquati raphaelquati added the bug Report a bug label Nov 8, 2024
@codecapitano
Copy link
Collaborator

Thanks for reporting @raphaelquati.
We'll release a fix today.

@AdityaRanjanSingh
Copy link

Hi,

I ran into the same issue today.
I am using "@grafana/faro-web-sdk": "^1.12.0",
Is the fix already released
Image

@raphaelquati
Copy link
Author

I've updated my application to use 1.12.0 (I'm using iife modules), and the error was gone.

@codecapitano
Copy link
Collaborator

codecapitano commented Nov 18, 2024

@AdityaRanjanSingh

I see the issue. There was an unprotected stringifier left which even doesn't to this place.

Fixed with this PR

Thanks for reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report a bug
Projects
None yet
3 participants