-
Notifications
You must be signed in to change notification settings - Fork 626
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
Unable to build TheHive from sources on Windows #602
Comments
I had the same issue as well. I built the project with sbt with some success. Today I'm able to run locally, but I have not been able to build using activator. My environment is also W10 with everything installed in it's default path. I would recommend the following so you can start working, it is just a workaroud and you loose a ton of dev capabilites:
At this point you should be able to point your browser to the project. |
Hey axpatito, Thank you very much for the trick. While it does start the server, I get a 404 for most assets. Console prints out this error
|
Yup, you will get those non stop. It is due to the missnaming of temp files on Windows. I just ignore those warning and can continue to work. As stated before, this is just a workaround. I don't understand why you are getting 404's, the application should be running nicely. |
If temporary files is needed, they are stored in the context of the HTTP request. At the end of the request, theses files are deleted. In order to track them, they are stored in a directory named with the ID of the request, which contains ":". I didn't realize that it is not permitted by Windows. |
Hey @To-om , Are you talking about the 404 error from the workaround or the initial issue with the unexpected NoSuchFileException? |
I'm talking about your error
and check output for errors (cf. docs) |
The error is only created because the build process via activator doesn't work and the workaround doesn't use it properly. Building manually does work. The real issue is the crash during the build process itself, which axpatito confirmed to make it unavailable on Windows completely. |
I'm not sure I can help you to build TheHive in Windows. I seems that main build tool (sbt) fails to execute npm, bower or grunt tools. You can try to customize how sbt run these tools by editing project/FrontEnd.scala in line 30, 32 and 34. |
I did that already to fix the immediate compiling errors that are visible. However, I don't get any visible source for the last error, which prevents the building, so I don't really have any starting point. |
Regarding the error |
Can you update the |
Hello @JamesCullum Could you please take care of these attempts (changing bower.json and testing) because we don't use windows. If your fixes work, then we will be happy to include them, but right now, we don't the bandwidth to work on this. I'll keep this issue open, remove it from 3.1.0 release. If you end up fixing it, we could include your PR on 3.1.0. Thanks for your understanding |
Hey @nadouani, I executed those changes already and took care of it by communicating to the other developer. The version just needs to be bumped to The failed build itself keeps on existing, so it still doesn't work on Windows. While I understand where your idea is coming from, I am not sure if it is a good idea to keep away free developer resources due to missing developer resources. If it would be possible to build on Windows, there would be more people that could help. By choosing to not make it available to develop on Windows, the work will stay within your team and the changes that I planned on integrating won't be able to help other users. If it is permanently impossible to build on Windows, I have to make all changes in a dirty way - I don't like it and other users could benefit from it, if me and other Windows developers were able to assist. To be frank, Windows has by far the highest OS share - I'm not sure why you would exclude that one, of all. |
@JamesCullum I've never said we want to keep away free developer resources, please read what I said again. Do you really think we don't want it to work on Windows? I've just said, we don't have resources, and time to work on this issue, and you a WELCOME to contribute, we are not against contribution and helping other users. So please, feel free and shoot any Pull Request you think could help the project ;) |
Of course it would be nice to work on Windows. I mean that setting it as low-priority and fix-whenever will make it impossible for other developers to help. This will make the backlog longer and longer, as less developers are working on it. And this in return will keep the windows compatibility away forever. So while you would appreciate it working on Windows, it won't be available on it by itself. The used technology stack is very specific and no one is apparently able to debug this issue on why the files do not get build. This means that the only people realistically fixing it anytime soon would be the people who don't use Windows and have no interest in fixing it, considering its a low priority. Maybe this is the misunderstanding - I know that you would like to have it fixed. I am just saying that this is unlikely to be fixed with this approach. |
The If you think that removing this label is a good idea, then, ok I can do it :) |
@JamesCullum can you confirm the pull-request done by @billmurrin solves your problem ? |
I've implemented this already. See
This does fix it failing completely, but does not fix the compiling crash. |
@JamesCullum I compiled mine using the develop branch from elastic4play, 1.6.0
In TheHive Project (I'm also using develop branch), modify
Now if you try to compile on Windows with I believe the 1.6.0 elastic4play will be merged into master when 3.1.0 is released at the end of the month. |
Where do you put the folders? Can you give me your folder structure? |
Hi @JamesCullum, I have elastic4play and TheHive in their own folders. Something like
The git clone command I put above would be executed from within After you clone the repo, cd into the elastic4play folder, checkout develop When you compile TheHive, it will pull the compiled elastic4play 1.6.0-SNAPSHOT from your local repository, the path is something like I hope that helps. |
Thank you for the assistance. I've did it exactly like you described and it found and used the new elastic4play version. However, the error itself stays the same: |
Aloha @JamesCullum, is this the same TheHive folder that you've been building within? If so, I've found that clearing the contents of the target directory to be helpful with clearing errors generated by previous builds. Not sure if all data is purged between builds despite using clean, it seems that |
I can confirm this is the solution to build on Windows. No error messages are shown, it works great! Thanks @billmurrin |
Thank you @billmurrin for the assistance. I've deleted all @axpatito @billmurrin Which OS are you using exactly? Are you not even getting the error with timestamps, which requires one of the workarounds? |
Hi @JamesCullum. I'm not getting any errors back related to timestamps. I'm testing on Win 10 Pro. Just to test, I tried adding the sbtconfig.txt file like you did and it still built without any errors on my end. On the error you posted with the stack trace above, it referenced line 31 of FrontEnd.scala. Would you mind pasting that section here? |
Hey @billmurrin, Thank you for the strong support!
|
Request Type
Bug
Work Environment
Problem Description
I would like to set up a local dev environment to add features. I am inside a corporate environment and have the necessary proxy variables set. I followed the instructions to build it from source, but only get an error during compilation, preventing me from proceeding:
java.nio.file.NoSuchFileException: C:\TheHive2\thehive-backend\target\web\classes\main
I tried to fix it myself but was unable to get any information about this call. I didn't find any place that refers to this file or folder. I was unable to find the command that gets called at this point.
I was already able to get around a few errors on the way and will create a PR to fix those, once I've got everything set up.
Steps to Reproduce
conf/sbtconfig.txt
with content-Dsbt.io.jdktimestamps=true
)project/FrontEnd.scala
)Complementary information
The text was updated successfully, but these errors were encountered: