Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read properties of undefined (reading 'standard_id')\n at resolveAndPublishMissingRefs #5625

Closed
JGMetO opened this issue Oct 12, 2023 · 1 comment
Assignees
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR)

Comments

@JGMetO
Copy link

JGMetO commented Oct 12, 2023

Description

Environment

  1. OS (where OpenCTI server runs): { e.g. Mac OS 10, Windows 10, Ubuntu 16.4, etc. } Amazon Linux - Docker Container
  2. OpenCTI version: { e.g. OpenCTI 1.0.2 } 5.10.3
  3. OpenCTI client: { e.g. frontend or python }
  4. Other environment details:

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. { e.g. Run ... } Compose Docker file
  2. { e.g. Click ... } Stream live data into an Elastic instance
  3. { e.g. Error ... }

Expected Output

Data would continue to flow through into Elastic, as new data comes in.

Actual Output

After a few hours, data slowed so that the event would be created in elastic several hours/ days after it was in OpenCTI. We have confirmed this is due to OpenCTI. I believe this is related to the Graph QL API.

Additional information

We have the following error messages:
{
"category": "APP",
"error": {
"context": {},
"message": "Cannot read properties of undefined (reading 'standard_id')",
"name": "TypeError",
"stack": "TypeError: Cannot read properties of undefined (reading 'standard_id')\n at resolveAndPublishMissingRefs (/opt/opencti/build/src/graphql/sseMiddleware.js:373:38)\n at resolveAndPublishDependencies (/opt/opencti/build/src/graphql/sseMiddleware.js:387:31)\n at hA.autoReconnect (/opt/opencti/build/src/graphql/sseMiddleware.js:588:47)\n at processStreamResult (/opt/opencti/build/src/database/redis.ts:599:3)\n at processStep (/opt/opencti/build/src/database/redis.ts:653:31)\n at processingLoop (/opt/opencti/build/src/database/redis.ts:670:13)"
},
"level": "error",
"message": "Error in redis streams read for USER",
"timestamp": "2023-10-10T08:56:26.356Z",
"version": "5.10.3"
}

{
"category": "APP",
"error": {
"context": {},
"message": "Cannot read properties of undefined (reading 'standard_id')",
"name": "TypeError",
"stack": "TypeError: Cannot read properties of undefined (reading 'standard_id')\n at resolveAndPublishMissingRefs (/opt/opencti/build/src/graphql/sseMiddleware.js:373:38)\n at resolveAndPublishDependencies (/opt/opencti/build/src/graphql/sseMiddleware.js:387:31)\n at hA.autoReconnect (/opt/opencti/build/src/graphql/sseMiddleware.js:588:47)\n at processStreamResult (/opt/opencti/build/src/database/redis.ts:599:3)\n at processStep (/opt/opencti/build/src/database/redis.ts:653:31)\n at processingLoop (/opt/opencti/build/src/database/redis.ts:670:13)\n at Object.shutdown (/opt/opencti/build/src/database/redis.ts:693:9)"
},
"level": "error",
"message": "Error in redis streams read for USER",
"timestamp": "2023-10-10T09:04:10.726Z",
"version": "5.10.3"
}

This seems to result in the connector Dropping the connection to openCTI:
{"timestamp": "2023-10-12T09:39:57.988733Z", "level": "DEBUG", "name": "urllib3.connectionpool", "message": "http://opencti:8080 "POST /graphql HTTP/1.1" 200 176"}
{"timestamp": "2023-10-12T09:40:37.990216Z", "level": "DEBUG", "name": "urllib3.connectionpool", "message": "Resetting dropped connection: opencti"}

We also get similar messages to OpenCTI-Platform/connectors#1446

Lastly, we get several error messages as refered to in #2373

Due to the several error messages, I am unable to ascertain a root cause.

Screenshots (optional)

@SamuelHassine SamuelHassine added the bug use for describing something not working as expected label Oct 15, 2023
@SamuelHassine SamuelHassine added this to the Release 5.12.18 milestone Jan 16, 2024
@SamuelHassine SamuelHassine transferred this issue from OpenCTI-Platform/connectors Jan 21, 2024
@SamuelHassine SamuelHassine changed the title Elastic Connector delay "TypeError: Cannot read properties of undefined (reading 'standard_id')\n at resolveAndPublishMissingRefs Jan 21, 2024
@SamuelHassine SamuelHassine changed the title "TypeError: Cannot read properties of undefined (reading 'standard_id')\n at resolveAndPublishMissingRefs TypeError: Cannot read properties of undefined (reading 'standard_id')\n at resolveAndPublishMissingRefs Jan 21, 2024
@SamuelHassine
Copy link
Member

This was an old issue and this has been solved in 5.12.X.

@SamuelHassine SamuelHassine added the solved use to identify issue that has been solved (must be linked to the solving PR) label Jan 27, 2024
@SamuelHassine SamuelHassine self-assigned this Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR)
Projects
None yet
Development

No branches or pull requests

3 participants