Failed to load resource: the server responded with a status of 500 (.) - javascript

I used the render site for using my project as a live server and also used the vercel site for deploying my project.
Everything should be alright there is no error, but when I click my live server site name and run it, it shows an error which I give a picture of this issue.
What should I do next to solve this problem? I already recheck a couple of times and Everything goes alright

HTTP status 500 mean Internal Server Error. You should check your server error log.

Some resources for example images or js or CSS files not found. Probably after unloading the project in the live server. Some photos, js, or CSS file paths are not found or are not readable.

Related

Not a valid origin

I'm trying to replicate a prior project written in pure JS into a React project. This project makes extensive use of the Google API JavaScript Client to access the Youtube Data API, and I'm encountering problems I did not encounter on the original project.
The error I encounter is odd and I shall explain. I have added the following to my api key/ oauth client credentials: http://localhost:8000. Actually, this is how it was on the original project - it is unchanged. What is odd now is this error I get:
"Not a valid origin for the client: http://Localhost:8000 has not been whitelisted for client ID {id}. Please go to https://console.developers.google.com/ and whitelist this origin for your project's client ID."
I double checked and it is in fact present, but I noticed that the first letter in "local" is uppercased, so I added that specifically. The whitlisted urls are now as follows:
http://localhost:8000
http://Localhost:8000
After adding that, I get the same error again, but missing a second L - http://LocaLhost:8000.
A few prior searches on stack overflow mentioned clearing browser cache and hard reloading but that has not solved this issue. Does anyone have any suggestions as to what the error may actually be?
EDIT: I've narrowed this down to have something to do with React. If I pull up my old project on my local host it works successfully on the default port for Live Server - 5500. Though if I try to run the React app on my localhost:5500 after closing live server, it fails. Any ideas?

wordpress https effects.js issue

I added SSL to a domain running Wordpress. When I access through https I get
Reference error: $ is not defined in resources/effects.js and the functions using this script break.
If I access through http then no error.
I did a Google search but could not find any reference to an issue like this. Any ideas?
I found the issue and solution. Turns out the particular jquery library i was calling was not available from the cdn over a https connection. It took a while to figure out because i was using the Firefox console to debug and it showed a successful connection, 200 OK. I eventually switched to Chrome js console and it showed this error: Failed to load resource: net::ERR_INSECURE_RESPONSE.
Also Google does not host the 1.2.7 library and the only cdn i could find that has it is cloudflare:
https://cdnjs.cloudflare.com/ajax/libs/jquery-tools/1.2.7/jquery.tools.min.js

Javascript not working on all Heroku pages

I have a Rails 4 app that I am deploying to Heroku. The asset pipeline seems to be doing its job and minifying the js file. Everything works fine in development. After I push to Heroku, the js file will only work on certain pages. I am doing a the same AJAX PUT on multiple pages, and on some pages it works fine, other pages I get a 404 error.
PUT http://thawing-thicket-4506.herokuapp.com/scouts/1/reqs 404 (Not Found)
Here is the filename: application-5f31b026bf954dbd536069113d4c4345.js and the version appears to be the same for both pages using the file.
What could be the cause of this? Any help would be great. Please ask for any other info that would be helpful.
I had some data-attributes messed up. It was erroring out on the server and returning a 404. I started to get the same error in my dev environment and was able to follow the stack trace. Thanks for the help.

Javascript library (tabSlideOut) hosted on GoogleCode returning 403 error

One of the Javascript files we use in a website is reporting a 403 error when we try to request it from googlecode.com.
http://tab-slide-out.googlecode.com/files/jquery.tabSlideOut.v1.3.js
Failed to load resource: the server responded with a status of 403 (Forbidden)
This has previously been working without any problems for many months.
The problem is inconsistent in that it seems to work in my office but if I log on to an external machine it returns the 403. This may be down to caching so I'm not focusing too much on that.
Does anybody have any ideas how this might have happened? It's quite worrying that code hosted externally can suddenly be inaccessible!
It seems working at my end as well.
You may track the URL requested using firebug.
or
Please provide the URL of webpage in which you are accessing JS file because sometimes cross site scripting is the reason.
Thanks,
Krishan
Alan, I had to find another source for the .js file. I downloaded it from the page below and referenced it from within my site. The file I found is under the Android section of code.google.com, but it appears to be working fine:
http://code.google.com/p/androidoc/downloads/detail?name=jquery.tabSlideOut.v1.3.js&can=2&q=
Vince

How do I start the server in the Rdio web playback API example?

I am trying to get the "hello world" app for the Rdio web playback API working. I cloned the repo and opened the hello.html file. When I click play, the following error appears:
Uncaught TypeError: Cannot call method 'rdio_play' of null
I am getting that error because apiswf, which rdio_play is being called on, is null.
The relevant code: apiswf.rdio_play($('#play_key').val());
In the issues for the repo, I found that another user had the same problem. That user figured out that her problem was that she hadn't started the local server. So it seems that the local server, if it was running, would put the needed swf in the element #apiswf. But it's not running.
After carefully reading the readme and the comments in the code that it directed me to, and what seemed to be the relevant parts of the Javascript, I still don't understand how to start the local server. Thank you.
I will answer my own question. I asked about this in the issue I linked to in the question details, and the following has now been added to the project's readme:
You must run this example from a web server (local or otherwise). The
Web Playback API does not support urls that begin with 'file://'.
So, it wasn't working for me because I was just opening the hello.html file from my file manager. I needed to be serving the file from a server. I set up a simple, local node.js server to serve the files, and it then worked.

Categories

Resources