Skip to content

TypeError when using python Crashlytics triggers #148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
blidd-google opened this issue Oct 10, 2023 · 0 comments · Fixed by #149
Closed

TypeError when using python Crashlytics triggers #148

blidd-google opened this issue Oct 10, 2023 · 0 comments · Fixed by #149

Comments

@blidd-google
Copy link
Collaborator

A customer is reporting a TypeError when attempting to use Crashlytics functions.

Reproduction Steps

# Welcome to Cloud Functions for Firebase for Python!
# To get started, simply uncomment the below code or create your own.
# Deploy with `firebase deploy`

from firebase_functions import https_fn
from firebase_functions.options import set_global_options
from firebase_functions import options
from firebase_admin import initialize_app

initialize_app()
set_global_options(cpu="gcf_gen1",max_instances=10)

# @https_fn.on_request()
# def on_request_example(req: https_fn.Request) -> https_fn.Response:
#     return https_fn.Response("Hello world!")


from firebase_functions.alerts import (
    crashlytics_fn,
)


@crashlytics_fn.on_regression_alert_published(memory=options.MemoryOption.MB_128,max_instances=100)
def example_regression(alert: crashlytics_fn.CrashlyticsRegressionAlertEvent) -> None:
    print(alert)


@crashlytics_fn.on_stability_digest_published(memory=options.MemoryOption.MB_128,max_instances=100)
def example_stability(alert: crashlytics_fn.CrashlyticsStabilityDigestEvent) -> None:
    print(alert)


@crashlytics_fn.on_velocity_alert_published(memory=options.MemoryOption.MB_128,max_instances=100)
def example_velocity(alert: crashlytics_fn.CrashlyticsVelocityAlertEvent) -> None:
    print(alert)

Error

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant