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] AuditSrv: undefined on non-case page(s), thehive4-4.0.0-1, Ubuntu #1479

Closed
shortstack opened this issue Aug 14, 2020 · 4 comments
Closed
Assignees
Labels
bug TheHive4 TheHive4 related issues
Milestone

Comments

@shortstack
Copy link

AuditSrv: undefined on non-case page(s), thehive4-4.0.0-1, Ubuntu

Request Type

Bug

Work Environment

Question Answer
OS version (server) Ubuntu 16.04
TheHive version / git hash thehive4-4.0.0-1
Package Type deb
Browser type & version Firefox, Chrome

Problem Description

Navigating to any screen in TheHive with the flow on the right hand side (except for the actual Case screen) throws an AuditSrv: undefined warning in the bottom left, and the following is in the logs:

2020-08-14 15:04:33,305 [WARN] from org.thp.scalligraph.ErrorHandler in application-akka.actor.default-dispatcher-5614 [|] GET /api/flow?count=10&rootId=any returned 400
java.lang.IllegalArgumentException: The provided traverser does not map to a value: v[164171896]->[JanusGraphVertexStep(IN,[ShareTask],vertex), JanusGraphVertexStep(OUT,[ShareCase],vertex), DedupGlobalStep, ProjectStep([58be42d3-8da7-4003-b195-013a620f8169, 193f847e-367c-4537-9fb9-c7012c3f7bb5, dd9a7064-defc-4d03-9e33-c97116fccdb7, faee715d-8cf9-4d31-9881-085bfb851ccd, 35324b66-334b-42c4-a44d-b5a67b7906f1, ff9db8e7-325d-4409-b461-6e0216832259],[identity, [JanusGraphVertexStep(OUT,[CaseTag],vertex), FoldStep], [JanusGraphVertexStep(OUT,[CaseImpactStatus],vertex), JanusGraphPropertiesStep([value],value), FoldStep], [JanusGraphVertexStep(OUT,[CaseResolutionStatus],vertex), JanusGraphPropertiesStep([value],value), FoldStep], [JanusGraphVertexStep(OUT,[CaseUser],vertex), JanusGraphPropertiesStep([login],value), FoldStep], [JanusGraphVertexStep(OUT,[CaseCustomField],edge), ProjectStep([9d899c5d-bff1-448a-9a82-5fe1a1ca4d56, 71f4b0cf-0992-4eed-a83e-85d4fc36e87e],[identity, [EdgeVertexStep(IN)]]), LambdaMapStep(lambda), LambdaMapStep(lambda), FoldStep]]), LambdaMapStep(lambda), LambdaMapStep(lambda), LambdaMapStep(lambda)]
	at org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil.apply(TraversalUtil.java:46)
	at org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil.applyNullable(TraversalUtil.java:87)
	at org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectStep.map(ProjectStep.java:55)
	at org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectStep.map(ProjectStep.java:40)
	at org.apache.tinkerpop.gremlin.process.traversal.step.map.MapStep.processNextStart(MapStep.java:37)
	at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
	at org.apache.tinkerpop.gremlin.process.traversal.step.branch.BranchStep.standardAlgorithm(BranchStep.java:126)
	at org.apache.tinkerpop.gremlin.process.traversal.step.util.ComputerAwareStep.processNextStart(ComputerAwareStep.java:46)
	at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
	at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:197)
	at org.apache.tinkerpop.gremlin.process.traversal.step.map.CoalesceStep.flatMap(CoalesceStep.java:58)
	at org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep.processNextStart(FlatMapStep.java:49)
	at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.next(AbstractStep.java:128)
	at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.next(AbstractStep.java:38)
	at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.next(DefaultTraversal.java:205)
	at org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil.apply(TraversalUtil.java:44)
	at org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil.applyNullable(TraversalUtil.java:87)
	at org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectStep.map(ProjectStep.java:55)
	at org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectStep.map(ProjectStep.java:40)
	at org.apache.tinkerpop.gremlin.process.traversal.step.map.MapStep.processNextStart(MapStep.java:37)
	at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
	at org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50)
	at org.apache.tinkerpop.gremlin.process.traversal.step.map.MapStep.processNextStart(MapStep.java:36)
	at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
	at org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50)
	at org.apache.tinkerpop.gremlin.process.traversal.step.map.MapStep.processNextStart(MapStep.java:36)
	at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
	at org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50)
	at org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterStep.processNextStart(FilterStep.java:37)
	at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
	at org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50)
	at org.apache.tinkerpop.gremlin.process.traversal.step.map.MapStep.processNextStart(MapStep.java:36)
	at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
	at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:197)
	at scala.collection.convert.Wrappers$JIteratorWrapper.hasNext(Wrappers.scala:43)
	at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:460)
	at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:460)
	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)
	at scala.collection.generic.Growable.$plus$plus$eq$(Growable.scala:53)
	at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:105)
	at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:49)
	at scala.collection.TraversableOnce.to(TraversableOnce.scala:348)
	at scala.collection.TraversableOnce.to$(TraversableOnce.scala:346)
	at scala.collection.AbstractIterator.to(Iterator.scala:1431)
	at scala.collection.TraversableOnce.toBuffer(TraversableOnce.scala:340)
	at scala.collection.TraversableOnce.toBuffer$(TraversableOnce.scala:340)
	at scala.collection.AbstractIterator.toBuffer(Iterator.scala:1431)
	at org.thp.thehive.controllers.v0.AuditCtrl.$anonfun$flow$4(AuditCtrl.scala:70)
	at org.thp.scalligraph.janus.JanusDatabase.roTransaction(JanusDatabase.scala:133)
	at org.thp.thehive.controllers.v0.AuditCtrl.$anonfun$flow$3(AuditCtrl.scala:65)
	at scala.util.Success.$anonfun$map$1(Try.scala:255)
	at scala.util.Success.map(Try.scala:213)
	at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
	at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
	at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
	at org.thp.scalligraph.ContextPropagatingDisptacher$$anon$1.$anonfun$execute$2(ContextPropagatingDisptacher.scala:56)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
	at org.thp.scalligraph.DiagnosticContext$.$anonfun$withDiagnosticContext$2(ContextPropagatingDisptacher.scala:91)
	at org.thp.scalligraph.DiagnosticContext$.saveDiagnosticContext(ContextPropagatingDisptacher.scala:106)
	at org.thp.scalligraph.DiagnosticContext$.withDiagnosticContext(ContextPropagatingDisptacher.scala:89)
	at org.thp.scalligraph.DiagnosticContext$$anon$2.withContext(ContextPropagatingDisptacher.scala:74)
	at org.thp.scalligraph.ContextPropagatingDisptacher$$anon$1.$anonfun$execute$1(ContextPropagatingDisptacher.scala:56)
	at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:48)
	at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:48)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

Screen Shot 2020-08-14 at 11 04 21 AM

Steps to Reproduce

  1. Log into TheHive
@shortstack shortstack added TheHive4 TheHive4 related issues bug labels Aug 14, 2020
@subdriven
Copy link
Contributor

Can verify this is also a bug for us. Same versions and server.

@nadouani
Copy link
Contributor

This looks like the an issue where the flow is trying to refer to some data that you no longer have access to.

@vletoux
Copy link

vletoux commented Oct 8, 2020

I managed to simplify the bug report:
Not working
/api/flow?count=1&rootId=any

Working
/api/flow?count=1&rootId=<any_existing_id>

Working
image

Not working
image

The problem seems that "any" do not match anything

@To-om To-om added this to the 4.0.1 milestone Oct 19, 2020
@To-om
Copy link
Contributor

To-om commented Oct 19, 2020

This issue has been fixed when gremlin request was rewritten in #1501

@To-om To-om closed this as completed Oct 19, 2020
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

5 participants