Troubleshooting pointers

Having understood the different ways to debug web scripts in Alfresco, let's take a look at some of the troubleshooting pointers for some common issues you might come across while working with Alfresco web scripts.

A valid SecureContext error

You might have sometimes faced the error A valid SecureContext was not provided in the RequestContext. There can be many reasons for getting this error. Some of them are listed as follows:

  • When you have set authentication to none in the web script description document, and in the controller you are trying to invoke some public services of Alfresco that require authentication, for example, calling the toDisplayPath() method, it will give you the mentioned exception.
  • If you have a JavaScript-backed ...

Get Learning Alfresco Web Scripts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.