question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[develop] docker-compose fails to build webapp resulting in non functional UI.

See original GitHub issue

Expected Behavior

The system should build and run properly whenever a new user clone the git repository and run the system using docker-composer up as described in the documentation.

Current Behavior

When a user clone the git repository and run docker-compose up, the application seems to build properly, however it fails to load the UI when users try to access http://localhost:8009/ with the error bellow:

Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/tornado-4.5.2-py2.7-linux-x86_64.egg/tornado/web.py", line 1509, in _execute result = method(*self.path_args, **self.path_kwargs) File "/owtf/owtf/api/handlers/ui_handlers.py", line 18, in get self.render('index.html') File "/usr/local/lib/python2.7/dist-packages/tornado-4.5.2-py2.7-linux-x86_64.egg/tornado/web.py", line 724, in render html = self.render_string(template_name, **kwargs) File "/usr/local/lib/python2.7/dist-packages/tornado-4.5.2-py2.7-linux-x86_64.egg/tornado/web.py", line 862, in render_string t = loader.load(template_name) File "/usr/local/lib/python2.7/dist-packages/tornado-4.5.2-py2.7-linux-x86_64.egg/tornado/template.py", line 427, in load self.templates[name] = self._create_template(name) File "/usr/local/lib/python2.7/dist-packages/tornado-4.5.2-py2.7-linux-x86_64.egg/tornado/template.py", line 454, in _create_template with open(path, "rb") as f: IOError: [Errno 2] No such file or directory: '/owtf/owtf/webapp/build/index.html'

Possible Solution

The error indicates a missing file : wtf/owtf/webapp/build/index.html’ Some superficial investigation shows that the yarn build that is supposed to generate that file is failing. The yarn error logs are available at: https://github.com/owtf/owtf/blob/develop/owtf/webapp/yarn-error.log

I tried to trace the issue and it seems like the root problems is on UglifyJS, but I couldn’t find much more than that.

Steps to Reproduce (for bugs)

Run the following commands(tested on OSX)

  1. git clone https://github.com/owtf/owtf -b develop 2.cd owtf
  2. docker-composer up
  3. Launch browser and navigate to http://localhost:8009/

Logs

Context

Unable to build develop branch

Your Environment

  • Installation method used: Docker Compose
  • Version/branch used: develop
  • Operating System and version (like Kali, Debian, ArchLinux, etc): Kali container on OSX(docker community, version 17.12.0-ce-mac55 (23011))
  • pip/setuptools version: latest on kali container
  • sudo access: container user is is root.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
viyatbcommented, Mar 7, 2018

Sure, go ahead! Thanks.

On Wed, Mar 7, 2018 at 10:20 Deepesh Pathak notifications@github.com wrote:

@viyatb https://github.com/viyatb Can I try to fix this issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/owtf/owtf/issues/935#issuecomment-371172402, or mute the thread https://github.com/notifications/unsubscribe-auth/AEWMSTFhDaVpBBOqLj_12QVLStlcaQfLks5tb_qvgaJpZM4SbkOC .

1reaction
r8torcommented, Mar 7, 2018

Hey Viyat,

Thanks for looking into to it and for maintaining such amazing software 😃

I hope I’ll have the chance to buy you a coffee(or tea) or a beer in a conference someday.

Cheers, RT

On Mar 6, 2018, at 5:29 PM, Viyat Bhalodia notifications@github.com wrote:

@r8tor https://github.com/r8tor thanks for the report. The UI in the develop branch should load but is broken since it is currently being ported to React (from the Tornado templates).

While the UI remains broken, the index.html file should be correctly generated by webpack. I’ll look into it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/owtf/owtf/issues/935#issuecomment-370990395, or mute the thread https://github.com/notifications/unsubscribe-auth/AbnltPJYev0NmHjqGtmP8r3ZbKC7etYlks5tbzgAgaJpZM4SbkOC.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker error: Service 'app' failed to build - Stack Overflow
No, the docker build environment is isolated from the host. Any virtualenv on the host is ignored on the build context and the...
Read more >
Overview | Docker Documentation
Make sure you are signed in to Docker Desktop and your Docker Hub account. From Troubleshoot, select Get support. This opens the in-app...
Read more >
Create a Dev Container - Visual Studio Code
The Visual Studio Code Dev Containers extension lets you use a Docker container as a full-featured development environment. It allows you to open...
Read more >
Dockerizing a Node.js Web Application - Semaphore Tutorial
Docker has significantly improved the way we build, ship and run apps. Read this tutorial to learn how to Dockerize a Node application....
Read more >
GitLab Docker images
Create a docker-compose.yml file: version: '3.6' services: web: image: 'gitlab/gitlab-ee:latest' restart: always hostname: 'gitlab.example.com' environment: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found