Yahoo.util.connect.asyncRequest POST with callback STOPPED WORKING SUDDENLY - ajax

I am using Yahoo.util.connect.asyncRequest POST with callback.
but it stopped working suddenly on UAT environment giving 500 internal server error as "Page not found"
However same code is working fine on dev environment.
It seems Ajax call is failing and not able to reach targeted page. In Firefox and chrome It giving 500 error as page not available.
Is it failing to some security setting in UAT server ( Window 2018) ? How do I log root cause of failure with Yahoo.util.connect.asyncRequest POST with callback.

Related

GoLang SPA returning 500 Internal Server Error on Refresh only

I have a golang API app that is currently serving double-duty as a Single Page App server with static content using the method shown here: https://hackandsla.sh/posts/2021-11-06-serve-spa-from-go/
Everything is working great in terms of navigation until users try to refresh URIs with encoded JSON in them. For example:
/licenses
will refresh file and draw the page as it would normally have appeared through internal history.push()
/licenses/show/%7B"options":%7B"container":"home","field":"date","order":"desc"%7D,"license":"00001a"%7D
will cause the 500 error.
I did the initial development with IIS as a web server so these Refresh errors never happened in that environment. And when the server is ready to be deployed I plan to use Caddy and reverse proxy the API and am assuming it will handle the Refreshes with the same aplomb as IIS.
But for now I am hoping to run tests against my simple server so I'd like to solve this issue out of curiosity in addition to development expediency.
Bottom line: What cause golang http.ListenAndServe to return 500 errors?
UPDATE:
As I need to be able to test and hand off for others I have converted to a querystring which http.ListenAndServe is happy with:
/licenses/show/%7B"options":%7B"container":"home","field":"date","order":"desc"%7D,"license":"00001a"%7D
causes 500 error
/licenses/show?state=%7B"options":%7B"container":"home","field":"date","order":"desc"%7D,"license":"00001a"%7D
works fine

AJAX request terminated abnormally with select photo uploads in Drupal

I'm busy fixing an issue on a site a friend runs for her work. I have worked on this site before, and this is the only Drupal site I have ever worked on, so I am somewhat of a newbie to Drupal. The original dev decided they no longer wanted to maintain it quite some time ago and kind of disappeared shortly after.
The issue:- Most photos upload fine however some cause the following error:
An AJAX HTTP request terminated abnormally. Debugging information follows.
Path: /?q=file/ajax/field_accom_image/und/form--5hp1P7pzFdShaND24CsiI7QNe3f9bApEq9Gu78bRZg
StatusText: n/a
ResponseText: Bad Request Your browser sent a request that this server could not understand. Apache Server at REAL_URL_REDACTED Port 80
ReadyState: undefined
I have found "An AJAX HTTP request terminated abnormally" errors on StackOverflow and the Drupal site, however, none of them had a "ResponseText" of "Bad Request" and a "ReadyState" of "undefined" simultaneously.
This didn't stop me from trying troubleshooting from those answers, such as setting the $base_url variable in settings.php, checking and changing permissions on the server, disable the overlay feature for the admin settings, compressing the image to a smaller file size, dropping the image resolution, removing all possible metadata from the image, checking the upload max file size in the php config.
Drupal version is 7.59

Why is my meteor app getting these errors on firefox but not other browsers?

The web app that I am building in meteor works in chrome and I.E.(Other than a UI bug in I.E.) but it starts acting strange in Firefox. When I run it on my localhost and on the deployment to meteor.com, I don't get any errors in the console in the browsers' developer tools.
When I run it in Firefox, things start acting weird. On Mac OSX, if I run the app on my localhost and open it in FF it is just fine. However, when I open up the app that deployed to meteor.com via meteor deploy [my-app-url].com, I get the following errors but I can still use everything in my app:
Error 1:
mutating the [[Prototype]] of an object will cause your code to run very slowly;
instead create the object with the correct initial [[Prototype]] value using Object.create
Error 2:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource
at https://ddp--3071-[my-app-url].com/sockjs/info?cb=v9pygo9mzn.
(Reason: CORS request failed).
While right now I am not able to figure out what is causing the first error, I am mostly worried about the second error.
When I open up the app from it's deployment in FF on Windows 8, I get the first error once, and then I get the second error repeatedly and the app never loads(it just stays on my loading template from the iron router). My deployed app runs just fine on Chrome and I.E.
I don't send any kind of request to another server in my app, so I am not sure why I am getting a CORS request error. I have not set up SSL or began to make a certificate yet, so I am not sure if this could be causing this kind of error in FF as I got another exception on my login page in FF on my localhost saying that I shouldn't have password elements when I'm not using https.
Does anyone know what could be causing this?
Sorry that I provide any code, as I don't know what code I would post to solve this problem since I don't actually request anything from another server in code that I have written.
Thanks in advance for any responses!
If anyone is interested, it seems as if my combination of the aldeed:collectio2 package and one of my other packages was the cause of my problems. I removed this package and my issues went away.

How to see the debug internal server errors when there is an error in POST done via AJAX in Django

I have defined many views doing 'manual' ajax processing like:
#require_POST
def do_something(request, ...)
....
<some code that bugs>
...
How to get the normal django stacktrace page out of this?
Because of limitations of my current setup (Django is run on a remote host using PyCharm remote debugger and the project is on a NFS share) stopping the server and restarting the server under debugger is not the optimal solution, especially because most of the problems would be easily spotted from the django error page with stacktrace and local variables.
Any other debugging ideas also welcome.
You can view any ajax response in separate "window" with either Firefox or Google Chrome. In Chrome it is the Network tab in developers console.

How to debug "Unknown Server Error"?

I have full control on both server side and client side.
Recently, I am using AjaxControlToolkit.AsyncFileUploader. However under some circumstances, the AsyncFileUploader triggers browser to show an alert box with the word "Unknown Server Error".
I tried to locate all exceptions in Global.asax and tried all three major browsers (FF, IE, Chrome). But it is very strange that
No server side exception can be found in method Application_Error in Global.asax
No client side exception can be found in FireBug, IE Developer Toolbar and Chrome internal debugger.
No error log in Window Event log
So what can I do for this Unknown Server Error?
Thanks!
I fixed the problem already. I set breakpoints on all events header and run the application. Finally I found some events is not triggered which should be triggered.
After fixing this problem, the "Unknown Server Error" is gone.
However, I still don't know how to get more information about the "Unknown Server Error".

Resources