Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

cloud functions V1 , Trigger Type: cloud Store | Event type: on creating | Service account: custom

No get logs trigger on uploading files in cloud storage bucket, Testing is successful but not end result.

Tried for Event type: on delete also not working

Logs no error. 

Service account permission : added storage admin

Any troubleshooting guide for debugging it. how to get custom values printed into logs

0 1 184
1 REPLY 1

Hi @pushpendrasingh,

Welcome to Google Cloud Community!

Your Cloud Function (v1) with a custom service account isn't triggering on Cloud Storage object creation.

This might help you:

  1. Verification:

    • Check deployment status, region, and bucket name.
    • Verify Storage Admin permission for the service account.
  2. Code Review:

    • Ensure correct handling of StorageObject in your code.
    • Use logging (console.loglogging.info) to print object details.
    • Use debugging for complex logic.
  3. Eventarc Configuration (if applicable):

    • Check Eventarc trigger configuration (service account permissions).
  4. Logging and Monitoring:

    • Enable Cloud Function logs (gcloud functions logs).
    • Use Stackdriver Logging or a custom log viewer.
    • Consider Cloud Monitoring for tracking invocations and errors.
  5. Testing:

    • Upload files directly to the bucket for testing.
    • Create a test function with a simpler trigger (e.g., HTTP) to isolate the issue.

Additional Tips: