I have deployed a static website on render, I have a different local site im working on that you can navigate to my deployed app on render.
However , when the link is the deployment link and i navigate there
( https://My-Render-App-Example.onrender.com – Not real link) , it works fine and gets me to my deployed app , but when i make it so that the link is actually some other page of my app like say searching a movie so something like ''https://My-Render-App.onrender.com/search/movie-name instead i get a blank white page saying Not Found and giving me this error
banana here is the search term i use in ReactJs with react-router as a searchParam
So although searching for a movie works fine when using the app , when i try to redirect to the searching movie page from external link , it doesnt work
Hi there
Thanks for reaching out.
It helps to have real URLs when giving examples, however, at a guess, I suspect you’re likely running a single page app with client-side routing, so you would need to rewrite all requests to your index.html
. Redirects and Rewrites
You’ll probably need setup a Rewrite on the Static Site with a Source of /*
to Destination index.html
.
If that’s not the issue, please elaborate on your set up/example.
Thanks.
Alan
This is my setup on the app container , so yeah it is client side
https://movie-app-stbj.onrender.com/search/banana
by clicking the first link and searching for banana , it works , but by pasting second link on browser , it doesnt work .
thnx for replying btw , that was very fast !
Ok thanks for confirming, have you tried the suggestion of adding the rewrite described in my last message?
Alan
The first looks like code error, content.js
line 237. And appears to be an undefined
error. I didn’t see these when looking at your site
The others I’m not familiar with, but a quick search brought up this StackOverflow with the same error: https://stackoverflow.com/questions/54126343/how-to-fix-unchecked-runtime-lasterror-the-message-port-closed-before-a-respon
Alan
If you wouldnt mind checking one more time , this is the error i get :
thank you for all this help so far btw , didnt know the community was so responsive
I’m from Render support, we keep an eye on community posts to help out.
However, we’re not able to support code issues, as every app is different. This doesn’t appear to be an issue with the platform. The screenshoot seems to show that the pre
variable is undefined
, you’ll need to look into debugging the issue working back from that point.
Alan
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.