cli-guides icon indicating copy to clipboard operation
cli-guides copied to clipboard

404s loading .json files

Open simonihmig opened this issue 5 years ago • 7 comments

Seems the index pages all trigger a request to a non-existing .json file:

image

simonihmig avatar Nov 26 '18 22:11 simonihmig

Thanks @simonihmig.

@mansona was this fixed in another version of Guidemaker and then there was a regression?

jenweber avatar Nov 27 '18 00:11 jenweber

So it's not "fixed" in another version, it's more so just expected behaviour. Because this is an entirely static build we don't have the affordance of relying on a "try-files" behaviour of a server.

When you go to https://cli.emberjs.com/release/advanced-use/ the app is first checking to see if you're looking for the file /advanced-use.json but it then checks to see if you're not looking for a direct file in the case of a 404, but that you might be "in a folder" so it checks for /advanced-use/index.json

@simonihmig are you noticing any issues because of the 404s? is the app behaving correctly?

mansona avatar Nov 27 '18 10:11 mansona

are you noticing any issues because of the 404s? is the app behaving correctly?

No, actually not. But at least to me it "feels" wrong, to see those red lines in the console output. And most probably it has some performance costs...

simonihmig avatar Nov 27 '18 20:11 simonihmig

@simonihmig you are correct in saying there are performance costs, as there will be a double round-trip in these cases.

The architecture of the Ember Guides App (and all this tech is just that same app in a slightly more generalised way) vastly favoured simplicity so that we could encourage as many contributions as possible.

We are at the point now that it is likely that we can spend some cycles coming up with a solution to this issue but for now I think it has a relatively low priority 🤔 I could be wrong. If you wanted to pair on figuring it out we could live-stream the investigation 😉

mansona avatar Nov 28 '18 00:11 mansona

@simonihmig this is mostly not happening anymore as far as a I can see. Good to close? I still see version.json 404'ing, but I'm guessing that's a separate issue

mehulkar avatar Apr 03 '20 00:04 mehulkar

@mehulkar thanks for the reminder. I just did test it out again, but still there are some 404s coming up. It seems this is still the case for every first page of a new chapter (basic use, advanced, addons etc.):

image

simonihmig avatar Apr 03 '20 09:04 simonihmig

This just requires an update to guidemaker for it to be fixed 👍 it was fixed in a bugfix upstream

You might have to update guidemaker-ember-template at the same time 🤔 but you shouldn't 😂

mansona avatar Apr 06 '20 14:04 mansona