"Cannot read properties of null" error when attempting to create new process report

Using Optimize 3.7.1, freshly downloaded and unzipped against the optimize demo camunda project located at GitHub - NPDeehan/OptimizeTutorialCamundaEngine: This is a Camunda spring boot application and m2 database with data for the Camunda Optimize tutorial results in the following error:

An application error occured. Refresh your browser or close it and sign in again.
Cannot read properties of null (reading 'toLowerCase')

image

image

2022-02-07 12.12.55

Hey @Kyle_Hatfield,

thank you for your question. We recently spotten this behavior in Optimize when there is a process definition in Elasticsearch with no name (which means that the field name has null on the value). Could you maybe check if this is the case?

If so, then we have added a fix in the 3.7.2 patch release for that issue. In the meantime you could try tho to update your Elasticsearch data like so:


curl --location --request POST 'http://localhost:9200/optimize-process-definition/_update_by_query?pretty' \
--header 'Content-Type: application/json' \
--data-raw '{
    "script": {
        "source": "ctx._source.name = '\''<DefinitionName>'\''",
        "lang": "painless"
    },
    "query": {
        "bool": {
            
            "must": [
            {
                    "match": {
                    "id": "<processDefinitionId>"

                
                }
            }
        ]
    }
    }
}'

You can execute the above curl to set the name in the optimize-process-definition index. You will need to replace the and with the correct values for the definition you wish to update.

I hope you found this helpful.

Cheers,
Andromachi

1 Like

Yep, that was the issue. I had left ES running while switching between a couple of different camunda engines, so ES had some processes stored that optimize couldn’t reach.