Pyrebase icon indicating copy to clipboard operation
Pyrebase copied to clipboard

Pyrebase Google Cloud Run (Docker) - Build Error

Open echtme opened this issue 4 years ago • 5 comments

I use Google Cloud Run with Python-3.8-slim with Flask, to deploy my projects online. But as soon as I add pyrebase to the requirement.txt and try to build the docker/push to the cloud, I get the error below (pycrypto).

Building wheel for pycrypto (setup.py): started Building wheel for pycrypto (setup.py): finished with status 'error' ERROR: Command errored out with exit status 1: command: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-76ri08fs/pycrypto_1a11af1ab48b403ba33d2c882a097f8d/setup.py'"'"'; file='"'"'/tmp/pip-install-76ri08fs/pycrypto_1a11af1ab48b403ba33d2c882a097f8d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-fuukd50v cwd: /tmp/pip-install-76ri08fs/pycrypto_1a11af1ab48b403ba33d2c882a097f8d/ Complete output (187 lines):

echtme avatar May 04 '21 13:05 echtme

I found the problem, I've python-slim which was causing the issue!

echtme avatar May 18 '21 11:05 echtme

@echtme so you say it is not possible to add pyrebase to python:3.8-slim ? Which image would you suggest to run Flask with Pyrebase?

Biaggio74 avatar Aug 29 '21 09:08 Biaggio74

It's been a while since I had this problem. But as I remember, I switched to the firebase-admin package from google, as I couldn't get pyrebase running on my setup.

echtme avatar Aug 29 '21 11:08 echtme

@echtme thanks for your prompt reply ;) ...actually in the meantime I did the same. However there are some tasks which we cannot do with the firebase_admin SDK, that is to sign in Firebase users. But I overcome the issue by utilising the Firebase Admin SDK REST service, so I could manage user auth without Pyrebase.

Biaggio74 avatar Aug 29 '21 12:08 Biaggio74

I just had a look at my old code and I did exactly the same at end ;)

echtme avatar Aug 29 '21 14:08 echtme