Skip to content

[TRI-3840] Logging infinitely recursive javascript objects crashes, inside flattenAttributes. #1431

Closed

Description

@matt-aitken

Problem

If you try and log an object that has a circular reference, our flattenAttributes code will exceed the stack depth and fail.

Example: a user that has blog posts that have an author (that points back at the user).

This is a major issue with MongoDB which returns JS objects like this.

Solution

Detect circular objects and don't add them to the log output, put a placeholder string instead.

From SyncLinear.com | TRI-3840

Activity

  1. added
    Urgent
    on Oct 23, 2024
  2. yadavshubham01 commented on Oct 24, 2024

    @yadavshubham01
    Contributor

    hey @matt-aitken solve this issue please checkout this PR #1433

  3. added this to the v.70 milestone on Oct 28, 2024
  4. modified the milestones: v.70, v.71, v.72 on Nov 4, 2024
  5. modified the milestones: v.72, v.73, v.74 on Nov 18, 2024
  6. modified the milestones: v.74, v.75 on Dec 2, 2024
  7. 50 remaining items

  8. modified the milestones: v.101, v.102 on Jun 1, 2025
  9. modified the milestones: v.102, v.103, v.104, v.105 on Jun 15, 2025
  10. modified the milestones: v.105, v.106, v.107 on Jul 6, 2025
  11. modified the milestones: v.107, v.108 on Jul 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Urgent

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions