Skip to content
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

[BUG] in sample: alert #1089

Open
fr-zhangduanfang opened this issue Jun 1, 2023 · 0 comments
Open

[BUG] in sample: alert #1089

fr-zhangduanfang opened this issue Jun 1, 2023 · 0 comments

Comments

@fr-zhangduanfang
Copy link

fr-zhangduanfang commented Jun 1, 2023

Which sample has a bug?

https://github.com/firebase/functions-samples/blob/main/Node/alerts-to-discord/functions/index.js

In this demo the param (event) is a CrashlyticsEvent type, but actually it's a NewFatalIssuePayload type
image
it's shows the error when I use the const {id, title, subtitle, appVersion} = event.data.payload.issue;

after I fix it to const {id, title, subtitle, appVersion} = event.payload.issue; it successed,
But there is another problem, how can I get the appId to confirm which app has encounter the crash.

IMO, the event data should like

{
  "id": "2133",
  "source": "iOS",
  "type": "crash",
  "appId": "32444",
  "alertType":"crashlytics.newFatalIssue",
  "data": {
    "creatTime": "2023/3/22 8:00:33",
    "endTime": "2023/3/22 8:00:33",
    "payload": {
      "issue": {
        "id":"3244242",
        "title": "there is a crash",
        "subTitle": "subtitle",
        "appVersion": "3.24"
      }
    }
  }
}

but it was

{
  "data": {
    "creatTime": "2023/3/22 8:00:33",
    "endTime": "2023/3/22 8:00:33",
    "payload": {
      "issue": {
        "id":"3244242",
        "title": "there is a crash",
        "subTitle": "subtitle",
        "appVersion": "3.24"
      }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant