Repository navigation
feat(diagnostics): crash and startup reports from snapshot builds - #620
Merged
Merged
Conversation
5 tasks done
Codecov Report❌ Patch coverage is ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
whes1015
force-pushed
the
feat/prerelease-diagnostics
branch
from
October 16, 2026 18:19
97189e2 to
08078a5
Compare
This was referenced Oct 16, 2026
whes1015
added this pull request to stack #626
October 16, 2026 19:21
whes1015
force-pushed
the
feat/prerelease-diagnostics
branch
from
October 16, 2026 19:31
08078a5 to
5275159
Compare
Member
Author
whes1015
force-pushed
the
feat/prerelease-diagnostics
branch
from
October 16, 2026 19:37
5275159 to
4fbc054
Compare
Member
Author
whes1015
force-pushed
the
feat/prerelease-diagnostics
branch
from
October 16, 2026 19:44
4fbc054 to
4d77652
Compare
whes1015
force-pushed
the
feat/prerelease-diagnostics
branch
from
October 16, 2026 19:48
4d77652 to
76105f1
Compare
Platform: all New(zh-Hant): 測試版會自動把錯誤回報給開發團隊,正式版不會傳送任何錯誤報告 New(en-US): snapshot builds report errors to the developers automatically; release builds send no error reports
Platform: all New(zh-Hant): 測試版會回報啟動速度與地圖畫面的流暢度,協助改善低階手機的效能 New(en-US): snapshot builds report launch time and map smoothness, to help speed the app up on low-end phones
whes1015
force-pushed
the
feat/prerelease-diagnostics
branch
from
October 16, 2026 19:53
76105f1 to
4906aff
Compare
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
這個 PR 做了什麼
目前只看得到自己手上那幾支手機的問題:
CrashSink只有介面沒有實作,啟動時間只寫進裝置 log,iOS 推播有沒有送到也無從得知。這個 PR 加上只在 snapshot(預覽版)建置啟用的診斷:當機回報、啟動與畫格時間摘要,以及 iOS 推播送達紀錄。正式版不收集任何資料。改動內容
正式程式碼
5d4cee03snapshot 建置回報當機firebase_crashlytics: 5.2.4(固定版本)。這是和firebase_core4.11.0 同一批釋出的版本,已從 pub cache 確認 podspec、Package.swift、Gradle 都不會提高最低版本:iOS 15.0、Android minSdk 23、firebase-ios-sdk 12.15.0、Android BoM 34.15.0 都相同。之後的 5.2.x 都需要更新的firebase_core。release.yml標上--dart-define=DPIP_PRERELEASE=true的 release 建置(只有 snapshot)。其他一律視為正式版,包括沒有標記的 release 建置,所以漏標時是安全的。prerelease輸出原本就存在於release.yml,這裡只是傳下去。Log的內容不會送出,因為有些含座標。res/values/crashlytics.xml關掉 build-ID 檢查;release 的資源壓縮會刪掉這個設定,所以也列進res/raw/keep.xml(要用底線拼法,點號拼法不會命中)。426a39f1snapshot 建置回報啟動時間摘要StartupPerformanceReport,數字放在 custom key;少於 60 格不送,debug 建置不送。4906aff1iOS 用 Notification Service Extension 記錄推播送達ios/NotificationServicetarget:每則推播寫一行(id、頻道、APNs id,不含標題和內容)到既有的 app-group log ring;app 啟動時本來就會把這個 ring 匯入 app 內 log,所以 Dart 端不用改。com.exptech.dpip.dpip.NotificationService、team 98Q7JARYZF、iOS 15.0、app-group entitlement、嵌入 Runner。aps要帶mutable-content: 1擴充才會執行;這部分在後端另外處理。測試
相關 issue
沒有對應的 issue。
怎麼驗
tool/commit.sh --push通過(analyze、codegen、全部 Dart 測試)。tool/dev/test_ios.sh通過,包含 6 個新測試;xcodebuild -list看得到新 target;未簽章的 release 建置(tool/dev/build.sh ios)裡有NotificationService.appex,版本和 app 一致。StartupPerformanceReport)已經出現在專案的 Crashlytics。com.exptech.dpip.dpip.NotificationService,開啟 App Groups 並加入group.com.exptech.dpip.dpip.widgets。用 API key 自動簽章可能會自己建立,但 PR 的 iOS CI 不簽章,第一次跑release.yml前不會有任何檢查。GET /api/v2/notify/{token},伺服器沒有這個 token 紀錄時回 401,但無法判斷 token 在 Apple/Google 端是否仍有效,也無法確認推播真的送達。檢查清單
tool/check/commits.sh通過tool/commit.sh --push)