# Kibana anonymous access "TypeError: Cannot read properties of null (reading 'statusCode')"

**URL:** <https://discuss.elastic.co/t/kibana-anonymous-access-typeerror-cannot-read-properties-of-null-reading-statuscode/359267>\
**Category:** Kibana\
**Tags:** docker\
**Created:** [May 10, 2024, 1:31pm UTC](https://discuss.elastic.co/t/kibana-anonymous-access-typeerror-cannot-read-properties-of-null-reading-statuscode/359267 "2024-05-10T13:31:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nnikushkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nnikushkin/32/122950_2.png) [@nnikushkin](https://discuss.elastic.co/u/nnikushkin)\
**Post date:** [May 10, 2024, 1:31pm UTC](https://discuss.elastic.co/t/kibana-anonymous-access-typeerror-cannot-read-properties-of-null-reading-statuscode/359267/1 "2024-05-10T13:31:51Z")

</div>

Hello guys!

I faced the issue that my dashbaords and data views break

How I reproduce my issue:

1. Deployed Elastic and Kibana 8.13.3 and logged in under `elastic` superuser to Kibana
2. Added "Sample eCommerce orders" sample data set
3. Navigated to "Editing [eCommerce] Revenue Dashboard" dashboard
4. Everything works fine
5. Redeployed Kibana with anon access directives in my "kibana.yml" file:

```auto
xpack.security.authc.providers:
      basic.basic1:
        order: 1
      anonymous.anonymous1:
        order: 0
        credentials:
          username: anonymous_service_account
          password: anonymous_service_account_password

```

6. Logged in under `elastic` superuser (not `anon` user) to Kibana and navigated to "Editing [eCommerce] Revenue Dashboard" dashboard
7. Almost all visualizations are broken with error:  
` Could not locate field: <field_name> `  
for example:  
` Could not locate field: category.keyword `  
In the right corner there is the following error appears:

````auto
   TypeError: Cannot read properties of null (reading 'statusCode')
   at http://kibana.example.com/003e4a429463/bundles/plugin/dataViews/1.0.0/dataViews.plugin.js:1:42549
   at async data_views_service_public_DataViewsServicePublic.refreshFieldSpecMap (http://kibana.example.com/003e4a429463/bundles/plugin/dataViews/1.0.0/dataViews.plugin.js:1:31250)
   at async data_views_service_public_DataViewsServicePublic.initFromSavedObjectLoadFields (http://kibana.example.com/003e4a429463/bundles/plugin/dataViews/1.0.0/dataViews.plugin.js:1:32799)
   at async data_views_service_public_DataViewsServicePublic.initFromSavedObject (http://kibana.example.com/003e4a429463/bundles/plugin/dataViews/1.0.0/dataViews.plugin.js:1:33343)
   ```	

````

8. If I go to "Data Views \> Kibana Sample Data eCommerce" there are no fields and the same error as above appears

I tried to reload the problem pages with Developer Console (F12) to get some errors but did not find anything that differ from "initial state before I enabled anon access"

In Kibana logs with Debug I did not find "Cannot read properties of null" event

Kibana and Elastic are both 8.13.3 version

I found these topics:

> [@Kibana in ARM64 TypeError: Cannot read properties of null (reading 'message')](https://discuss.elastic.co/t/kibana-in-arm64-typeerror-cannot-read-properties-of-null-reading-message/284814/2):
>
> Welcome to our community! smiley Can you please edit your post to remove the code formatting from the non-code sections? It's very hard to read otherwise.

> [@TypeError : Cannot read properties of null ( reading time\_out)](https://discuss.elastic.co/t/typeerror-cannot-read-properties-of-null-reading-time-out/292864):
>
> Hi everyone, @Badger Getting this error while searching and loading for data of indices in Kibana. TypeError : Cannot read properties of null ( reading timeout) . it is referring to response handle js files. Pls Suggest

> [@Kibana 17.1 restarting after: "TypeError: Cannot read properties of undefined (reading 'isServer')"](https://discuss.elastic.co/t/kibana-17-1-restarting-after-typeerror-cannot-read-properties-of-undefined-reading-isserver/299727/3):
>
> We are using the same official images for all containers: docker.elastic.co/elasticsearch/elasticsearch:7.17.1. So ES containers would have the same JDK version, which seems to be 17.0.2

> [@TypeError: Cannot read property 'message' of null](https://discuss.elastic.co/t/typeerror-cannot-read-property-message-of-null/110196/3):
>
> For sure! Here is the kibana client side error from the ajax request followed by the json console output. TypeError: Cannot read property 'message' of null at https://\<hostname\>/kibana/bundles/kibana.bundle.js?v=16070:231:27746 at processQueue (https://\<hostname\>/kibana/bundles/commons.bundle.js?v=16070:39:9912) at https://\<hostname\>/kibana/bundles/commons.bundle.js?v=16070:39:10805 at Scope.$digest (https://\<hostname\>/kibana/bundles/commons.bundle.js?v=16070:39:21741) at Sc…

> [@TypeError: Cannot read property 'suggestion' of null](https://discuss.elastic.co/t/typeerror-cannot-read-property-suggestion-of-null/208665):
>
> Search ui is throwing error on pressing esc button. Steps to reproduce : Enter text for search and select search text from suggestions. 2.Press esc key to clear input it will throw 'Cannot read property 'suggestion' of null'

but none of them helped

The issue reproduces only if I launch it in Openshift  
No issue in Docker with the same configuration  
No issue in minikube with the same configuration

Did I miss something regarding setting anon access for Kibana in Openshift via Helm Charts (cannot use ECK unfortunately)?

Thank you!

Images:

 ![anon_issue_01](https://us1.discourse-cdn.com/elastic/original/3X/9/0/9051aad834fcff4ee763cbac64eaea4ca186c77a.png)  
 ![anon_issue_02](https://us1.discourse-cdn.com/elastic/original/3X/6/0/60adf5d16e5ce84ba2e63ca6566f61f33bd6e591.png)  
 ![anon_issue_03](https://us1.discourse-cdn.com/elastic/original/3X/c/a/ca99657ae67d41be369dff04a42587613f3d1e61.png)

---

<div class="post-metadata">

**Author:** ![nnikushkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nnikushkin/32/122950_2.png) [@nnikushkin](https://discuss.elastic.co/u/nnikushkin)\
**Post date:** [May 24, 2024, 3:49pm UTC](https://discuss.elastic.co/t/kibana-anonymous-access-typeerror-cannot-read-properties-of-null-reading-statuscode/359267/2 "2024-05-24T15:49:38Z")

</div>

Looks like an approach with Helm charts is indeed not supported anyhow further

I deployed Elastic and Kibana via ECK operator and it works fine on Openshift

I think this topic may be closed
