question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

undefined is not an object (evaluating 'r.page')

See original GitHub issue

Description

We run a highly-trafficked Gatsby site in production. Recently, we’ve begun seeing a massive uptick in these errors reported by our error monitoring tool (Sentry): undefined is not an object (evaluating 'r.page'). This happened after we updated Gatsby from v2.17.7 to v2.18.17.

You can find a few of the stack traces here:

These errors occur exclusively for older versions of Chrome on Windows devices. This would seem to point to a polyfill issue, except for the fact that we cannot reproduce it ourselves and even older Chrome versions still have great support for modern JS.

Example browsers (all on Windows XP, Vista, 7, 8, 8.1, or 10):

  • Chrome 50.0.2661
  • Chrome 56.0.2924
  • Chrome 61.0.3163

In the past, we’ve found errors like these generally correspond to some issue successfully loading the page-data.json file corresponding to a given page. I don’t think anyone will be able to tell us exactly what’s happening here, but if there are any Gatsby folks who would be able to point us in the direction of what this r.page refers to or might know of any similar issues that could be related, we’d very much appreciate it! Please let us know if any further information might be useful.

Steps to reproduce

We have not been able to reproduce this ourselves. Our website is DataCamp.com if you’d like to give it a shot.

Expected result

We should not be receiving thousands of errors.

Actual result

We are receiving thousands of errors.

Environment

Output of gatsby info --clipboard:

  System:
    OS: macOS High Sierra 10.13.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 11.0.0 - ~/.nvm/versions/node/v11.0.0/bin/node
    Yarn: 1.10.1 - /usr/local/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v11.0.0/bin/npm
  Languages:
    Python: 2.7.10 - /usr/bin/python
  Browsers:
    Chrome: 79.0.3945.88
    Firefox: 59.0.2
    Safari: 13.0.4
  npmPackages:
    gatsby: ^2.18.17 => 2.18.17 
    gatsby-image: ^2.2.37 => 2.2.37 
    gatsby-plugin-canonical-urls: ^2.1.15 => 2.1.15 
    gatsby-plugin-portal: ^1.0.7 => 1.0.7 
    gatsby-plugin-purgecss: ^4.0.1 => 4.0.1 
    gatsby-plugin-react-helmet: ^3.1.15 => 3.1.15 
    gatsby-plugin-react-svg: ^2.1.2 => 2.1.2 
    gatsby-plugin-sass: ^2.1.26 => 2.1.26 
    gatsby-plugin-sentry: ^1.0.1 => 1.0.1 
    gatsby-plugin-sharp: ^2.3.8 => 2.3.8 
    gatsby-source-apiserver: ^2.1.4 => 2.1.4 
    gatsby-source-filesystem: ^2.1.42 => 2.1.42 
    gatsby-source-graphql: ^2.1.29 => 2.1.29 
    gatsby-source-greenhouse-job-board: ^1.0.3 => 1.0.3 
    gatsby-transformer-sharp: ^2.3.9 => 2.3.9 
    gatsby-transformer-yaml: ^2.2.20 => 2.2.20 
  npmGlobalPackages:
    gatsby-cli: 2.7.40

cc @dandenney @thomascorthouts @slin12

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
glennacommented, Mar 19, 2020

We are also seeing this error in Sentry a lot for some of our pages on 8fit.com, on various devices and browsers. We’re currently on v2.19.5

2reactions
RoyalSixcommented, Feb 8, 2020

I just tried opening my gatsby site on an older device (iPhone 5S) Safari 7 And got the same issue in the dev tools

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - React Native - TypeError: undefined is not an object ...
I am trying to recreate a simple React-Native MERN, todo application with a User register and login interface connecting to a Node and...
Read more >
Error : “undefined is not an object (evaluating 'ky.post
On Safari version 15.3, on a Mac running Mac OS 12.2.1, when I try to buy tickets to my event, I fill in...
Read more >
How to Fix TypeError: Null is Not an Object in JavaScript
The JavaScript error TypeError: null is not an object occurs when a property is accessed or a method is called on a null...
Read more >
ERROR TypeError: undefined is not an object (evaluating ...
Ever encountered this error → ERROR TypeError: undefined is not an object (evaluating '_this.props.navigation.navigate') whilst working hard on your project?
Read more >
undefined is not an object (evaluating 'mw.config.get ...
TypeError: undefined is not an object (evaluating 'mw.config.get('wgFormattedNamespaces')[namespace].replace'). Closed, ResolvedPublic. Actions · Description.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found