Empty context.json prevents access to app (v1.6)

Greetings –

We report a situation with Ood 1.6. A problem was resolved yesterday related to an empty context.json file. To be clear, the file existed, but had no contents (file size 0). As a result, the enduser was unable to access the form for an interactive application (in this case, an implementation of kde desktop).

The error to the end user was ‘Internal Server Error’.

Removing the file resolved the problem.

Perhaps error trapping against an empty context.json would be appropriate?

From a diagnostic point of view, we were able to look in the error_ssl logs (/var/log/httpd24) and the user-level nginx logs to see http error codes, e.g.

Was there other information to glean from these log files? or other log files to examine?

~ Em
ps planning an upgrade to latest release 1.8.x this week.

Thank you for the report! Those are the two locations you would look for an error like this.

In 1.8 an exception raised around reading this context.json file will result in a warning message displayed to the user and the web form with default values set https://github.com/OSC/ondemand/blob/4a3be9df479ea14ce89c70abf393f684ca8c22fa/apps/dashboard/app/controllers/batch_connect/session_contexts_controller.rb#L12-L16

After you upgrade if you still have problems with this please let us know.