Skip to content

TypeError when using python Crashlytics triggers #148

Closed
@blidd-google

Description

@blidd-google

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions