Comments (5)
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.
for me also
from trape.
Step by step I will show you exactly what occurs:
- 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.
I fixed a bunch of these bugs.
https://github.com/rbrtjns90/trape
from trape.
#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)
- Gt HOT 1
- Login screen disappears HOT 1
- Errorno 14 HOT 3
- cannot import name 'json' from 'itsdangerous' (/usr/lib/python3/dist-packages/itsdangerous/__init__.py) HOT 1
- The client is using an unsupported version of the Socket.IO or Engine.IO protocols (further occurrences of this error will be logged with level INFO) HOT 2
- 1
- Connected
- [WinError 2] The system cannot find the file specified HOT 1
- Error in generating links HOT 2
- Hey HOT 1
- Error in ngork
- Trape
- Please remove ngrok as a tunneling option as this tool violates the terms of service HOT 1
- cannot import name 'Container' from 'collections' (/usr/lib/python3.11/collections/__init__.py)
- Socket.IO or Engine.IO issues HOT 1
- Change 'ngrok.io' to 'ngrok-free.app' as ngrok has changed its link! HOT 1
- Error: module 'eventlet.green HOT 1
- x] ERROR: 'originalURL' HOT 1
- Error: can not connect with ngrok. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trape.