BinBashBanana / PyDodge

Python HTTP Proxy w/ Rewrites (PyDodge "B") https://github.com/webrecorder/pywb
GNU General Public License v3.0
23 stars 63 forks source link

"Application Error" when deploying to Heroku #21

Closed imrileyjones closed 2 years ago

imrileyjones commented 2 years ago

For some reason whenever I deploy PyDodge it gives out this application error. After, I even tried creating a runtime file to change Python's version but that doesn't even work..

BinBashBanana commented 2 years ago

Can you send the application logs?

imrileyjones commented 2 years ago

The log is never ending - it constantly attempts to "respond worker 1"

I do not know if this has to do anything with deployment error - when ever I try to use the button "deploy to heroku" it fails, and this message is shown: "Item could not be created: We couldn't deploy your app because the source code violates the Salesforce Acceptable Use and External-Facing Services Policy." ... To bypass this, basically I just created a empty app and then later connecting my Github account to upload the proxy. I don't know if it's blocking any files?

imrileyjones commented 2 years ago

I also notice that when deploying Heroku says that no Python version is detected so it automatically uses 3.10.3. Does the code support this version? Is there a certain version of Python I should be using for PyDodge? Or more over does Python 3.10.3 support all of the requirements in https://github.com/BinBashBanana/PyDodge/blob/master/requirements.txt?

BinBashBanana commented 2 years ago

"Item could not be created: We couldn't deploy your app because the source code violates the Salesforce Acceptable Use and External-Facing Services Policy." There's nothing I can do about this, the easiest way to get around it is to just fork the repository and deploy the fork.

I can't find anything in the logs, possibly try an older version of python (3.6 or 3.7)

Really what you should do is consider an alternative such as Ultraviolet, as pydodge is pretty outdated.

fhsclock commented 2 years ago

I used an older version of python-3.7.13, and now got the generic "Internal Server Error". Can you happen to find anything in this new logs? murmuring-oasis-34315-logs-1648271498060.txt

(I created a txt file named runtime and wrote python-3.7.13 to declare that version.) Here's a list of Heroku's so-called supported python supported versions.

fhsclock commented 2 years ago

Here's the heroku link.

fhsclock commented 2 years ago

This is @queasydoughnuts, I just hopped accounts ... Heroku blocked my other github account, so I use this one to upload things to Heroku's server

BinBashBanana commented 2 years ago

Strange... it looks like it wasn't able to detect the application this time. Try running bash run-heroku.sh in the console.

fhsclock commented 2 years ago

here's what the console outputted:

[uWSGI] getting INI configuration from uwsgi-heroku.ini Starting uWSGI 2.0.20 (64bit) on [Sat Mar 26 05:26:12 2022] compiled with version: 9.4.0 on 26 March 2022 05:08:51 os: Linux-4.4.0-1101-aws #106-Ubuntu SMP Tue Mar 1 10:51:49 UTC 2022 nodename: fcc9c596-a595-42f5-a785-e049f120ebbe machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 8 current working directory: /app detected binary path: /app/.heroku/python/bin/uwsgi your processes number limit is 256 your memory page size is 4096 bytes detected max file descriptor number: 10000

BinBashBanana commented 2 years ago

Looks like there were missing dependencies. Try pip install -r requirements.txt and then bash run-heroku.sh

fhsclock commented 2 years ago

Unfortunately still getting a 500 error, and here is my log now:

murmuring-oasis-34315-logs-1648273615738.txt

here's the console:

[uWSGI] getting INI configuration from uwsgi-heroku.ini Starting uWSGI 2.0.20 (64bit) on [Sat Mar 26 05:44:13 2022] compiled with version: 9.4.0 on 26 March 2022 05:08:51 os: Linux-4.4.0-1101-aws #106-Ubuntu SMP Tue Mar 1 10:51:49 UTC 2022 nodename: 48864397-4bba-40da-93fa-64d10e1a95f4 machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 8 current working directory: /app detected binary path: /app/.heroku/python/bin/uwsgi your processes number limit is 256 your memory page size is 4096 bytes detected max file descriptor number: 10000

fhsclock commented 2 years ago

Well my heroku account just got banned so I'm unfortunately this whole process has gone to waste