React state not updating with MUI Links in Pages

Can anyone point me in the right direction, I’ve got a react app deployed to Pages using, MaterialUI with Links that don’t work, the URL is updated, but the page state doesn’t alter. Usual excuse, it works fine locally, just not when deployed. I’ve tried downgrading react-router and react-router-dom to the version it was running when it last worked on Pages, but that doesn’t appear to have made much difference. I’m not the most experienced JS developer, so am pretty stumped, I’m also struggling to get Wrangler to proxy the app locally to try and debug it, I just get [wrangler] Could not proxy request: TypeError: fetch failed when running npx wrangler pages dev – yarn start but I don’t think the two are related.


Can you provide more details? What do you mean by the page state doesn’t alter? Can you also share the domain and

Also, did this happen after a specific commit? If you retry one before that, does it work?

Thanks Walshy, is the commit where this is working as expected, is a new deployment of that same commit a new branch based on it. (unless I’ve missed something, which at this point is entirely possible!!) By page state, I mean that when a MUI “Link” is clicked the URL is updated but the page that should be “navigated” to doesn’t load.

Happy to provide whatever other information I can to figure this out, just let me know whatever else you need and thanks again!

I should point out these URLs are behind Cloudflare Access, but I presume you can get around that? The specific deployment ID for last-working is, another point to note, if you hit reload after clicking a link, the page loads as expected so routing appears to work, it’s just when the DOM should be updated to show a new page that doesn’t appear to be working.

Just to add to the weirdness of this, I did a retry deployment of the commit before b1b343f2 which was also working, it’s just deployed as and no longer works, so I’m as convinced as I can be that it’s a Pages issue, but I’m not sure what other troubleshooting I can do to confirm or otherwise.

It seems to be working as expected for me, I click “Pricing” and it goes to pricing (at least the production deploy):

We cannot, that would be a major security issue for our users haha

I’m still not fully sure what the issue is but from what I can tell, things are working as expected for me. I’m also not too sure how Pages would impact that (it’s done in JS not server side).

Production hasn’t been deployed to for quite some time (and does work as expected), all the movement is in the preview branches, I can expose one or more of the deployments publicly, or grant you access to them so that you can see the behaviour.

Based on what I’ve discovered in my last message in the thread, I can replicate the behaviour from a working deployment simply by clicking on retry deployment in the Pages dashboard and then the subsequent deployed code fails to work, the original deployment continues to work. Deployment b1b343f2 continues to work, deployment 5278a837 which is as described, simply a “retry deployment” click, no other interaction, commit or otherwise, does not.

I’m really stumped as to how this can be code related, but I can certainly be convinced of it, but I do share your scepticism because it should just be JS that’s being executed by the browser!

Weirdly, as of last night, everything has started working again, no code changes, commits, pushes etc, just hitting retry deployment on one that wasn’t working, the new deployment works perfectly, the older non-working deployment continues to not work.

I’m super happy that everything has started working again, but utterly flummoxed as to why it stopped in the first place!