Skip to content

Firebase Emulator: Getting a 415 when sending a FireAlert #7998

@JoseGeorges8

Description

@JoseGeorges8

Environment info

Using Python.

firebase-tools: 13.27.0

Platform: macOS

Test case

from firebase_functions.alerts import crashlytics_fn
from firebase_admin import initialize_app

initialize_app()

'''
A Cloud Function that gets triggered whenever a NonFatal Issue is published
'''
@crashlytics_fn.on_new_nonfatal_issue_published(secrets=[])
def post_nonfatal_issue(event: crashlytics_fn.CrashlyticsNewFatalIssueEvent) -> None:
    '''Deal with the issue here'''

Steps to reproduce

  1. Run firebase emulators:start
  2. Go into the Firebase Emulator Suite
  3. Send a FireAlert message for CrashlyticsNewFatalIssueEvent

Expected behavior

Function executes successfully with a 200

Actual behavior

Function terminates immediately with a 415:

i  functions: Beginning execution of "us-central1-post_nonfatal_issue"
i  functions: Finished "us-central1-post_nonfatal_issue" in 6.725173ms
i  Failed to trigger Functions emulator for us-central1-post_nonfatal_issue-0: FirebaseError: Received non-200 status code: 415

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions