# Internal Server Error : SavedObjectReferenceResolutionError: Failed to resolve Inventory default view "inventory-saved-view-0" (after 7.14.0 -\> 7.16.1 migration)

**URL:** <https://discuss.elastic.co/t/internal-server-error-savedobjectreferenceresolutionerror-failed-to-resolve-inventory-default-view-inventory-saved-view-0-after-7-14-0-7-16-1-migration/292204>\
**Category:** Kibana\
**Created:** [December 16, 2021, 5:39pm UTC](https://discuss.elastic.co/t/internal-server-error-savedobjectreferenceresolutionerror-failed-to-resolve-inventory-default-view-inventory-saved-view-0-after-7-14-0-7-16-1-migration/292204 "2021-12-16T17:39:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AmauryB](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@AmauryB](https://discuss.elastic.co/u/AmauryB)\
**Post date:** [December 16, 2021, 5:39pm UTC](https://discuss.elastic.co/t/internal-server-error-savedobjectreferenceresolutionerror-failed-to-resolve-inventory-default-view-inventory-saved-view-0-after-7-14-0-7-16-1-migration/292204/1 "2021-12-16T17:39:22Z")

</div>

Before migrating from ELK 7.14.0 to ELK 7.16.1I had configured a specific Default Inventory view in the Observability Metrics App.

After migration I get the following error

```auto
[2021-12-16T18:31:48.765+01:00][ERROR][http] SavedObjectReferenceResolutionError: Failed to resolve Inventory default view "inventory-saved-view-0".
    at resolveInventoryViewSavedObjectReferences (/usr/share/kibana/x-pack/plugins/infra/server/lib/sources/saved_object_references.js:154:13)
    at /usr/share/kibana/x-pack/plugins/infra/server/lib/sources/saved_object_references.js:49:238
    at Array.reduce (<anonymous>)
    at resolveSavedObjectReferences (/usr/share/kibana/x-pack/plugins/infra/server/lib/sources/saved_object_references.js:49:195)
    at /usr/share/kibana/x-pack/plugins/infra/server/lib/sources/sources.js:190:76
    at /usr/share/kibana/node_modules/fp-ts/lib/Either.js:280:52
    at pipe (/usr/share/kibana/node_modules/fp-ts/lib/function.js:192:23)
    at convertSavedObjectToSavedSourceConfiguration (/usr/share/kibana/x-pack/plugins/infra/server/lib/sources/sources.js:185:88)
    at InfraSources.getSavedSourceConfiguration (/usr/share/kibana/x-pack/plugins/infra/server/lib/sources/sources.js:164:12)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at InfraSources.getSourceConfiguration (/usr/share/kibana/x-pack/plugins/infra/server/lib/sources/sources.js:48:38)
    at async Promise.all (index 0)
    at /usr/share/kibana/x-pack/plugins/infra/server/routes/metrics_sources/index.js:47:55
    at Router.handle (/usr/share/kibana/src/core/server/http/router/router.js:163:30)
    at handler (/usr/share/kibana/src/core/server/http/router/router.js:124:50)

```

It looks like my inventory-view cannot be found, how can I reset it to the default ?

I've also run a `metricbeat setup` but it didn't solve the issue.

From a user point of view it looks like this

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/9/89030e332784885eec5e878ab8f0e30270568765.png)

---

<div class="post-metadata">

**Author:** ![Hakim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hakim/32/98012_2.png) [@Hakim](https://discuss.elastic.co/u/Hakim)\
**Post date:** [December 17, 2021, 10:19am UTC](https://discuss.elastic.co/t/internal-server-error-savedobjectreferenceresolutionerror-failed-to-resolve-inventory-default-view-inventory-saved-view-0-after-7-14-0-7-16-1-migration/292204/2 "2021-12-17T10:19:22Z")

</div>

We have the same issue after upgrading our Elastic Cloud cluster from 7.15.2 to 7.16.1

```auto
Error while fetching resource
Error
(500)
URL
https://kibana.domain.com/api/metrics/source/default
Message
An internal server error occurred.

```

Also on Rules and Connectors we have some rules with status error message: `Failed to resolve Inventory default view "inventory-saved-view-0"`

 ![Screenshot 2021-12-17 at 16.46.28](https://us1.discourse-cdn.com/elastic/original/3X/b/4/b47af2b98d5cfc6b410da009aeee88e37665678d.png)

---

<div class="post-metadata">

**Author:** ![Hakim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hakim/32/98012_2.png) [@Hakim](https://discuss.elastic.co/u/Hakim)\
**Post date:** [December 17, 2021, 10:59am UTC](https://discuss.elastic.co/t/internal-server-error-savedobjectreferenceresolutionerror-failed-to-resolve-inventory-default-view-inventory-saved-view-0-after-7-14-0-7-16-1-migration/292204/3 "2021-12-17T10:59:46Z")

</div>

Manual migration of the saved objects proposed in this [issue](https://github.com/elastic/kibana/issues/121130) solved the error.

---

<div class="post-metadata">

**Author:** ![AmauryB](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@AmauryB](https://discuss.elastic.co/u/AmauryB)\
**Post date:** [December 28, 2021, 9:07am UTC](https://discuss.elastic.co/t/internal-server-error-savedobjectreferenceresolutionerror-failed-to-resolve-inventory-default-view-inventory-saved-view-0-after-7-14-0-7-16-1-migration/292204/4 "2021-12-28T09:07:27Z")

</div>

Thanks a lot !  
This solved the issue at hand, I have another that I need to deal with, but as far as this post goes it's solved 🙂

I'll keep this post updated for any other visitors.

The error is the following :

```auto
Error: no codec found to encode value in union type ({ type: "count" | "cpu" | "load" | "memory" | "tx" | "rx" | "logRate" | "diskIOReadBytes" | "diskIOWriteBytes" | "s3TotalRequests" | "s3NumberOfObjects" | "s3BucketSize" | "s3DownloadBytes" | "s3UploadBytes" | "rdsConnections" | "rdsQueriesExecuted" | "rdsActiveTransactions" | "rdsLatency" | "sqsMessagesVisible" | "sqsMessagesDelayed" | "sqsMessagesSent" | "sqsMessagesEmpty" | "sqsOldestMessage" | "custom" } | ({ type: "custom", field: string, aggregation: "avg" | "max" | "min" | "rate", id: string } & Partial<{ label: string }>))
e.union/<@https://xx:5601/46258/bundles/plugin/infra/8.0.0/infra.plugin.js:2:13061
e.type/<@https://xx:5601/46258/bundles/plugin/infra/8.0.0/infra.plugin.js:2:9885
e.intersection/</<@https://xx:5601/46258/bundles/plugin/infra/8.0.0/infra.plugin.js:2:14044
e.intersection/<@https://xx:5601/46258/bundles/plugin/infra/8.0.0/infra.plugin.js:2:14018
O@https://xx:5601/46258/bundles/plugin/infra/8.0.0/infra.chunk.6.js:9:21079
91/o/f<@https://xx:5601/46258/bundles/plugin/infra/8.0.0/infra.chunk.2.js:3:53292
78/k</<@https://xx:5601/46258/bundles/plugin/infra/8.0.0/infra.chunk.6.js:9:21384
Ms@https://xx:5601/46258/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:447:84721
Wu@https://xx:5601/46258/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:447:104435
__kbnSharedDeps_npm__ </t.unstable_runWithPriority@https://xx:5601/46258/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:455:3462
Xi@https://xx:5601/46258/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:447:45747
zu@https://xx:5601/46258/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:447:104176
Ou@https://xx:5601/46258/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:447:94230
Ji/<@https://xx:5601/46258/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:447:46038
__kbnSharedDeps_npm__ </t.unstable_runWithPriority@https://xx:5601/46258/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:455:3462
Xi@https://xx:5601/46258/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:447:45747
Ji@https://xx:5601/46258/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:447:45985
Qi@https://xx:5601/46258/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:447:45918
yu@https:/xx:5601/46258/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:447:91140
enqueueSetState@https://xx:5601/46258/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:447:50827
__kbnSharedDeps_npm__ </_.prototype.setState@https://xx:5601/46258/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:431:1439
114/AutoSizer/</<@https://xx:5601/46258/bundles/plugin/infra/8.0.0/infra.chunk.1.js:3:4717

```

**Edit** : This was solved by setting the `savedView` variable in URL to `(viewId:0)` then creating a new view and setting it to default.

---

<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:** [January 25, 2022, 9:08am UTC](https://discuss.elastic.co/t/internal-server-error-savedobjectreferenceresolutionerror-failed-to-resolve-inventory-default-view-inventory-saved-view-0-after-7-14-0-7-16-1-migration/292204/5 "2022-01-25T09:08:22Z")

</div>

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