React/Github-pages: Failed to load resource: the server responded with a status of 404 () - reactjs

I have successfully uploaded react app`s to github pages before, but this time when I try to upload a new page the code is pushed and everything looks fine in the repository, everything loads fine in the localhost. The problem is when I access the website in the console i get the error message above.
const res = await axios.get(' https://api.open5e.com/monsters/?limit=1086');
I am using this API, the limit is above 50 but I don`t believe this is the reason for the crash but I cannot think of anything else.
Website 1: (Currently redirects you to a 404 error page, as part of my attempt to solve the problem)
https://ottotsuma.github.io/MonsterSearch/
Repo - Website 1:
https://github.com/ottotsuma/MonsterSearch
Website 2:
https://ottotsuma.github.io/MonsterApiReact/
Repo all code:
https://github.com/ottotsuma/DnD-React
I also get this error in localhost and the hosted website: Uncaught TypeError: Cannot use 'in' operator to search for 'default' in undefined. But since the website was working as intended so far I have just ignored it.
I was hoping if anyone else has had a similar problem with gh-pages they might know what I have done wrong.
Kind regards,
Sheep

Related

React-app deployment to Github Pages - Build Successful but deploy failed

Initially, I deployed my React app (created with create-react-app) to Github Pages and it works fine. However, after a few changes to the src files, I wanted to update the website so I decided to re-deploy the app using npm run deploy and it finishes with Published being printed at the end of the command. On Github, the actions shows that the build is successful, but it's not able to deploy, giving me an error code of 400.
Complete error log from Github is as follow:
Actor: github-pages[bot]
Action ID: 1996792679
Artifact URL: https://pipelines.actions.githubusercontent.com/P4vIRQYdOzrk38NoGmJNrF5GvwW7S92VAUyJNinMXyLtZzPbIB/_apis/pipelines/workflows/1996792679/artifacts?api-version=6.0-preview
{"count":1,"value":[{"containerId":354579,"size":3092480,"signedContent":null,"fileContainerResourceUrl":"https://pipelines.actions.githubusercontent.com/P4vIRQYdOzrk38NoGmJNrF5GvwW7S92VAUyJNinMXyLtZzPbIB/_apis/resources/Containers/354579","type":"actions_storage","name":"github-pages","url":"https://pipelines.actions.githubusercontent.com/P4vIRQYdOzrk38NoGmJNrF5GvwW7S92VAUyJNinMXyLtZzPbIB/_apis/pipelines/1/runs/2/artifacts?artifactName=github-pages","expiresOn":"2022-06-15T05:21:40.7473658Z","items":null}]}
Creating deployment with payload:
{
"artifact_url": "https://pipelines.actions.githubusercontent.com/P4vIRQYdOzrk38NoGmJNrF5GvwW7S92VAUyJNinMXyLtZzPbIB/_apis/pipelines/1/runs/2/artifacts?artifactName=github-pages&%24expand=SignedContent",
"pages_build_version": "8e6a4594c3e946a3f32ab67af68f527ec66ffc90",
"oidc_token": "***"
}
Failed to create deployment for 8e6a4594c3e946a3f32ab67af68f527ec66ffc90.
{"message":"Deployment request failed for 8e6a4594c3e946a3f32ab67af68f527ec66ffc90 due to in progress deployment. Please cancel c1852e5059b99567d48405d0610990fdc25f0946 first or wait for it to complete.","documentation_url":"https://docs.github.com/rest/reference/repos#create-a-github-pages-deployment"}
Error: Error: Request failed with status code 400
Error: Error: Request failed with status code 400
Sending telemetry for run id 1996792679
I'm very confused with what the error is, has anyone countered a 400 error code before while deploying to Gh Pages?
Additional Note: If you need any additional information, please do comment below as this is my first time deploying react app to github pages so I would love to help you in helping me
UPDATE
You can visit the github repo here: cynclar.github.io
I haven't found a solution, but I have a workaround. If you go to the last working workflow run in the Actions tab (look for a green checkmark), you can click Re-run all jobs, which should deploy your webpage for you, including the latest changes.
Hope this works for the time being until there is a better solution!
GitHub has fixed the issue:
If you navigate to the Actions tab, find the last deployment, and Re-run all jobs, it should work. I have tried this myself and it has been successful!
I'll leave the last answer up in case this doesn't work for anyone.
I had the same issue and this didn't work, re-running the old deploy used the same code and didn't have my changes. I deleted all the workflows from the github Actions tab and then pushing again triggered a new deployment that worked.

react native 404 not found while using deployed endpoint

I'm using React Native to work on my project. The problem I'm facing: it is working perfectly 200 ok while fetching data locally but, when I try to use after deployment it says 404 not found.
What could be the reason?
A 404 error is an HTTP status code that means that the page you were trying to reach, couldn't be found on their server.

Server up and running but webpage not rendering on heroku local

I am in the process of deploying a dynamic, React.js app to Heroku and wanted to test it out by using 'heroku local' to see if it works before pushing it to Heroku. Everything seemed to be working fine with the server - my database console.log message logs to the terminal signifying everything is going well - but when I try to access the website which is on localhost:5000, I get an error message of 'Cannot GET /' and the console prints a message saying , 'Failed to load resource: the server responded with a status of 404 (Not Found)'. My React.js files are all within the build folder which in conjunction with all of the other files, were pushed to git and commited, but for some reason my files are not showing up. I would greatly appreciate if someone could help me determine what went wrong. Sorry if my question is a little vague; please let me know if I can clarify something in better detail as I am fairly new to programming.
I've added a proxy to one of my package.json files to help with url routing; possibly this could be causing the issue?
Also, if it helps at all, a photo of my folders within Visual Studio code are listed below:

React apps have stopped working on Github Pages - 404 Error

My React Apps were working perfectly on Github Pages until a few days ago, now they are all giving me 404 errors.
I'm not sure what to try, I haven't changed anything so I'm not sure why they're suddenly not working.
Here is a link to an example: https://github.com/paulmartin91/WikiSearch
It used to host a wikipedia search page, but now I'm getting the following...
"
404
File not found
The site configured at this address does not contain the requested file.
If this is your site, make sure that the filename case matches the URL.
For root URLs (like http://example.com/) you must provide an index.html file.
Read the full documentation for more information about using GitHub Pages.
GitHub Status — #githubstatus
"
It is working locally.
Thanks!
All fixed, I was using the github url 'https://github.com/paulmartin91/WikiSearch' as the package.json.homepage instead of the gh-pages url.

unable to use JSP files in google app engine

Sample application works , unable to proceed with creating modifications to project
JDK included in build path (some posts say that lack of that might cause errors)
Error -> Error 403 in web page nothing else printed in console or web page
when I do localhost:8888/test.jsp I get a 404 error
console:
This works ->
<welcome-file>NewFile.html</welcome-file>
This FAILS ->
<welcome-file>guestbook.jsp</welcome-file>
my project directory from eclipse
where am i going wrong or missing something
it looked under WAR but it was not under WAR . some internal problem in my eclipse . now fixed
OLD
NEW

Resources