# TypeError: Cannot read property 'error' of undefined

**URL:** <https://discuss.elastic.co/t/typeerror-cannot-read-property-error-of-undefined/268971>\
**Category:** Kibana\
**Created:** [April 1, 2021, 2:19am UTC](https://discuss.elastic.co/t/typeerror-cannot-read-property-error-of-undefined/268971 "2021-04-01T02:19:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![satyabrat\_majhi](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@satyabrat\_majhi](https://discuss.elastic.co/u/satyabrat_majhi)\
**Post date:** [April 1, 2021, 2:19am UTC](https://discuss.elastic.co/t/typeerror-cannot-read-property-error-of-undefined/268971/1 "2021-04-01T02:19:10Z")

</div>

````auto
  log [07:40:32.609] [warning][config][deprecation] Config key [monitoring.cluster_alerts.email_notifications.email_address] will be required for email notifications to work in 8.0."
  log [07:40:33.237] [info][plugins-system] Setting up [100] plugins: [taskManager,licensing,globalSearch,globalSearchProviders,banners,code,usageCollection,xpackLegacy,telemetryCollectionManager,telemetry,telemetryCollectionXpack,kibanaUsageCollection,securityOss,share,mapsLegacy,newsfeed,kibanaLegacy,translations,legacyExport,embeddable,uiActionsEnhanced,expressions,charts,esUiShared,bfetch,data,home,observability,apmOss,console,consoleExtensions,searchprofiler,painlessLab,grokdebugger,management,indexPatternManagement,advancedSettings,fileUpload,savedObjects,visualizations,visTypeVislib,visTypeVega,visTypeTimelion,features,licenseManagement,watcher,canvas,visTypeTagcloud,visTypeTable,visTypeMarkdown,visTypeMetric,tileMap,regionMap,visTypeXy,graph,timelion,dashboard,dashboardEnhanced,visualize,visTypeTimeseries,inputControlVis,discover,discoverEnhanced,savedObjectsManagement,spaces,security,reporting,savedObjectsTagging,maps,lens,lists,encryptedSavedObjects,dataEnhanced,dashboardMode,beatsManagement,cloud,upgradeAssistant,snapshotRestore,fleet,indexManagement,remoteClusters,crossClusterReplication,rollup,indexLifecycleManagement,enterpriseSearch,transform,ingestPipelines,eventLog,actions,alerts,triggersActionsUi,stackAlerts,ml,securitySolution,case,infra,monitoring,logstash,apm,uptime]
  log [07:40:33.242] [info][plugins][taskManager] TaskManager is identified by the Kibana UUID: 5ed0a0eb-3f8d-4437-aaad-fd7182bddbea
  log [07:40:33.917] [warning][config][plugins][security] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
  log [07:40:33.918] [warning][config][plugins][security] Session cookies will be transmitted over insecure connections. This is not recommended.
  log [07:40:34.029] [warning][config][plugins][reporting] Generating a random key for xpack.reporting.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.reporting.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
  log [07:40:34.081] [info][config][plugins][reporting] Chromium sandbox provides an additional layer of protection, and is supported for Win32 OS. Automatically enabling Chromium sandbox.
  log [07:40:34.084] [warning][encryptedSavedObjects][plugins] Saved objects encryption key is not set. This will severely limit Kibana functionality. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
  log [07:40:34.142] [warning][fleet][plugins] Fleet APIs are disabled because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
  log [07:40:34.259] [warning][actions][actions][plugins] APIs are disabled because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
  log [07:40:34.353] [warning][alerting][alerts][plugins][plugins] APIs are disabled because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
  log [07:40:34.626] [info][monitoring][monitoring][plugins] config sourced from: production cluster
  log [07:40:35.030] [info][savedobjects-service] Waiting until all Elasticsearch nodes are compatible with Kibana before starting saved objects migrations...
  log [07:40:36.118] [info][savedobjects-service] Starting saved objects migrations
  log [07:40:36.233] [info][savedobjects-service] [.kibana_task_manager] INIT -> CREATE_NEW_TARGET
  log [07:40:36.258] [info][savedobjects-service] [.kibana] INIT -> CREATE_NEW_TARGET
  log [07:41:06.251] [error][savedobjects-service] TypeError: Cannot read property 'error' of undefined
    at C:\kibana-7.12.0-windows-x86_64\src\core\server\saved_objects\migrationsv2\actions\index.js:559:22
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at stateActionMachine (C:\kibana-7.12.0-windows-x86_64\src\core\server\saved_objects\migrationsv2\state_action_machine.js:63:28)
    at migrationStateActionMachine (C:\kibana-7.12.0-windows-x86_64\src\core\server\saved_objects\migrationsv2\migrations_state_action_machine.js:80:24)
    at async Promise.all (index 1)
    at SavedObjectsService.start (C:\kibana-7.12.0-windows-x86_64\src\core\server\saved_objects\saved_objects_service.js:163:7)
    at Server.start (C:\kibana-7.12.0-windows-x86_64\src\core\server\server.js:283:31)
    at Root.start (C:\kibana-7.12.0-windows-x86_64\src\core\server\root\index.js:58:14)
    at bootstrap (C:\kibana-7.12.0-windows-x86_64\src\core\server\bootstrap.js:100:5)
    at Command.<anonymous> (C:\kibana-7.12.0-windows-x86_64\src\cli\serve\serve.js:169:5)
  log [07:41:06.300] [error][savedobjects-service] [.kibana_task_manager] migration failed, dumping execution log:
  log [07:41:06.311] [info][savedobjects-service] [.kibana_task_manager] INIT RESPONSE
  log [07:41:06.316] [info][savedobjects-service] [.kibana_task_manager] INIT -> CREATE_NEW_TARGET
  log [07:41:06.326] [fatal][root] Error: Unable to complete saved object migrations for the [.kibana_task_manager] index. TypeError: Cannot read property 'error' of undefined
    at migrationStateActionMachine (C:\kibana-7.12.0-windows-x86_64\src\core\server\saved_objects\migrationsv2\migrations_state_action_machine.js:148:13)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Promise.all (index 1)
    at SavedObjectsService.start (C:\kibana-7.12.0-windows-x86_64\src\core\server\saved_objects\saved_objects_service.js:163:7)
    at Server.start (C:\kibana-7.12.0-windows-x86_64\src\core\server\server.js:283:31)
    at Root.start (C:\kibana-7.12.0-windows-x86_64\src\core\server\root\index.js:58:14)
    at bootstrap (C:\kibana-7.12.0-windows-x86_64\src\core\server\bootstrap.js:100:5)
    at Command.<anonymous> (C:\kibana-7.12.0-windows-x86_64\src\cli\serve\serve.js:169:5)
  log [07:41:06.338] [info][plugins-system] Stopping all plugins.
  log [07:41:06.353] [info][kibana-monitoring][monitoring][monitoring][plugins] Monitoring stats collection is stopped
  log [07:41:06.378] [error][savedobjects-service] TypeError: Cannot read property 'error' of undefined
    at C:\kibana-7.12.0-windows-x86_64\src\core\server\saved_objects\migrationsv2\actions\index.js:559:22
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at stateActionMachine (C:\kibana-7.12.0-windows-x86_64\src\core\server\saved_objects\migrationsv2\state_action_machine.js:63:28)
    at migrationStateActionMachine (C:\kibana-7.12.0-windows-x86_64\src\core\server\saved_objects\migrationsv2\migrations_state_action_machine.js:80:24)
    at async Promise.all (index 0)
  log [07:41:06.384] [error][savedobjects-service] [.kibana] migration failed, dumping execution log:
  log [07:41:06.394] [info][savedobjects-service] [.kibana] INIT RESPONSE
  log [07:41:06.398] [info][savedobjects-service] [.kibana] INIT -> CREATE_NEW_TARGET ```
````

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [April 1, 2021, 8:42am UTC](https://discuss.elastic.co/t/typeerror-cannot-read-property-error-of-undefined/268971/2 "2021-04-01T08:42:29Z")

</div>

Hi @satyabrat_majhi  
Is difficult to understand what you are looking for if you don't give us a bit of context. A log itself doesn't tell us much about the initial conditions and what you expect.  
Are upgrading your local kibana instance, if so from which version.  
Looks like you are running from the source and the problem is about migration, but what are the initial conditions? there was something happening before?  
Is now kibana started or completely fails to start?

---

<div class="post-metadata">

**Author:** ![circular88](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/circular88/32/86590_2.png) [@circular88](https://discuss.elastic.co/u/circular88)\
**Post date:** [April 5, 2021, 9:18pm UTC](https://discuss.elastic.co/t/typeerror-cannot-read-property-error-of-undefined/268971/3 "2021-04-05T21:18:04Z")

</div>

I'm running into the same situation. I simply ran ES (first time, no indexes created yet!), then Kibana. Both were dowloaded today / Windows system.

```auto
  log [17:10:29.160] [info][savedobjects-service] Starting saved objects migrations
  log [17:10:29.195] [info][savedobjects-service] [.kibana] INIT -> CREATE_NEW_TARGET
  log [17:10:29.201] [info][savedobjects-service] [.kibana_task_manager] INIT -> CREATE_NEW_TARGET
  log [17:10:59.209] [error][savedobjects-service] TypeError: Cannot read property 'error' of undefined
    at C:\Alone\kibana-7.12.0-windows-x86_64\src\core\server\saved_objects\migrationsv2\actions\index.js:559:22
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at runNextTicks (internal/process/task_queues.js:62:3)
    at listOnTimeout (internal/timers.js:523:9)
    at processTimers (internal/timers.js:497:7)
    at stateActionMachine (C:\Alone\kibana-7.12.0-windows-x86_64\src\core\server\saved_objects\migrationsv2\state_action_machine.js:63:28)
    at migrationStateActionMachine (C:\Alone\kibana-7.12.0-windows-x86_64\src\core\server\saved_objects\migrationsv2\migrations_state_action_machine.js:80:24)
    at async Promise.all (index 0)
    at SavedObjectsService.start (C:\Alone\kibana-7.12.0-windows-x86_64\src\core\server\saved_objects\saved_objects_service.js:163:7)
    at Server.start (C:\Alone\kibana-7.12.0-windows-x86_64\src\core\server\server.js:283:31)
    at Root.start (C:\Alone\kibana-7.12.0-windows-x86_64\src\core\server\root\index.js:58:14)
    at bootstrap (C:\Alone\kibana-7.12.0-windows-x86_64\src\core\server\bootstrap.js:100:5)
    at Command.<anonymous> (C:\Alone\kibana-7.12.0-windows-x86_64\src\cli\serve\serve.js:169:5)

```

---

<div class="post-metadata">

**Author:** ![circular88](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/circular88/32/86590_2.png) [@circular88](https://discuss.elastic.co/u/circular88)\
**Post date:** [April 5, 2021, 9:28pm UTC](https://discuss.elastic.co/t/typeerror-cannot-read-property-error-of-undefined/268971/4 "2021-04-05T21:28:36Z")

</div>

Well duh - apologies, in my case ES was paused because I had used the mouse on the ES window... tsk tsk. Ignore

---

<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:** [May 3, 2021, 9:29pm UTC](https://discuss.elastic.co/t/typeerror-cannot-read-property-error-of-undefined/268971/5 "2021-05-03T21:29:21Z")

</div>

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