Skip to content

ReferenceError: Can't fin variable: performance #1090

@icastillejogomez

Description

@icastillejogomez

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: ^1.8.1
react native version: 0.61.5
Node.js version: 14.11.0
react native cli version: 4.13.0

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?
I don't know what is Sentry on-premise...

  • sentry.io (SaaS)
  • on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

There is no an issue
Configuration:

(@sentry/react-native)

Sentry.init({
  dsn: 'https://[email protected]/...'
});

I have following issue:

When I try to run my React Native app, I get the following error: ReferenceError: Can't fin variable: performance

If I click in the top stack items I can see this fragment of code:

function getReactNativePerformanceWrapper() {
    var INITIAL_OFFSET = performance.now(); // <-- This performance does not exists
    return {
        now: function () {
            return performance.now() - INITIAL_OFFSET;
        },
        timeOrigin: INITIAL_TIME,
    };
}

The above code are in node_modules > @sentry > utils > dist > misc.js

Actual result:

Screenshot 2020-09-18 at 13 52 16

Expected result:

I expect the app works fine like yesterday

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