Fatal error when calling system/user from custom script. (sometimes)

I am using an AWS Bitnami Dreamfactory instance with version 1.8.2, periodically I am getting the following error:

Fatal error: Cannot use DreamFactory\Platform\Yii\Models\Config as Config because the name is already in use in /opt/bitnami/apps/dreamfactory/htdocs/vendor/dreamfactory/lib-php-common-platform/src/Resources/System/User.php on line 31

This happens when I call:

var user = platform.api.get(‘system/user/’ + record.owner_id);

The code is located in a custom script which is called each minute (cronjob). The calling user is not the same user as ‘record.owner_id’. Other api calls in this script are always working fine, its only the system/user call that returns this error.

Sometimes it works fine for days and then suddenly it doesnt work for hours. When it doesnt work it usually returns this exceptions and sometimes a 503 server error.

The log in dreamfactory/htdocs/log/web.***.log shows the following message:
REST Exception #404 > “customScript” was not found. {“host”:“localhost”,“request_uri”:"/rest/system/script/customScript?is_user_script=true",“source_ip”:“127.0.0.1”,“sapi_name”:“fpm-fcgi”}

(I just tried to call system/user from the Api docs page, this worked, and immediatly after that my cronjob script also worked again)

Any help is appreciated : )

Jack

There was a potential naming conflict that was resolved in 1.9.2. I recommend updating to the current version (1.9.2) to resolve your intermittent issue.

Thanks for your reply, I’ll try updating to 1.9.2 in the next couple of weeks…