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

[Bug] Deleting the first case breaks the the audit flow until the next restart #1556

Closed
miyoyo opened this issue Sep 29, 2020 · 1 comment
Closed
Assignees
Labels
bug TheHive4 TheHive4 related issues
Milestone

Comments

@miyoyo
Copy link

miyoyo commented Sep 29, 2020

Request Type

Bug

Work Environment

Question Answer
OS version (server) Ubuntu 20.04.1 LTS on WSL 2
OS version (client) Windows 10 19041.508
TheHive version / git hash 4.0.1, develop-th4 : e0a2786
Package Type From source
Browser type & version 81.0 (64-bit)

Problem Description

Creating the first case, then deleting it immediately results in the audit flow failing to match on the data of the case

Steps to Reproduce

  1. Spawn a fresh instance of thehive
  2. Create a case
  3. Delete the case

Complementary information

[error] o.t.s.ErrorHandler [|] Internal error
scala.MatchError: (Audit(77bc4b2088980747:3a2bfdf2:174da34aa39:-8000:67,create,true,Some(40964096),Some(Case),Some({"_id":"40964096","_type":"Case","_createdBy":"user@local","_updatedBy":null,"_createdAt":1601388756243,"_updatedAt":null,"number":1,"title":"dod","description":"dad","severity":2,"startDate":1601388720000,"endDate":null,"tags":[],"flag":false,"tlp":2,"pap":2,"status":"Open","summary":null,"impactStatus":null,"resolutionStatus":null,"assignee":"user@local","customFields":[],"extraData":{}})),ArrayBuffer(),ArrayBuffer(),ArrayBuffer(),{}) (of class scala.Tuple5)
        at org.thp.thehive.services.AuditOps$AuditOpsDefs.$anonfun$richAuditWithCustomRenderer$5(AuditSrv.scala:320)
        at scala.Function1.$anonfun$andThen$1(Function1.scala:57)
        at org.thp.scalligraph.traversal.Traversal.org$thp$scalligraph$traversal$Traversal$$$anonfun$domainMap$1(Traversal.scala:43)
        at org.thp.scalligraph.traversal.Traversal$$anonfun$domainMap$2.apply(Traversal.scala:43)
        at scala.collection.Iterator$$anon$10.next(Iterator.scala:461)
        at scala.collection.Iterator$$anon$10.next(Iterator.scala:461)
        at scala.collection.Iterator.foreach(Iterator.scala:943)
        at scala.collection.Iterator.foreach$(Iterator.scala:943)
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
        at scala.collection.generic.Growable.$plus$plus$eq(Growable.scala:62)
[warn] o.t.s.ErrorHandler [|] GET /api/flow?count=10&rootId=any returned 500
scala.MatchError: (Audit(77bc4b2088980747:3a2bfdf2:174da34aa39:-8000:67,create,true,Some(40964096),Some(Case),Some({"_id":"40964096","_type":"Case","_createdBy":"user@local","_updatedBy":null,"_createdAt":1601388756243,"_updatedAt":null,"number":1,"title":"dod","description":"dad","severity":2,"startDate":1601388720000,"endDate":null,"tags":[],"flag":false,"tlp":2,"pap":2,"status":"Open","summary":null,"impactStatus":null,"resolutionStatus":null,"assignee":"user@local","customFields":[],"extraData":{}})),ArrayBuffer(),ArrayBuffer(),ArrayBuffer(),{}) (of class scala.Tuple5)
        at org.thp.thehive.services.AuditOps$AuditOpsDefs.$anonfun$richAuditWithCustomRenderer$5(AuditSrv.scala:320)
        at scala.Function1.$anonfun$andThen$1(Function1.scala:57)
        at org.thp.scalligraph.traversal.Traversal.org$thp$scalligraph$traversal$Traversal$$$anonfun$domainMap$1(Traversal.scala:43)
        at org.thp.scalligraph.traversal.Traversal$$anonfun$domainMap$2.apply(Traversal.scala:43)
        at scala.collection.Iterator$$anon$10.next(Iterator.scala:461)
        at scala.collection.Iterator$$anon$10.next(Iterator.scala:461)
        at scala.collection.Iterator.foreach(Iterator.scala:943)
        at scala.collection.Iterator.foreach$(Iterator.scala:943)
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
        at scala.collection.generic.Growable.$plus$plus$eq(Growable.scala:62)
@rriclet
Copy link
Contributor

rriclet commented Oct 28, 2020

@miyoyo ,

No more internal error when deleting a case.
The deleted case (number & description) now appears in the flow, on the case list page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug TheHive4 TheHive4 related issues
Projects
None yet
Development

No branches or pull requests

3 participants