title: Heroku Application Error with Flask Socket-IO
body: <p>The app is perfectly working on local but on heroku server it returns Application Error. I suspect the problem might be on Procfile, when I changed it to &quot;web: gunicorn eventlet -w 1 app:app&quot;, from &quot;web: gunicorn app:app&quot; it stopped working, I'm new on socketIO and flask, I've tried everything I saw on the internet to put on Procfile that works with socketIO but nothing worked.
  Please if anyone knows why this is happening please help me.</p>
  <p>This is my <strong>requirements.txt</strong> file:</p>
  <pre><code>bidict==0.22.0
  brotlipy==0.7.0
  certifi==2021.10.8
  click==8.1.3
  dnspython==2.2.1
  eventlet==0.33.1
  Flask==2.1.3
  Flask-SocketIO==5.2.0
  Flask-SQLAlchemy==2.5.1
  Flask-WTF==1.0.1
  gevent==21.12.0
  gevent-websocket==0.10.1
  greenlet==1.1.2
  gunicorn==20.1.0
  importlib-metadata==4.12.0
  itsdangerous==2.1.2
  Jinja2==3.1.2
  MarkupSafe==2.1.1
  psycopg2==2.9.3
  pycosat==0.6.3
  python-engineio==4.3.3
  python-socketio==5.7.1
  SQLAlchemy==1.4.39
  Werkzeug==2.1.2
  wincertstore==0.2
  WTForms==3.0.1
  zipp==3.8.1
  zope.event==4.5.0
  zope.interface==5.4.0
  </code></pre>
  <p><strong>this is the heroku logs:</strong></p>
  <pre><code>2022-08-05T15:16:18.022704+00:00 app[web.1]:
  2022-08-05T15:16:18.022716+00:00 app[web.1]: Error: class uri 'eventlet' invalid or not found:
  2022-08-05T15:16:18.022716+00:00 app[web.1]:
  2022-08-05T15:16:18.022717+00:00 app[web.1]: [Traceback (most recent call last):
  2022-08-05T15:16:18.022717+00:00 app[web.1]: File &quot;/app/.heroku/python/lib/python3.10/site-packages/gunicorn/util.py&quot;, line 99, in load_class
  2022-08-05T15:16:18.022718+00:00 app[web.1]: mod = importlib.import_module('.'.join(components))
  2022-08-05T15:16:18.022718+00:00 app[web.1]: File &quot;/app/.heroku/python/lib/python3.10/importlib/__init__.py&quot;, line 126, in import_module
  2022-08-05T15:16:18.022718+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
  2022-08-05T15:16:18.022719+00:00 app[web.1]: File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1050, in _gcd_import
  2022-08-05T15:16:18.022719+00:00 app[web.1]: File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1027, in _find_and_load
  2022-08-05T15:16:18.022720+00:00 app[web.1]: File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1006, in _find_and_load_unlocked
  2022-08-05T15:16:18.022720+00:00 app[web.1]: File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 688, in _load_unlocked
  2022-08-05T15:16:18.022720+00:00 app[web.1]: File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 883, in exec_module
  2022-08-05T15:16:18.022721+00:00 app[web.1]: File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 241, in _call_with_frames_removed
  2022-08-05T15:16:18.022721+00:00 app[web.1]: File &quot;/app/.heroku/python/lib/python3.10/site-packages/gunicorn/workers/geventlet.py&quot;, line 20, in &lt;module&gt;
  2022-08-05T15:16:18.022721+00:00 app[web.1]: from eventlet.wsgi import ALREADY_HANDLED as EVENTLET_ALREADY_HANDLED
  2022-08-05T15:16:18.022722+00:00 app[web.1]: ImportError: cannot import name 'ALREADY_HANDLED' from 'eventlet.wsgi' (/app/.heroku/python/lib/python3.10/site-packages/eventlet/wsgi.py)
  2022-08-05T15:16:18.022722+00:00 app[web.1]: ]
  2022-08-05T15:16:18.022722+00:00 app[web.1]:
  2022-08-05T15:16:18.246442+00:00 heroku[web.1]: Process exited with status 1
  2022-08-05T15:16:18.357952+00:00 heroku[web.1]: State changed from starting to crashed
  2022-08-05T15:16:18.374380+00:00 heroku[web.1]: State changed from crashed to starting
  2022-08-05T15:16:23.365045+00:00 heroku[web.1]: Starting process with command `gunicorn -k eventlet -w 1 app:app`
  2022-08-05T15:16:24.399378+00:00 app[web.1]:
  2022-08-05T15:16:24.399392+00:00 app[web.1]: Error: class uri 'eventlet' invalid or not found:
  2022-08-05T15:16:24.399392+00:00 app[web.1]:
  2022-08-05T15:16:24.399393+00:00 app[web.1]: [Traceback (most recent call last):
  2022-08-05T15:16:24.399393+00:00 app[web.1]: File &quot;/app/.heroku/python/lib/python3.10/site-packages/gunicorn/util.py&quot;, line 99, in load_class
  2022-08-05T15:16:24.399393+00:00 app[web.1]: mod = importlib.import_module('.'.join(components))
  2022-08-05T15:16:24.399394+00:00 app[web.1]: File &quot;/app/.heroku/python/lib/python3.10/importlib/__init__.py&quot;, line 126, in import_module
  2022-08-05T15:16:24.399394+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
  2022-08-05T15:16:24.399394+00:00 app[web.1]: File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1050, in _gcd_import
  2022-08-05T15:16:24.399395+00:00 app[web.1]: File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1027, in _find_and_load
  2022-08-05T15:16:24.399395+00:00 app[web.1]: File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1006, in _find_and_load_unlocked
  2022-08-05T15:16:24.399395+00:00 app[web.1]: File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 688, in _load_unlocked
  2022-08-05T15:16:24.399396+00:00 app[web.1]: File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 883, in exec_module
  2022-08-05T15:16:24.399396+00:00 app[web.1]: File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 241, in _call_with_frames_removed
  2022-08-05T15:16:24.399396+00:00 app[web.1]: File &quot;/app/.heroku/python/lib/python3.10/site-packages/gunicorn/workers/geventlet.py&quot;, line 20, in &lt;module&gt;
  2022-08-05T15:16:24.399397+00:00 app[web.1]: from eventlet.wsgi import ALREADY_HANDLED as EVENTLET_ALREADY_HANDLED
  2022-08-05T15:16:24.399397+00:00 app[web.1]: ImportError: cannot import name 'ALREADY_HANDLED' from 'eventlet.wsgi' (/app/.heroku/python/lib/python3.10/site-packages/eventlet/wsgi.py)
  2022-08-05T15:16:24.399398+00:00 app[web.1]: ]
  2022-08-05T15:16:24.399402+00:00 app[web.1]:
  2022-08-05T15:16:24.550505+00:00 heroku[web.1]: Process exited with status 1
  2022-08-05T15:16:24.671364+00:00 heroku[web.1]: State changed from starting to crashed
  2022-08-05T15:31:37.077623+00:00 heroku[router]: at=error code=H10 desc=&quot;App crashed&quot; method=GET path=&quot;/session&quot; host=cheesecake142.herokuapp.com request_id=95dbcb95-8af7-42d6-8979-10d78af79447 fwd=&quot;120.29.69.149&quot; dyno= connect= service= status=503 bytes= protocol=https
  2022-08-05T15:31:37.460979+00:00 heroku[router]: at=error code=H10 desc=&quot;App crashed&quot; method=GET path=&quot;/favicon.ico&quot; host=cheesecake142.herokuapp.com request_id=0ca459b8-538a-47f9-a4b4-296e21540db8 fwd=&quot;120.29.69.149&quot; dyno= connect=
   service= status=503 bytes= protocol=https
  </code></pre>
  <p>I'm willing to provide additional details about this problem if needed.</p>