Skip to content
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

Bug? on official website #10074

Closed
sidalidev opened this issue Nov 21, 2018 · 12 comments
Closed

Bug? on official website #10074

sidalidev opened this issue Nov 21, 2018 · 12 comments
Labels
type: bug An issue or pull request relating to a bug in Gatsby

Comments

@sidalidev
Copy link

Description

Here is a gif:

nov-21-2018 20-42-26

Steps to reproduce

Go to this link `https://www.gatsbyjs.org/starters/gatsby-starter-blog/?gatsby-

Environment

Chrome on Mac Mojave
Version 70.0.3538.102 (Official Build) (64-bit)

@jgierer12 jgierer12 added the type: bug An issue or pull request relating to a bug in Gatsby label Nov 21, 2018
@jonniebigodes
Copy link

As the url is malformed, you're trying to inject a query param and when gatsby tries to render it will throw what is in the image bellow.
gatsby_malformed_url

@jgierer12
Copy link
Contributor

I am not able to reproduce this on the same Chrome version on Windows 10. Just wanted to point out that the URL you linked doesn't match the one in your GIF (missing 404 at the end). Is that intentional?

@jonniebigodes
Copy link

jonniebigodes commented Nov 21, 2018

@jgierer12 i just did, the image i posted is a screen grab from windows 10 with chrome and it does that.
I will clear my cache for the gatsby site and retry it to see if it will make the cache soar like the chrome process on my machine

@jgierer12
Copy link
Contributor

Hmm, I still can't reproduce. Tried with ?gatsby- and ?gatsby-404, as well as full and empty cache.

@sidalidev
Copy link
Author

I have the same issue on Firefox 63.0.3 (64-bit), it works on Chrome in Incognito mode, but i blinks 3-4 times before loading correctly.

@jonniebigodes
Copy link

More on the issue at hand.
After leaving the url opened for a bit this is the my data on the gatsby app.
It starts to grow and with that the chrome process going through the roof.
gatsby_malformed_url_cache_size

After clearing the cache and revisiting the url is what the dev console throws.
gatsby_malformed_url_after cleared_cache_error

Also it goes from the url provided to gatsby-404 and back. It will loop between the two urls never ending, even in incognito.

@vtenfys
Copy link
Contributor

vtenfys commented Nov 21, 2018

Hey there, the root cause of this is your adblocker blocking resources (since they contain the word "ad") but next week I'll write a fix which checks for multiple failures to prevent infinite reloading :)

@pieh
Copy link
Contributor

pieh commented Nov 21, 2018

Soooo, while we shouldn't blink like that - that's a bug - the reason why this is happening is because path to results of page query is https://www.gatsbyjs.org/static/d/762/path---starters-gatsby-starter-blog-ad-4-976-0MqaLzYKDy4oEO6kqu9wdOsLoU.json (it contains ad which adblocker then blocks - thanks @davidbailey00 for pointing it out).

And because we fail to get all resources we then do this: https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/cache-dir/ensure-resources.js#L98-L111 which we will need to be better at so we don't do inifinite reload (like in the gif).

@tigrankhachikyan
Copy link

The issue still exists

@vtenfys
Copy link
Contributor

vtenfys commented Nov 26, 2018

@tigrankhachikyan Hence why it is still open :) I'm just going to try fixing this now!

@tigrankhachikyan
Copy link

@tigrankhachikyan Hence why it is still open :) I'm just going to try fixing this now!

Sorry, I saw Closed above, and didn't noticed that it is for a duplicate issue.
Very sorry :)

pieh pushed a commit that referenced this issue Nov 28, 2018
- Check if resources fail (as before)
- Upon any failure, render static HTML instead of dynamically rendering the children
  - Upon initial failure, reload the page and mark the path as failed
  - Upon second failure, don't reload the page and unflag it (since it might have just been a temporary failure and we want it to retry the next time)

Fixes #10074
gpetrioli pushed a commit to gpetrioli/gatsby that referenced this issue Jan 22, 2019
- Check if resources fail (as before)
- Upon any failure, render static HTML instead of dynamically rendering the children
  - Upon initial failure, reload the page and mark the path as failed
  - Upon second failure, don't reload the page and unflag it (since it might have just been a temporary failure and we want it to retry the next time)

Fixes gatsbyjs#10074
@pushkar8723
Copy link

pushkar8723 commented May 24, 2020

I ran into this issue and thought to leave a comment in case anyone else is still facing it.

I forked my repo from gatsby starter blob and this happened to me when I did a gatsby build to figure out some build failure on the server and then switched back to npm run develop. I figured out that it was because of the service worker and just unregistering it and reloading fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

7 participants