-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error / page resources for / not found. Not rendering React #19618
Comments
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
@antoinerousseau would it help if we provide a better stacktrace? Like maybe it was 404 or maybe page-data was invalid. At the moment you don't really see a difference. What do you think the best way moving forward could be? Did you try it on mobile safari/safari yourself? |
@wardpeet thanks for looking into this. |
I've had the same bug report today. Just to let you know that you're not alone. |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Thanks again for being part of the Gatsby community! 💪💜 |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Still an issue. |
I'm also getting this issue. Could this be caused by the fact that I am using Typescript? I have tried running Update/Possible Solution: For me the error was caused because I only had a ".env.development" file and not a ".env.production" file. I don't know why this gave such an ambiguous/confusing error and prevented React from rendering though. I feel like the expected behavior would be the same behavior as what happens when I run |
I've got same issue. My app hosted on aws and uses cloudfront. I have a policy to redirect all not-existed urls to 404.html page with status 200. This looks strange, but it's really important for one of our features. So in case I type something like |
I was encountering this issue as well. For me it was reproducible when using named imports for your own components in the Example
import Layout from "./Layout"
export {
Layout
}; This was with MacOS catelina & chrome Version 80.0.3987.149. Important to note is that I'm using the expo gatsby variant. |
I also had this issue when running a clean
Removing this resolution solved the issue for me. Output from
|
Still happens a lot (4,500+ times over the last week): Stacktrace on Mobile Safari: .cache/production-app.js:128:12
126 publicLoader.loadPage(browserLoc.pathname).then(page => {
127 if (!page || page.status === PageResourceStatus.Error) {
128 throw new Error(
129 `page resources for ${browserLoc.pathname} not found. Not rendering React`
130 )
131 } Stacktrace on Chrome Mobile:
Breadcrumbs:
Most of them happen on Mobile Safari and Chrome Mobile: Gatsby version: 2.20.13 |
Check this solution. |
I don't use |
@wardpeet Thanks. That's really good to hear. |
Awesome |
I'm seeing this error too but only in IE 11. I know. I have to support IE 11. |
Also seeing this error only in IE 11 |
I had some speculation on what could be causing it since it seems a bit intermittent and dependent on network conditions. With these errors it should be a bit easier to diagnose. Could this be caused by a change in the static query file hash which would make the previous version of the file unreachable at the edge until the reference to the file is updated in the page that is using it? @wardpeet Hypothetical reproduction?:
If I have time to run through these steps properly I will but this is my speculation into whats happening here. Good to know I'm not the only one seeing this! We see it mainly in Safari and iPhone but Mac and Windows also occasionally pop up. Not sure if it makes sense to make this an issue specific to a particular device or browser yet though. EDIT: maybe I'm wrong here. Take this with a grain of salt. Don't want to send people on wild goose chase :) gatsby/packages/gatsby/src/redux/reducers/queries.ts Lines 51 to 240 in 478cf68
EDIT: can confirm that changing a static query inside a file will change the id which would definitely produce this issue for stale pages. Haven't tested yet whether or not changing the data the static query depends on will also update the ID, most likely it will. EDIT: changes to data which is being queried in a static query (at least data stored in siteMetadata) will not cause the query id to change, existing references will continue to work |
I'm seeing this in IE11 only as well: Happpening on both my locally built ( Originally I was just getting the In case it's useful: |
I am able to reproduce this consistently (on Gatsby 3.0.1) with a combination of Here's a repo I created by making 2 small changes to the If you follow the steps in the README.md you will be able to reproduce the error yourself in your browser (this particular reproduction is not dependent on you using any specific browser). This reproduction is probably not indicative of the entire problem. This is just an easy way to reproduce it. I will also include a video here reproducing the error for those who don't have an easy setup for their local environment. https://www.youtube.com/watch?v=mGpB0xnZLn4 I'm not sure what the solution here is and it's not the worst UX in the world (clicking a link doesn't do anything) because it just requires a hard refresh to fetch new |
I was seeing this error too, and in my case following the steps in https://www.gatsbyjs.com/docs/caching/ seems to have resolved the issue. I suspect that |
I don't know if this odd detail helps at all, but:
Some strange iPhone out there has a VERY old version of our site cached, and keeps requesting it to this day. |
@aaronadamsCA So you're seeing the old version of sentry continuing to send this error long after updating the package? That might be a very valuable insight into real world reproduction. |
That's right. Some details:
I'm guessing the browser indefinitely caches an old HTML document and broken So I feel like maybe this issue divides cleanly in two:
If 2 is caused by some specific variety of 1, then hopefully with #29970 someone's logs will start to provide new insights soon. |
@aaronadamsCA very helpful info/greakdown. Can you/others provide some sense of what % of devices are sending these errors? Raw number of devices? Which browsers/versions? |
@KyleAMathews We're getting around 10 - 15 users per hour (out of ~2,500 per hour) reporting |
@KyleAMathews Unfortunately my Sentry logs don't go very far back. At this point I'm down to about 10 "users" in the last 30 days with this error, but I'm guessing I can attribute all of them to one stubborn device still sending the aforementioned data. So I may have resolved my underlying issue, whether by fixing a bug or switching to Gatsby Cloud hosting. 🤷♂️ I've specifically seen this from Chrome on Windows, and Safari on iOS and macOS. Never from Firefox, as far as I know. |
I've also encountered this problem today: I think the problem is in incremental builds, including incremental build on Gatsby Cloud. What I did to come to this conclusion:
Takeaways: I suspect incremental builds are wrong. How come you can easily break production by just deploying things that work locally? Besides that, big thanks to a Gatsby team for building the thing - has strange parts and design decisions but at the end of the day works. P.S. Why it has reproduced for me? My guess - I was playing around with |
@ZitRos Thanks for the source map tip - I have a bare bones project as well hosted on IIS. I just deployed a build and confirmed source maps were gone from my wwwroot by hopping on the box and i'm still seeing the same issue - figured I'd call out no fix for me. |
@martinljones to clarify, there's no relation between sourcemaps and the described issue, I noted that perhaps it's sourcemaps change which has triggered a cache wipe on Gatsby Cloud, which I guess can also be achieved with this button (which I didn't try): Locally, |
@ZitRos ah! thanks for the clarification.
|
@ZitRos, you may want to look back at that deployment and check for a client-side JavaScript error on that page. What you've described is how Gatsby behaves when a page builds correctly on the server side, but then throws an unhandled exception on the client side. |
I have been trying to update our gatsby project to v2.18.17+ and now eventually to v3. The initial tries a few months ago were unsuccessful because of the error described in this issue. We have now updated to v3 and did not initially see the issue until our test team flagged a page with the error (ouch I thought I need to revert my updates) but this time there was another error message along side and it pointed to an undefined call. I digged up thru the stack trace and was pointed to a react component in our codebase that basically imported itself, after removing this code block the issue went away. Hope this helps! |
The initial issue (opened in 2019!) diverged quite a lot to a discussion of seemingly different issues (but the same error message on the surface). Some people had errors in their code, some needed correct caching set up (https://www.gatsbyjs.com/docs/caching/) and some might be an issue with IE11. I'll mark this issue here as fixed as the error now gives you the full details of what's happening and we'd very much appreciate if you open new bug reports with minimal reproductions so that we can focus on each issue on its own. A big issue like this here gets difficult to track once multiple people comments with different things. Thanks! |
I have the same problem, and I can access it normally by using shift+cmd+R. https://redblue.fun/ |
Please see: #19618 (comment) |
Description
I'm having multiple Bugsnag reports from Safari and Mobile Safari (various versions and browsers) of this error in
.cache/production-app.js
inpublicLoader.loadPage
:Steps to reproduce
I don't see this Error in my macOS Safari. Website is https://lebikini.com
Expected result
No error
Actual result
An error
Environment
Related: #15080
The text was updated successfully, but these errors were encountered: