foma95
September 15, 2022, 6:37am
1
PLEASE help us help you by writing a good post!
we need to know your netlify site name. Example: gifted-antelope-58b104.netlify.app
DNS issues? Tell us the custom domain, tell us the error message! We can’t help if we don’t know your domain.
Build problems? Link or paste the FULL build log & build settings screenshot
The better the post - the faster the answer.
My netlify site is foma78.netlify.com
coelmay
September 15, 2022, 7:19am
2
Hi @foma95
I suspect the issue here is the pathname for assets. For example
<script defer="defer" src="/Fomovie/static/js/main.445e4b63.js"></script>
shouldn’t have /Fomovie
at the start. If there is a homepage
value set in the package.json
of the project, removing the homepage
key should solve it.
foma95
September 15, 2022, 7:43am
3
I’ll check it and get back to you… Thanks
foma95
September 15, 2022, 6:41pm
4
Hi @coelmay
Thanks for your help, the site is running now but i noticed i could use my search function on desktop but not on mobile phones
Foma95.netlify.app
coelmay
September 15, 2022, 9:28pm
5
foma95:
but not on mobile phones
I tested on Firefox and Chrome on Android. It works on Firefox, not on Chrome. This is the same when directly navigating to the search URL e.g https://foma95.netlify.app/search/ghr
. It won’t load movies on Chrome Android, but will load them on everything else. This is possibly (thinking through my fingers here) because you are navigating to /search/{search-term}
rather than returning the search results to the page.
Do note too that the API Key for the The Movie DB is clearly visible in the client-side JS of your app. If you would like to keep this private (and other keys in the future) you would best move this into a serverless function
Last reviewed by Netlify Support on Oct 2023
With Jamstack sites, using API keys/tokens to make API calls to other services is a frequent pattern. In some cases, you may want to hard code the keys in your html, when invoking those API calls - which on a service like Netlify means these keys are now public. Anyone can open their browser dev tools and view them, and of course this can lead to someone abusing this access.
In some cases, this is fine. For instance, some types of Firebase and Faun…
foma95
September 15, 2022, 9:48pm
6
Thanks, i’ll hide the keys… but what’s the solution on the search function
coelmay
September 15, 2022, 9:53pm
7
I don’t know without spending time going through the codebase to see what is happening. It’s called debugging.
foma95
September 15, 2022, 10:06pm
8
Can i snap and send it to you tomorrow?
Not sure what you’re trying to send @foma95 , but most people here would not be able to debug your code for you. That’s something you need to do.