undefined is not an object (evaluating 'r.page')
See original GitHub issueDescription
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:
- https://sentry.io/share/issue/aa7fab1e3de4428da3cbfb73742797b3/
- https://sentry.io/share/issue/625c8999aa634f178549987b2004c45a/
- https://sentry.io/share/issue/411c38e704ac4d538dd6fc85890d2b61/
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
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:18 (11 by maintainers)
Top GitHub Comments
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
I just tried opening my gatsby site on an older device (iPhone 5S) Safari 7 And got the same issue in the dev tools