I am getting this error, I added build packs of Chrome and Chrome Driver. Also Env vars are set up correctly.
bb0907919af1 fwd="59.103.112.21" dyno=web.1 connect=0ms service=1ms status=404 bytes=173 protocol=https
2023-11-27T06:27:49.421087+00:00 heroku[router]: at=info method=GET path="/test" host=insta-saas-5e8ccac18df9.herokuapp.com request_id=af7918c1-285b-44f9-a22e-ecf751106eaa fwd="59.103.112.21" dyno=web.1 connect=0ms service=4842ms status=500 bytes=193 protocol=https
2023-11-27T06:27:49.420423+00:00 app[web.1]: 59.103.112.21:0 - "GET /test HTTP/1.1" 500
2023-11-27T06:27:49.424520+00:00 app[web.1]: [2023-11-27 06:27:49 +0000] [7] [ERROR] Exception in ASGI application
2023-11-27T06:27:49.424521+00:00 app[web.1]: Traceback (most recent call last):
2023-11-27T06:27:49.424524+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
2023-11-27T06:27:49.424524+00:00 app[web.1]: result = await app( # type: ignore[func-returns-value]
2023-11-27T06:27:49.424524+00:00 app[web.1]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-27T06:27:49.424525+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
2023-11-27T06:27:49.424525+00:00 app[web.1]: return await self.app(scope, receive, send)
2023-11-27T06:27:49.424525+00:00 app[web.1]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-27T06:27:49.424526+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/fastapi/applications.py", line 1106, in __call__
2023-11-27T06:27:49.424527+00:00 app[web.1]: await super().__call__(scope, receive, send)
2023-11-27T06:27:49.424527+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/starlette/applications.py", line 122, in __call__
2023-11-27T06:27:49.424527+00:00 app[web.1]: await self.middleware_stack(scope, receive, send)
2023-11-27T06:27:49.424527+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/starlette/middleware/errors.py", line 184, in __call__
2023-11-27T06:27:49.424528+00:00 app[web.1]: raise exc
2023-11-27T06:27:49.424528+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/starlette/middleware/errors.py", line 162, in __call__
2023-11-27T06:27:49.424528+00:00 app[web.1]: await self.app(scope, receive, _send)
2023-11-27T06:27:49.424528+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
2023-11-27T06:27:49.424528+00:00 app[web.1]: raise exc
2023-11-27T06:27:49.424528+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
2023-11-27T06:27:49.424529+00:00 app[web.1]: await self.app(scope, receive, sender)
2023-11-27T06:27:49.424529+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
2023-11-27T06:27:49.424529+00:00 app[web.1]: raise e
2023-11-27T06:27:49.424529+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
2023-11-27T06:27:49.424529+00:00 app[web.1]: await self.app(scope, receive, send)
2023-11-27T06:27:49.424529+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/starlette/routing.py", line 718, in __call__
2023-11-27T06:27:49.424529+00:00 app[web.1]: await route.handle(scope, receive, send)
2023-11-27T06:27:49.424529+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/starlette/routing.py", line 276, in handle
2023-11-27T06:27:49.424530+00:00 app[web.1]: await self.app(scope, receive, send)
2023-11-27T06:27:49.424530+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/starlette/routing.py", line 66, in app
2023-11-27T06:27:49.424530+00:00 app[web.1]: response = await func(request)
2023-11-27T06:27:49.424530+00:00 app[web.1]: ^^^^^^^^^^^^^^^^^^^
2023-11-27T06:27:49.424530+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/fastapi/routing.py", line 274, in app
2023-11-27T06:27:49.424530+00:00 app[web.1]: raw_response = await run_endpoint_function(
2023-11-27T06:27:49.424531+00:00 app[web.1]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-27T06:27:49.424531+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
2023-11-27T06:27:49.424531+00:00 app[web.1]: return await run_in_threadpool(dependant.call, **values)
2023-11-27T06:27:49.424531+00:00 app[web.1]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-27T06:27:49.424531+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
2023-11-27T06:27:49.424531+00:00 app[web.1]: return await anyio.to_thread.run_sync(func, *args)
2023-11-27T06:27:49.424531+00:00 app[web.1]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-27T06:27:49.424531+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/anyio/to_thread.py", line 33, in run_sync
2023-11-27T06:27:49.424532+00:00 app[web.1]: return await get_asynclib().run_sync_in_worker_thread(
2023-11-27T06:27:49.424532+00:00 app[web.1]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-27T06:27:49.424532+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
2023-11-27T06:27:49.424532+00:00 app[web.1]: return await future
2023-11-27T06:27:49.424532+00:00 app[web.1]: ^^^^^^^^^^^^
2023-11-27T06:27:49.424542+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 807, in run
2023-11-27T06:27:49.424542+00:00 app[web.1]: result = context.run(func, *args)
2023-11-27T06:27:49.424542+00:00 app[web.1]: ^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-27T06:27:49.424542+00:00 app[web.1]: File "/app/main.py", line 37, in test
2023-11-27T06:27:49.424542+00:00 app[web.1]: driver = webdriver.Chrome(options=options)
2023-11-27T06:27:49.424543+00:00 app[web.1]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-27T06:27:49.424543+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
2023-11-27T06:27:49.424543+00:00 app[web.1]: super().__init__(
2023-11-27T06:27:49.424543+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/selenium/webdriver/chromium/webdriver.py", line 56, in __init__
2023-11-27T06:27:49.424543+00:00 app[web.1]: super().__init__(
2023-11-27T06:27:49.424543+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 208, in __init__
2023-11-27T06:27:49.424543+00:00 app[web.1]: self.start_session(capabilities)
2023-11-27T06:27:49.424546+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 292, in start_session
2023-11-27T06:27:49.424546+00:00 app[web.1]: response = self.execute(Command.NEW_SESSION, caps)["value"]
2023-11-27T06:27:49.424546+00:00 app[web.1]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-27T06:27:49.424546+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 347, in execute
2023-11-27T06:27:49.424546+00:00 app[web.1]: self.error_handler.check_response(response)
2023-11-27T06:27:49.424547+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.12/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
2023-11-27T06:27:49.424547+00:00 app[web.1]: raise exception_class(message, screen, stacktrace)
2023-11-27T06:27:49.424547+00:00 app[web.1]: selenium.common.exceptions.SessionNotCreatedException: Message: session not created: Chrome failed to start: exited normally.
2023-11-27T06:27:49.424547+00:00 app[web.1]: (session not created: DevToolsActivePort file doesn't exist)
2023-11-27T06:27:49.424551+00:00 app[web.1]: (The process started from chrome location /app/.cache/selenium/chrome/linux64/119.0.6045.105/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)