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] TheHive 4.0.4 cannot show tasks created in previous versions #1763

Closed
albertogordillo opened this issue Jan 27, 2021 · 8 comments
Closed
Assignees
Labels
bug TheHive4 TheHive4 related issues
Milestone

Comments

@albertogordillo
Copy link

albertogordillo commented Jan 27, 2021

Request Type

Bug

Work Environment

Question Answer
OS version (server) Ubuntu
OS version (client) 10
TheHive version / git hash 4.0.4
Package Type DEB
Browser type & version Chrome

Problem Description

After upgrading from TheHive 4.0.2 to 4.0.4 all the case tasks created in previous versions are no longer showed in the web interface. It shows that there are tasks (e.g. "Tasks List (0 of 12)") but are not showed.

application.log shows an error related to "actionRequired"

[ERROR] from akka.actor.ActorSystemImpl in application-akka.actor.default-dispatcher-32 [|] Response stream for [POST /api/v1/query] failed with 'The provided traverser does not map to a value: v[2703540376]->[JanusGraphVertexStep(IN,[ShareTask],edge), TraversalFilterStep([EdgeVertexStep(OUT), JanusGraphVertexStep(IN,[OrganisationShare],vertex), NoOpBarrierStep(2500), HasStep([~id.eq(4152)])]), JanusGraphPropertiesStep([actionRequired],value)]'. Aborting connection.
java.lang.IllegalArgumentException: The provided traverser does not map to a value: v[2703540376]->[JanusGraphVertexStep(IN,[ShareTask],edge), TraversalFilterStep([EdgeVertexStep(OUT), JanusGraphVertexStep(IN,[OrganisationShare],vertex), NoOpBarrierStep(2500), HasStep([~id.eq(4152)])]), JanusGraphPropertiesStep([actionRequired],value)]
        at org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil.apply(TraversalUtil.java:46)

I have been able to get the tasks via API removing "actionRequired" from the query. Instead of:

curl -XPOST -H 'Authorization: Bearer xxxxxxxxx' -H 'Content-Type: application/json' http://127.0.0.1:9000/api/v1/query?name=case-tasks -d '{"query":[{"_name":"getCase","idOrName":"~2990170120"},{"_name":"tasks"},{"_name":"filter","_not":{"_field":"status","_value":"Cancel"}},{"_name":"sort","_fields":[{"flag":"desc"},{"order":"asc"},{"startDate":"asc"},{"title":"asc"}]},{"_name":"page","from":0,"to":15,"extraData":["shareCount","actionRequired"]}]}'

This query works

curl -XPOST -H 'Authorization: Bearer xxxxxxxxx' -H 'Content-Type: application/json' http://127.0.0.1:9000/api/v1/query?name=case-tasks -d '{"query":[{"_name":"getCase","idOrName":"~2990170120"},{"_name":"tasks"},{"_name":"filter","_not":{"_field":"status","_value":"Cancel"}},{"_name":"sort","_fields":[{"flag":"desc"},{"order":"asc"},{"startDate":"asc"},{"title":"asc"}]},{"_name":"page","from":0,"to":15,"extraData":["shareCount"]}]}'

It seems that tasks created in previous versions does not have the "actionRequired" field that is a feature of TheHive 4.0.4.

Steps to Reproduce

  1. Create some tasks in TheHive 4.0.2
  2. Upgrade to TheHive 4.0.4
  3. Try to view these tasks in the web interface

Possible Solutions

I guess that the solution is upgrade all the tasks to v4.0.4 (adding the field "actionRequired") or modify the task methods to support legacy tasks.

@albertogordillo albertogordillo added TheHive4 TheHive4 related issues bug labels Jan 27, 2021
@albertogordillo albertogordillo changed the title [Bug] [Bug] TheHive 4.0.4 cannot show tasks created in previous versions Jan 27, 2021
@nadouani
Copy link
Contributor

nadouani commented Feb 2, 2021

@rriclet could you please take a look at this one? Thanks

@To-om To-om added this to the 4.0.5 milestone Feb 3, 2021
@nadouani nadouani assigned To-om and unassigned rriclet Feb 3, 2021
@To-om
Copy link
Contributor

To-om commented Feb 4, 2021

This problem appears when database schema is not correctly updated. This commit should fix it.

@To-om To-om closed this as completed Feb 4, 2021
@albertogordillo
Copy link
Author

Hello To-om,

After upgrading to 4.0.5 the problem is still present. Do I have to do anything manually to update database schema?

Regards

@stacsirt
Copy link

Hi,

This still appears to be an issue. We're experiencing it too.

Regards

@nulltiply
Copy link

Also experiencing this issue. Task logs created after the update show up but old ones do not.

@rriclet
Copy link
Contributor

rriclet commented Mar 24, 2021

#1875

@birigli
Copy link

birigli commented Mar 24, 2021

Hi,
is it sure the issue #1875 has the same roots? There the problem is with the tasklogs, and the initial version is already 4.0.5, finally there is not any error in application.log.

Regards

@asamrega
Copy link

Hello!

@albertogordillo, have you managed to solve the problem?

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

8 participants