Sitelet https://github.com/getsentry/sentry-javascript/issues/3840
Skip to content

Cannot read property 'map' of undefined #3840

Description

@hubingkang

Package + Version

  • @sentry/browser
  • @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other:

Version:

 6.8.0

Description

sometimes get this error when the page loads

./node_modules/@sentry/tracing/esm/browser/metrics.js in _tagMetricInfo at line 174:36

            }
            transaction.setTag('lcp.size', this._lcpEntry.size);
        }
        if (this._clsEntry) {
            logger.log('[Measurements] Adding CLS Data');
            this._clsEntry.sources.map(function (source, index) {
                return transaction.setTag("cls.source." + (index + 1), htmlTreeAsString(source.node));
            });
        }
    };
    /** Starts tracking the Cumulative Layout Shift on the current page. */

./node_modules/@sentry/tracing/esm/browser/metrics.js in addPerformanceEntries at line 152:18

                    op: 'web.vitals',
                    startTimestamp: this._measurements['mark.fid'].value,
                });
            }
            transaction.setMeasurements(this._measurements);
            this._tagMetricInfo(transaction);
        }
    };
    /** Add LCP / CLS data to transaction to allow debugging */
    MetricsInstrumentation.prototype._tagMetricInfo = function (transaction) {
        if (this._lcpEntry) {

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions