What does "Visualforce Remoting: Context incomplete" mean? - visualforce

When using javascript remoting in a VisualForce page, I get a warning in my javascript console, "Visualforce Remoting: Context incomplete".
What does it mean, and what are the implications?

This message means that Visualforce remoting internals were not added to the remoting request.
Are you still seeing this Javascript console message? If you were seeing this message and your remoting transactions were working as expected, it's likely you were seeing an innocuous bug that has been fixed. If you're seeing this warning and your transaction is failing, please post to the Visualforce message boards giving details (https://bitly.com/). Thanks.

Related

Why when I return back from login to I get an ERROR with the sample app?

This is in regards to the sample: msal-web-sample-0.1.0
I am using tomcat 9 and maven to build and run the msal-web-sample code. It is building fine and running, loading spring, etc. I am able to go out and get a username and passowrd login. However, when it tries to return back to my system (https://localhost:8443/msal4jsample/secure/aad) it just has a bit "ERROR PAGE!" heading with Home Page link going back to the main tomcat page.
In the tomcat runtime it has:
2021-06-29 15:28:06.108 ERROR 6360 --- [io-8443-exec-10] o.s.b.w.servlet.support.ErrorPageFilter : Cannot forward to error page for request [/secure/aad] as the response has already been committed. As a result, the response may have the wrong status code. If your application is running on WebSphere Application Server you may be able to resolve this problem by setting com.ibm.ws.webcontainer.invokeFlushAfterService to false
Of course, that doesn't apply to my setup.
I see the get in the logs returning back OK and don't see any errors on startup. I am at a loss as to where to go from here. Any thoughts?
Also, is there a non-spring implementation that can be used with java but still using MSAL?
Thanks
Alan
Please share additional information about the error. Do you have trouble regrading AAD? Check your environmental settings (Tomcat) if this isn't the case.

How to log errors when Play Evolutions fail?

I am just getting started with Play Evolutions and I find it pretty tough to figure out why they fail and leave the DB in an inconsistent state.
In Dev mode it will display the error in the default HTML page but it does not say which statement failed. This is also problematic since for this particular application I only have REST APIs that return JSON and so an HTML error is not appropriate. I have my own error handler so I will probably end up matching on ExceptionAttachment and pull out the content/script myself and escape that in the JSON error response. However this is only in DEV mode since I would not want this going back to a real user in PROD.
More frustrating is that it doesn't even log the statement when it fails. I can enable logging for my driver but once the failure has occurred it is too late to then go and enable logging.
Is there anyway to get a more specific error in the logs when an evolution fails?

Can sitebricks be configured to not say "Sitebricks received a null reply from the resource..."?

In some error cases including the one above Sitebricks adds a stack trance to the response. This is a security issue with leaking information. We plug the problems we find but is there a way to tell site bricks never to send stack traces?
The problem is not at the Sitebricks level but at your servlet container or Filter level. If you are using a normal servlet container you should configure error pages in web.xml using the directive:
http://www.tutorialspoint.com/servlets/servlets-exception-handling.htm
Alternatively, you can use a filter to check if the response code is not 2XX and display a custom error page yourself.
Sitebricks shows the error trace as a debugging tool.

What other 5xx errors could be occuring and how to I find/track them?

I have a Classic ASP/VBScript site running on IIS 6, and a program called SmarterStats (found via an earlier question) providing various stats and info from the server logs. This is an internal site, and we do use integrated authentication (AUTH_TYPE = Negotiate).
I'm looking at the report on response codes, and it says that in the last 7 days there have been 255 responses with a 5xx error code... naturally not the most useful stat I could get back.
I have a custom error page for 500 and 500.100 errors that logs the specifics for me to follow up on - and that log is virtually empty. I've tested with an intentionally broken page, and a standard user account, and it is working as expected - custom message, log entry made. (and checked with "friendly error messages" on and off - works either way)
The only entry I have in the log is a single entry for an error -2147024843 (authentication related, took too long to get a response), and that's it... what other errors could be happening and how can I find/track them?
Should I route all the different types of 5xx errors through my custom page? Or is there something else I should be doing?
Resolution: I'm going to go with running all 5xx errors through the custom page. For reasons that leave me totally baffled, the errors have stopped... I've not changed anything, no one has changed anything on that server - but the errors have stopped. Go figure.
It seems like logging all 5xx errors via your custom page might be a good idea. Your logging seems to be working, but SmarterStats seems like it might be giving you bogus data?
What version of SmarterStats are you using?
My hosting provider has Version 5.2 and I can see a detailed list of which pages have produced a 5xx error by going to Report Items > Server Responses > 5xx - Server Errors in the navigation tree. The report that gets displayed has a table listing the pages that have produced the error codes so you can then go investigate those pages to see what may be causing the error.
Depending on your site the error might be perfectly normal, for example I have some custom HTTP handlers which implement a standardised HTTP protocol which actually specifies that 5xx errors should be thrown under certain circumstances.
Though this shouldn't apply to an internal only site on public websites it is sometimes the case that badly written crawlers will access your pages in such a way as to produce an error

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