# ERROR: "Unable to change your Space" occurred but no logs

**URL:** <https://discuss.elastic.co/t/error-unable-to-change-your-space-occurred-but-no-logs/232995>\
**Category:** Kibana\
**Created:** [May 17, 2020, 3:19pm UTC](https://discuss.elastic.co/t/error-unable-to-change-your-space-occurred-but-no-logs/232995 "2020-05-17T15:19:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![liu78778](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liu78778/32/64678_2.png) [@liu78778](https://discuss.elastic.co/u/liu78778)\
**Post date:** [May 17, 2020, 3:19pm UTC](https://discuss.elastic.co/t/error-unable-to-change-your-space-occurred-but-no-logs/232995/1 "2020-05-17T15:19:09Z")

</div>

**Kibana version** : 7.4.2

**Elasticsearch version** : 7.4.2

**Server OS version** : CentOS Linux release 7.4.1708 (Core)

**Browser version** : Chrome 80.0.3987.132

**Browser OS version** : Windows 10.0.18363

**Original install method (e.g. download page, yum, from source, etc.)** :  
Clone form [https://github.com/elastic/kibana.git](https://github.com/elastic/kibana.git)

**Description of the problem including expected versus actual behavior** :  
I started Kibana according to the guidance of this document:  
[kibana-contributing-code](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#contributing-code)

But when I visited Kibana I got an error: Unable to change your Space

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/5/f57825e5d4d5c03cf808cb8571591ba651fd91c5.jpeg)

Does anyone know what is going on?

---

<div class="post-metadata">

**Author:** ![lukeelmers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukeelmers/32/35230_2.png) [@lukeelmers](https://discuss.elastic.co/u/lukeelmers)\
**Post date:** [May 18, 2020, 10:26pm UTC](https://discuss.elastic.co/t/error-unable-to-change-your-space-occurred-but-no-logs/232995/2 "2020-05-18T22:26:55Z")

</div>

Hi @liu78778,

In 7.4.2, it looks like the only time this error message is created is when [a `POST` to the select space API](https://github.com/elastic/kibana/blob/85522c6a120263141f6f163842c1ad43dda25d95/x-pack/legacy/plugins/spaces/public/lib/spaces_manager.ts#L91-L104) fails.

Since this request occurs from the client, you should be able to get more info from inspecting your browser's network requests... what response are you seeing from that API call?

---

<div class="post-metadata">

**Author:** ![liu78778](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liu78778/32/64678_2.png) [@liu78778](https://discuss.elastic.co/u/liu78778)\
**Post date:** [May 19, 2020, 12:15pm UTC](https://discuss.elastic.co/t/error-unable-to-change-your-space-occurred-but-no-logs/232995/3 "2020-05-19T12:15:08Z")

</div>

Hi @lukeelmers,  
Thanks for your reply. Here is the response.

```json
{"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}

```

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/c/4c44437f04787db25ab7c39d06db23fb9a43839b.png)

BTW, If I use the release version, there is no problem. Same es cluster.

---

<div class="post-metadata">

**Author:** ![lukeelmers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukeelmers/32/35230_2.png) [@lukeelmers](https://discuss.elastic.co/u/lukeelmers)\
**Post date:** [May 20, 2020, 4:12pm UTC](https://discuss.elastic.co/t/error-unable-to-change-your-space-occurred-but-no-logs/232995/4 "2020-05-20T16:12:10Z")

</div>

Thanks, this is helpful. Does anything change if you try re-authenticating (log out & back in)? I assume you are logging in with `elastic`/`changeme`?

What do you see when running Kibana with verbose logs (`yarn start --verbose`)? That may provide a bit more insight as to why you are getting a 401.

---

<div class="post-metadata">

**Author:** ![liu78778](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liu78778/32/64678_2.png) [@liu78778](https://discuss.elastic.co/u/liu78778)\
**Post date:** [May 22, 2020, 3:48pm UTC](https://discuss.elastic.co/t/error-unable-to-change-your-space-occurred-but-no-logs/232995/5 "2020-05-22T15:48:08Z")

</div>

Thanks @lukeelmers, The following is the log after I run `yarn start --verbose`.

etc. There is no logout button on this page so I cannot log out ☹

```auto

server log [15:04:26.776] [debug][plugin] Checking Elasticsearch version
server ops [15:04:28.395] memory: 344.9MB uptime: 0:02:45 load: [0.00 0.00 0.00] delay: 0.110
server log [15:04:28.952] [debug][server][Kibana][cookie-session-storage][http] Error: Unauthorized
server log [15:04:28.953] [debug][basic][plugins][security] Trying to authenticate user request to /api/spaces/v1/space/default/select.
server log [15:04:28.953] [debug][basic][plugins][security] Trying to authenticate via header.
server log [15:04:28.954] [debug][basic][plugins][security] Authorization header is not presented.
server log [15:04:28.967] [debug][authentication][plugins][security] Could not handle authentication attempt
server log [15:04:28.968] [debug][license][xpack] Calling [data] Elasticsearch _xpack API. Polling frequency: 30001
server respons [15:04:28.951] POST /api/spaces/v1/space/default/select 401 69ms - 9.0B
server log [15:04:29.067] [debug][kibana-monitoring][monitoring] Uploaded bulk stats payload to the local cluster
server respons [15:04:29.109] GET /built_assets/dlls/icon.cross-js.bundle.dll.js 200 20ms - 9.0B
server respons [15:04:29.108] GET /built_assets/dlls/icon.alert-js.bundle.dll.js 200 24ms - 9.0B
server log [15:04:29.306] [debug][plugin] Checking Elasticsearch version
server log [15:04:30.862] [debug][kibana-monitoring][monitoring] Received Kibana Ops event data
server log [15:04:30.863] [debug][kibana-monitoring][monitoring] Received Kibana Ops event data
server log [15:04:30.891] [debug][kibana-monitoring][monitoring] Received Kibana Ops event data
server log [15:04:30.892] [debug][kibana-monitoring][monitoring] Received Kibana Ops event data

```

---

<div class="post-metadata">

**Author:** ![lukeelmers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukeelmers/32/35230_2.png) [@lukeelmers](https://discuss.elastic.co/u/lukeelmers)\
**Post date:** [May 25, 2020, 8:46pm UTC](https://discuss.elastic.co/t/error-unable-to-change-your-space-occurred-but-no-logs/232995/6 "2020-05-25T20:46:37Z")

</div>

> [@liu78778](#):
>
> There is no logout button on this page so I cannot log out

Try navigating to `localhost:5601/logout` first, then see if re-authenticating helps.

And just to confirm: are you logging in using the default `elastic` and `changeme` credentials?

---

<div class="post-metadata">

**Author:** ![liu78778](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liu78778/32/64678_2.png) [@liu78778](https://discuss.elastic.co/u/liu78778)\
**Post date:** [May 26, 2020, 12:47pm UTC](https://discuss.elastic.co/t/error-unable-to-change-your-space-occurred-but-no-logs/232995/7 "2020-05-26T12:47:24Z")

</div>

Thanks for your replay @lukeelmers

I tried to log out, the logout itself was successful, but there is still a problem with re-logging, it didn't work.

This is my `kibana.dev.yml` 's content, and I used the same account and password to log in:

```auto
elasticsearch.hosts: ["http://xx.xx.xx.xx"]
elasticsearch.username: "elastic"
elasticsearch.password: " ******"
elasticsearch.ssl.verificationMode: none

```

---

<div class="post-metadata">

**Author:** ![lukeelmers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukeelmers/32/35230_2.png) [@lukeelmers](https://discuss.elastic.co/u/lukeelmers)\
**Post date:** [June 2, 2020, 5:02pm UTC](https://discuss.elastic.co/t/error-unable-to-change-your-space-occurred-but-no-logs/232995/8 "2020-06-02T17:02:23Z")

</div>

Awhile back we forbid the use of the `elastic` username in local development to avoid bugs, as it is technically a superuser account, which is easy to forget. Instead we recommend using `kibana` (which has the same default password of `changeme` in local development).

Try using this in your `kibana.dev.yml` and see if it helps:

```auto
elasticsearch.username: "kibana"
elasticsearch.password: "changeme"

```

I'm not 100% sure if this will solve your problems as there should be an error related to this in the logs, but worth a shot just to be sure.

---

<div class="post-metadata">

**Author:** ![liu78778](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liu78778/32/64678_2.png) [@liu78778](https://discuss.elastic.co/u/liu78778)\
**Post date:** [June 7, 2020, 12:19pm UTC](https://discuss.elastic.co/t/error-unable-to-change-your-space-occurred-but-no-logs/232995/9 "2020-06-07T12:19:01Z")

</div>

Hi @lukeelmers

I heard your opinion and configured the kibana user, now there are two situations:

1.If I log in to Kibana as a kibana user, 403 Forbidden will appear  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/2/a22540157ed02fb38f6932e02b2ed1bbbe224e37.png)

```auto
 ops [12:15:06.507] memory: 348.4MB uptime: 0:02:57 load: [0.00 0.00 0.00] delay: 0.065
server log [12:15:07.872] [debug][plugin] Checking Elasticsearch version
server log [12:15:08.331] [debug][kibana-monitoring][monitoring] Received Kibana Ops event data
server log [12:15:08.332] [debug][kibana-monitoring][monitoring] Received Kibana Ops event data
server log [12:15:10.230] [debug][kibana-monitoring][monitoring] Received Kibana Ops event data
server log [12:15:10.231] [debug][kibana-monitoring][monitoring] Received Kibana Ops event data
server log [12:15:10.374] [debug][plugin] Checking Elasticsearch version
server log [12:15:11.340] [debug][authenticator][plugins][security] Performing login using "basic" provider.
server log [12:15:11.341] [debug][server][Kibana][cookie-session-storage][http] Error: Unauthorized
server log [12:15:11.342] [debug][basic][plugins][security] Trying to perform a login.
server log [12:15:11.343] [debug][basic][plugins][security] Login has been successfully performed.
server respons [12:15:11.337] POST /api/security/v1/login 204 14ms - 9.0B
server log [12:15:11.363] [debug][basic][plugins][security] Trying to authenticate user request to /.
server log [12:15:11.364] [debug][basic][plugins][security] Trying to authenticate via header.
server log [12:15:11.364] [debug][basic][plugins][security] Authorization header is not presented.
server log [12:15:11.365] [debug][basic][plugins][security] Trying to authenticate via state.
server log [12:15:11.366] [debug][basic][plugins][security] Request has been authenticated via state.
server log [12:15:11.368] [debug][plugins][spaces] SpacesClient.getAll(), using RBAC. Found 1 spaces
server log [12:15:11.373] [debug][plugins][spaces] SpacesClient.getAll(), authorized for 0 spaces, derived from ES privilege check: {"default":{"login:":false}}
server log [12:15:11.377] [debug][plugins][spaces] SpacesClient.getAll(), using RBAC. returning 403/Forbidden. Not authorized for any spaces.
server log [12:15:11.377] [debug][license][xpack] Calling [data] Elasticsearch _xpack API. Polling frequency: 30001
server respons [12:15:11.362] GET / 403 37ms - 9.0B
server ops [12:15:11.516] memory: 350.3MB uptime: 0:03:02 load: [0.00 0.00 0.00] delay: 0.075

```

2.If I log in to Kibana with an elastic user, I will log out to the login interface at the moment of successful login.

 ![2222222](https://us1.discourse-cdn.com/elastic/original/3X/f/9/f9824d732c6b4ae9aafffaeceec1cd701928a2c7.gif)

```auto
   log [12:05:28.577] [debug][server][Kibana][cookie-session-storage][http] Error: Unauthorized
server log [12:05:28.578] [debug][basic][plugins][security] Trying to authenticate user request to /api/console/api_server?sense_version=%40%40SENSE_VERSION&apis=es_6_0.
server log [12:05:28.579] [debug][basic][plugins][security] Trying to authenticate via header.
server log [12:05:28.579] [debug][basic][plugins][security] Authorization header is not presented.
server respons [12:05:28.577] GET /api/console/api_server?sense_version=%40%40SENSE_VERSION&apis=es_6_0 302 9ms - 9.0B
server respons [12:05:28.779] GET /ui/fonts/inter_ui/Inter-UI-Medium.woff2 200 3ms - 9.0B
server log [12:05:29.228] [debug][server][Kibana][cookie-session-storage][http] Error: Unauthorized
server log [12:05:29.228] [debug][basic][plugins][security] Trying to authenticate user request to /api/security/v1/me.
server log [12:05:29.229] [debug][basic][plugins][security] Trying to authenticate via header.
server log [12:05:29.229] [debug][basic][plugins][security] Authorization header is not presented.
server log [12:05:29.230] [debug][authentication][plugins][security] Could not handle authentication attempt
server log [12:05:29.236] [debug][license][xpack] Calling [data] Elasticsearch _xpack API. Polling frequency: 30001
server respons [12:05:29.227] GET /api/security/v1/me 401 29ms - 9.0B
server log [12:05:29.397] [debug][kibana-monitoring][monitoring] Received Kibana Ops event data
server log [12:05:29.397] [debug][kibana-monitoring][monitoring] Received Kibana Ops event data
server log [12:05:29.736] [debug][server][Kibana][cookie-session-storage][http] Error: Unauthorized
server log [12:05:29.737] [debug][basic][plugins][security] Trying to authenticate user request to /api/interpreter/fns.
server log [12:05:29.737] [debug][basic][plugins][security] Trying to authenticate via header.
server log [12:05:29.737] [debug][basic][plugins][security] Authorization header is not presented.
server log [12:05:29.738] [debug][authentication][plugins][security] Could not handle authentication attempt
server log [12:05:29.738] [debug][license][xpack] Calling [data] Elasticsearch _xpack API. Polling frequency: 30001
server log [12:05:29.744] [debug][server][Kibana][cookie-session-storage][http] Error: Unauthorized
server log [12:05:29.751] [debug][basic][plugins][security] Trying to authenticate user request to /api/saved_objects/_find?fields=title&per_page=1&search=*&search_fields=title&type=index-pattern.
server log [12:05:29.751] [debug][basic][plugins][security] Trying to authenticate via header.
server log [12:05:29.752] [debug][basic][plugins][security] Authorization header is not presented.
server log [12:05:29.752] [debug][authentication][plugins][security] Could not handle authentication attempt
server log [12:05:29.753] [debug][license][xpack] Calling [data] Elasticsearch _xpack API. Polling frequency: 30001
server log [12:05:29.760] [debug][server][Kibana][cookie-session-storage][http] Error: Unauthorized
server log [12:05:29.761] [debug][basic][plugins][security] Trying to authenticate user request to /api/spaces/space.
server log [12:05:29.761] [debug][basic][plugins][security] Trying to authenticate via header.
server log [12:05:29.762] [debug][basic][plugins][security] Authorization header is not presented.
server log [12:05:29.762] [debug][authentication][plugins][security] Could not handle authentication attempt
server log [12:05:29.763] [debug][license][xpack] Calling [data] Elasticsearch _xpack API. Polling frequency: 30001
server respons [12:05:29.735] GET /api/interpreter/fns 401 29ms - 9.0B
server respons [12:05:29.736] GET /api/spaces/space 401 47ms - 9.0B
server respons [12:05:29.736] GET /api/saved_objects/_find?fields=title&per_page=1&search=*&search_fields=title&type=index-pattern 401 53ms - 9.0B
server log [12:05:29.834] [debug][server][Kibana][cookie-session-storage][http] Error: Unauthorized
server log [12:05:29.835] [debug][basic][plugins][security] Trying to authenticate user request to /api/security/v1/me.
server log [12:05:29.835] [debug][basic][plugins][security] Trying to authenticate via header.
server log [12:05:29.836] [debug][basic][plugins][security] Authorization header is not presented.
server log [12:05:29.843] [debug][authentication][plugins][security] Could not handle authentication attempt
server log [12:05:29.843] [debug][license][xpack] Calling [data] Elasticsearch _xpack API. Polling frequency: 30001
server respons [12:05:29.832] GET /api/security/v1/me 401 114ms - 9.0B
server log [12:05:29.948] [debug][server][Kibana][cookie-session-storage][http] Error: Unauthorized
server log [12:05:29.956] [debug][basic][plugins][security] Trying to authenticate user request to /api/xpack/v1/info.
server log [12:05:29.956] [debug][basic][plugins][security] Trying to authenticate via header.
server log [12:05:29.957] [debug][basic][plugins][security] Authorization header is not presented.
server log [12:05:29.957] [debug][authentication][plugins][security] Could not handle authentication attempt
server log [12:05:29.957] [debug][license][xpack] Calling [data] Elasticsearch _xpack API. Polling frequency: 30001
server respons [12:05:29.826] GET /login?next=%2Fnpt%2Fapi%2Fconsole%2Fapi_server%3Fsense_version%3D%2540%2540SENSE_VERSION%26apis%3Des_6_0 200 135ms - 9.0B
server respons [12:05:29.947] GET /built_assets/dlls/icon.logo_apm-js.bundle.dll.js 200 27ms - 9.0B
server respons [12:05:29.948] GET /built_assets/dlls/icon.logo_logging-js.bundle.dll.js 200 28ms - 9.0B
server respons [12:05:29.960] GET /built_assets/dlls/icon.logo_metrics-js.bundle.dll.js 200 31ms - 9.0B
server respons [12:05:29.945] GET /api/xpack/v1/info 401 49ms - 9.0B
server respons [12:05:29.972] GET /built_assets/dlls/icon.logo_security-js.bundle.dll.js 200 51ms - 9.0B
server respons [12:05:29.946] GET /logout?next=%2Fapp%2Fkibana%23%2Fhome%3F_g%3D()&msg=SESSION_EXPIRED 200 153ms - 9.0B
server log [12:05:30.102] [debug][plugin] Checking Elasticsearch version
server respons [12:05:30.032] GET /built_assets/dlls/icon.app_security-js.bundle.dll.js 200 78ms - 9.0B
server respons [12:05:30.034] GET /built_assets/dlls/icon.app_spaces-js.bundle.dll.js 200 78ms - 9.0B
server respons [12:05:29.990] GET /ui/fonts/inter_ui/Inter-UI-Light-BETA.woff2 200 123ms - 9.0B
server respons [12:05:30.021] GET /ui/fonts/inter_ui/Inter-UI-Bold.woff2 200 95ms - 9.0B
server respons [12:05:30.114] GET /built_assets/dlls/icon.app_index_pattern-js.bundle.dll.js 200 72ms - 9.0B
server respons [12:05:30.116] GET /built_assets/dlls/icon.app_saved_objects-js.bundle.dll.js 200 71ms - 9.0B
server respons [12:05:30.124] GET /built_assets/dlls/icon.app_console-js.bundle.dll.js 200 64ms - 9.0B
server respons [12:05:30.125] GET /built_assets/dlls/icon.app_index_rollup-js.bundle.dll.js 200 72ms - 9.0B
server respons [12:05:30.033] GET /logout?next=%2Fapp%2Fkibana%23%2Fhome%3F_g%3D()&msg=SESSION_EXPIRED 200 167ms - 9.0B
server respons [12:05:30.198] GET /built_assets/dlls/icon.app_watches-js.bundle.dll.js 200 10ms - 9.0B
server log [12:05:30.233] [debug][server][Kibana][cookie-session-storage][http] Error: Unauthorized
server log [12:05:30.238] [debug][basic][plugins][security] Trying to authenticate user request to /bundles/app/logout/bootstrap.js.
server log [12:05:30.238] [debug][basic][plugins][security] Trying to authenticate via header.
server log [12:05:30.238] [debug][basic][plugins][security] Authorization header is not presented.
server log [12:05:30.239] [debug][authentication][plugins][security] Could not handle authentication attempt
server respons [12:05:30.231] [api] GET /bundles/app/logout/bootstrap.js 200 18ms - 9.0B
server respons [12:05:30.266] GET /node_modules/@elastic/charts/dist/theme_only_light.css 200 5ms - 9.0B
... lots of GET 200
server respons [12:05:30.451] GET /ui/favicons/manifest.json 200 20ms - 9.0B
server respons [12:05:30.551] GET /bundles/light_theme.style.css.map 200 4ms - 9.0B
server respons [12:05:30.556] GET /bundles/commons.style.css.map 200 4ms - 9.0B
server ops [12:05:30.578] memory: 365.8MB uptime: 0:07:34 load: [0.00 0.00 0.00] delay: 0.197
server respons [12:05:30.467] GET /built_assets/dlls/vendors.bundle.dll.js 200 1681ms - 9.0B

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2020, 12:19pm UTC](https://discuss.elastic.co/t/error-unable-to-change-your-space-occurred-but-no-logs/232995/10 "2020-07-05T12:19:09Z")

</div>

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