viur-framework / viur-core

The core component of ViUR, the Python framework for modern web development.
https://www.viur.dev
MIT License
13 stars 14 forks source link

Traceback Errors are not helpful, when gunicorn is unable to boot up #1015

Open timmytiefkuehl opened 9 months ago

timmytiefkuehl commented 9 months ago

When gunicorn can't boot up properly the traceback error is not helpful.

Traceback (most recent call last):
  File "/layers/google.python.pip/pip/lib/python3.11/site-packages/gunicorn/arbiter.py", line 609, in spawn_worker
    worker.init_process()
  File "/layers/google.python.pip/pip/lib/python3.11/site-packages/gunicorn/workers/gthread.py", line 95, in init_process
    super().init_process()
  File "/layers/google.python.pip/pip/lib/python3.11/site-packages/gunicorn/workers/base.py", line 134, in init_process
    self.load_wsgi()
  File "/layers/google.python.pip/pip/lib/python3.11/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
    self.wsgi = self.app.wsgi()

The actual error was hidden in the logs and not higlighted as one.

google.api_core.exceptions.Forbidden: 403 GET https://storage.googleapis.com/storage/v1/b/application-name.appspot.com?projection=noAcl&prettyPrint=false: application-name@appspot.gserviceaccount.com does not have storage.buckets.get access to the Google Cloud Storage bucket. Permission 'storage.buckets.get' denied on resource (or it may not exist).
phorward commented 1 week ago

I have now idea or test-case to resolve this. More information required.