Unable to get property 'forEach' of undefined or null reference

User is getting following error when trying to do an ondemand deployment or when trying to schedule one

“An unexpected error occurred in Octopus v2018.5.1 Unable to get property ‘forEach’ of undefined or null reference”

I am not seeing this as i am an admin, So probably permission related but not sure which one. the same user was able to deploy without any issues prior to upgrading to 2018.5.1.

Hi Sohail,

Thanks for getting in touch,

I’m sorry to hear you are experiencing this issue, I understand this behavior can be frustrating.

In order to assist with this further, can I ask that you include a screenshot/gif of this behavior in addition to an export of the associated users permissions?

You can export the permissions within the Octopus portal via Configuration > Test Permissions and specifying the affected user, an option for export should then appear.

I look forward to hearing back from you regarding this, your patience in this matter is greatly appreciated :slight_smile:

Kind Regards,


Attached is the error screenshot and the permission export.


Permissions_export_2018_06_07__16_27_31_UTC.csv (4.21 KB)

Hi Sohail,

Thanks for getting back to me, your patience is greatly appreciated.

Unfortunately, I wasn’t able to reproduce the same issue you are experiencing with the associated permissions, however, I did experience a variant of the TypeError when accessing Scheduled Triggers when the Lifecycle of the Project contained environments the logged-in Users Team was not scoped to.

In order to troubleshoot this further, it would be valuable if you could upload an SQL database backup for investigation purposes. Only we have access to view and access these files and will allow only upload access to you. After the investigation is complete these files will also be destroyed for privacy purposes.

I’ve included a link to the upload area here

In the interim, as this TypeError warning appears to be specific to the V4 UI, I’m wondering if you can replace app# with oldportal# in the Octopus URL to navigate Octopus using the V3 UI, as it might become apparent what the root cause is when navigating back to the affected area and will allow you to rectify the issue. (i.e. the error relates to a null value, it’s possible an environment may be referenced that no longer exists for instance)

I look forward to hearing back from you, I hope this helps! :slight_smile:

Kind Regards,


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.