Closed atom2-source closed 2 months ago
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
I was moving the files from firestore cloud bucket to my google cloud to process the images with cloud vision to keep the photos in my firestore bucket for as short as possible to make it harder for anyone to access as its the only entry point I set the cloud run up in google cloud but I might just use the moderated images example in the firestore functions github page and move them to another firestore bucket with a firestore function if using cloud run from gcp console is too problematic.
Didn't mean to close this
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
when running cloud run it fails to import firebase admin
Steps to reproduce:
What happened? How can we make the problem occur?
errorGroups: [1] insertId: "661c7cf1000cfff511dfefb7" labels: {1} logName: "projects/rayneo-29da0/logs/run.googleapis.com%2Fstderr" receiveTimestamp: "2024-04-15T01:03:45.856897602Z" resource: {2} severity: "ERROR" textPayload: "Traceback (most recent call last): File "/app/app.py", line 2, in
import firebase_admin "
timestamp: "2024-04-15T01:03:45.851957Z"
This could be a description, log/console output, etc.
Relevant Code:
Flask==3.0.3 requests==2.31.0 debugpy==1.8.1 google-cloud-storage==2.16.0 google-cloud-firestore==2.16.0
from google.cloud import storage import firebase_admin from firebase_admin import firestore import logging from flask import Flask, request, jsonify
Initialize Firebase Admin SDK
firebase_admin.initialize_app()
app = Flask(name)
def move_file_and_delete(file_path): source_bucket_name = 'removed bucket'
destination_bucket_name = 'removed bucket'
@app.route('/', methods=['POST'])
def endpoint(): data = request.get_json() file_path = data.get('path')
if name == 'main': app.run(debug=True, host='0.0.0.0', port=8080)