Git Product home page Git Product logo

Comments (5)

jordanmalecki avatar jordanmalecki commented on August 22, 2024 1

I was getting this error as well and I figured it out.
First things first make sure you opened your tunnel and the ngrok service is running.

(1) The ngrok executable file is in the project directory as opposed to path. So calling the ngrok command wouldn't work; it would have to be initiated via ./ngrok http 80 rather than ngrok http 80 ...I am not sure this was causing any issues, but to be safe I added a copy to my local bin (You could also add it to your path via .bashrc too if you wanted, but w/e):

~$ cp ~/trape/ngrok ~/.local/bin

(2) Make sure it is executable.

~$ chmod +x /path/to/ngrok

(3) Get your auth token from here and set it via the ngrok command (as well as in the project config file):

~$ ngrok config <YOUR-AUTHTOKEN>

(4) Make sure the ngrok service and the application are using the same port. Pretty sure 8080 is the default, you can change it to whatever you want, just make sure your firewall will allow it), so first you'd spin up ngrok:

~$ ngrok http 8080

then in your python env call trape.py:

(venv) $ python trape.py -u https://www.google.com -p 8080

If that doesn't work double check your authtoken, check your firewall, and maybe install the latest version of ngrok and replace the file in the project with the latest.

from trape.

god2106 avatar god2106 commented on August 22, 2024

for me also

from trape.

Dataclysm0 avatar Dataclysm0 commented on August 22, 2024

Step by step I will show you exactly what occurs:

  1. The introduction for trape begins to run, then at the end you get slapped with this:

Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/truxit/trape/trape/core/ngrok.py", line 81, in start_ngrok
result = subprocess.check_output([str_ngrok, "http", port])
File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['./ngrok', 'http', '8080']' returned non-zero exit status 1.
[x] ERROR: 'URLError' object has no attribute 'message'

After this occurs, I look to see what had happened on the ngrok end of things, and in the terminal that has ngrok running within it you will see this at the end after trying to run trape:

HTTP Requests ------------- GET /favicon.ico 502 Bad Gateway
GET / 502 Bad Gateway

THEN, to further understand the issue, I do a ctrl+left click on the "Forwarding" section of Ngrok, and it takes me to a page displaying further info on the issue and it reads

"ERR_NGROK_8012
Traffic was successfully tunneled to the ngrok agent, but the agent failed to establish a connection to the upstream web service at 127.0.0.1:8080. The error encountered was:

dial tcp 127.0.0.1:8080: connectex: No connection could be made because the target machine actively refused it."

I hope this may help out with a solution. Im stumped on this one, but im looking into it more.

from trape.

rbrtjns90 avatar rbrtjns90 commented on August 22, 2024

I fixed a bunch of these bugs.

https://github.com/rbrtjns90/trape

from trape.

Muqtgamer avatar Muqtgamer commented on August 22, 2024

#Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/muqthadir/Desktop/trape/core/ngrok.py", line 81, in start_ngrok
result = subprocess.check_output([str_ngrok, "http", port])
File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['./ngrok', 'http', '80']' returned non-zero exit status 1.
[x] ERROR: 'URLError' object has no attribute 'message' @Dataclysm0 could you please help me to solve iam still learning i did not understand it correctly so,plz tell me how to fix clearly plz plz.

from trape.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.