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

docker image: $.post(...).success is not a function #95

Closed
makefu opened this issue Jan 18, 2017 · 4 comments
Closed

docker image: $.post(...).success is not a function #95

makefu opened this issue Jan 18, 2017 · 4 comments
Assignees
Labels
Milestone

Comments

@makefu
Copy link

makefu commented Jan 18, 2017

Request Type

Bug

Work Environment

Question Answer
OS version (server) Ubuntu
OS version (client) 16.10
TheHive version / git hash certbdf/thehive:latest
Package Type Docker
Browser type & version firefox 50, chrome 55

Problem Description

When i try to start up thehive via docker ( sudo docker run --rm --publish 127.0.0.1:9000:9000 --volume $PWD/thehive:/data certbdf/thehive:latest ) and open the URL i get an empty screen.

The Error console in the browser shows:

Error: a.post(...).success is not a function
    at Object.requestStream (http://localhost:9000/scripts/scripts.ddd215ef.js:3:24364)
    at Object.init (http://localhost:9000/scripts/scripts.ddd215ef.js:3:23307)
    at new <anonymous> (http://localhost:9000/scripts/scripts.ddd215ef.js:1:9179)
    at Object.h [as instantiate] (http://localhost:9000/scripts/vendor.8c6bb835.js:5:6891)
    at http://localhost:9000/scripts/vendor.8c6bb835.js:6:1757
    at Object.<anonymous> (http://localhost:9000/scripts/vendor.8c6bb835.js:18:11709)
    at http://localhost:9000/scripts/vendor.8c6bb835.js:4:22589
    at va (http://localhost:9000/scripts/vendor.8c6bb835.js:5:28772)
    at n (http://localhost:9000/scripts/vendor.8c6bb835.js:5:21089)
    at g (http://localhost:9000/scripts/vendor.8c6bb835.js:

Steps to Reproduce

  1. mkdir thehive; chmod 777 thehive
  2. sudo docker run --rm --publish 127.0.0.1:9000:9000 --volume $PWD/thehive:/data
  3. firefox localhost:9000

Complementary information

docker startup log

[2017-01-18 13:29:21,218][INFO ][node                     ] [Radion the Atomic Man] version[2.3.5], pid[7], build[90f439f/2016-07-27T10:36:52Z]
[2017-01-18 13:29:21,220][INFO ][node                     ] [Radion the Atomic Man] initializing ...
[2017-01-18 13:29:22,215][INFO ][plugins                  ] [Radion the Atomic Man] modules [reindex, lang-expression, lang-groovy], plugins [], sites []
[2017-01-18 13:29:22,257][INFO ][env                      ] [Radion the Atomic Man] using [1] data paths, mounts [[/data (/dev/sda1)]], net usable_space [604.1gb], net total_space [961.7gb], spins? [possibly], types [ext4]
[2017-01-18 13:29:22,257][INFO ][env                      ] [Radion the Atomic Man] heap size [990.7mb], compressed ordinary object pointers [true]
[2017-01-18 13:29:25,767][INFO ][node                     ] [Radion the Atomic Man] initialized
[2017-01-18 13:29:25,767][INFO ][node                     ] [Radion the Atomic Man] starting ...
[2017-01-18 13:29:25,858][INFO ][transport                ] [Radion the Atomic Man] publish_address {172.17.0.2:9300}, bound_addresses {[::]:9300}
[2017-01-18 13:29:25,864][INFO ][discovery                ] [Radion the Atomic Man] hive/9ozGnevWQD-uy6kga54x1A
[info] o.r.Reflections - Reflections took 4950 ms to scan 122 urls, producing 7307 keys and 74845 values 
[info] module - Loading model class org.elastic4play.services.DBListModel
[info] module - Loading model class models.ArtifactModel
[info] module - Loading model class connectors.misp.MispModel
[info] module - Loading model class models.CaseTemplateModel
[info] module - Loading model class org.elastic4play.services.AttachmentModel
[info] module - Loading model class models.UserModel
[info] module - Loading model class models.ReportTemplateModel
[info] module - Loading model class models.AuditModel
[info] module - Loading model class models.JobModel
[info] module - Loading model class models.AnalyzerModel
[info] module - Loading model class models.LogModel
[info] module - Loading model class models.CaseModel
[info] module - Loading model class models.TaskModel
[2017-01-18 13:29:28,941][INFO ][cluster.service          ] [Radion the Atomic Man] new_master {Radion the Atomic Man}{9ozGnevWQD-uy6kga54x1A}{172.17.0.2}{172.17.0.2:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2017-01-18 13:29:28,974][INFO ][http                     ] [Radion the Atomic Man] publish_address {172.17.0.2:9200}, bound_addresses {[::]:9200}
[2017-01-18 13:29:28,975][INFO ][node                     ] [Radion the Atomic Man] started
[2017-01-18 13:29:29,007][INFO ][gateway                  ] [Radion the Atomic Man] recovered [0] indices into cluster_state
[info] o.r.Reflections - Reflections took 3309 ms to scan 122 urls, producing 7307 keys and 74845 values 
[info] o.r.Reflections - Reflections took 2726 ms to scan 122 urls, producing 7307 keys and 74845 values 
[info] a.e.s.Slf4jLogger - Slf4jLogger started
[info] o.e.plugins - [the Living Darkness Null] modules [], plugins [], sites []
[info] c.misp.MispSrv - Update of MISP events is starting ...
[info] c.misp.MispSrv - 0 MISP event(s) updated
[info] play.api.Play - Application started (Prod)
[info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
@nadouani
Copy link
Contributor

Nice catch! Thanks @makefu

This is because of the Angular version 1.6. The issues is that our bower configuration (on TheHive 2.9.1) doesn't force the 1.5.x version of angular dependency.

We will try to publish a new docker image that solves this issue. Note that 2.10.0 release (that also solve this problem) should be released in the next few days.

@makefu
Copy link
Author

makefu commented Jan 18, 2017

@nadouani thanks for the quick reply. I will test the latest version once it is out.
In the meantime is there a way to force a previous version in docker which works for me to try it out?

Keep up your great work!

@nadouani
Copy link
Contributor

The docker image include a built version of the frontend code (minified and uglyfied), so we cannot replace the file causing the issue :(

@nadouani
Copy link
Contributor

hi @makefu the docker image has been updated and this issue should be fixed with 2.9.2 release.

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

No branches or pull requests

3 participants