Repository navigation
Description
Please check the following before submitting a new issue.
- I have searched the existing issues.
- I have carefully read the documentation and verified I have added the required platform specific configuration.
Please select affected platform(s)
- Android
- iOS
- Windows
Steps to reproduce
Unable to reproduce, the key symbolized content of the crash log is as follows.
AppVariant: 1:iPhone17,2:18
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Date/Time: 2024-12-10 13:28:19.5592 +0800
Launch Time: 2024-12-10 09:02:50.4790 +0800
OS Version: iPhone OS 18.1 (22B82)
Release Type: User
Baseband Version: 1.11.01
Report Version: 104
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: FRONTBOARD 2343432205
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-update watchdog transgression: app:431 exhausted real (wall clock) time allowance of 10.00 seconds
ProcessVisibility: Foreground
ProcessState: Running
WatchdogEvent: scene-update
WatchdogVisibility: Background
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 15.330 (user 8.230, system 7.100), 26% CPU",
"Elapsed application CPU time (seconds): 1.693, 3% CPU"
) reportType:CrashLog maxTerminationResistance:Interactive>
+[NotificationPermissionStrategy permissionStatus] (in Runner) (NotificationPermissionStrategy.m:81)
+[PermissionManager checkPermissionStatus:result:] (in Runner) (PermissionManager.m:23)
-[PermissionHandlerPlugin handleMethodCall:result:] (in Runner) (PermissionHandlerPlugin.m:0)
Expected results
none
Actual results
none
Code sample
Code sample
Screenshots or video
Screenshots or video demonstration
[Upload media here]
none
Version
11.3.1
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.27.0, on macOS 15.1 24B83 darwin-arm64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google
Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2023.3)
[✓] VS Code (version 1.89.1)
[✓] Connected device (2 available)
Activity
b4kup commentedon Sep 29, 2026
We're hitting this in production too. Mostly it shows up as Sentry "App Hanging ≥ 2000 ms" on cold start, and occasionally as a watchdog kill like the one reported here.
Versions: permission_handler 12.0.1 / permission_handler_apple 9.4.7, Flutter 3.44.0, iOS 26.x and 27.x, all device classes.
NotificationPermissionStrategy.permissionStatusis unchanged onmain(9.6.2), so the latest release has the same behaviour.Main thread (symbolicated):
What we observe:
UNUserNotificationCenterat the same time._dispatch_sync_f_slow→_dispatch_thread_main_event_wait_slowat the same moment, i.e. adispatch_synconto main from a third-party SDK. If that work is on the path that delivers thegetNotificationSettingscallback, the semaphore wait on main becomes a lock-order inversion. This is the same pattern as Launch deadlock: getDeviceCountry() does DispatchQueue.main.sync from the getNotificationSettings callback (iOS SDK 5.102) dengage-tech/dengage-ios-sdk#24.dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER)on the platform thread means any delay in the settings callback freezes the UI.CriticalAlertsPermissionStrategy.permissionStatususes the identical pattern.Proposed fix, mirroring what #1100 did for
checkServiceStatus:checkPermissionStatus:completionHandler:toPermissionStrategy, so all other strategies keep their sync path.+[PermissionManager checkPermissionStatus:result:], use it when the strategy responds to the selector, and callresultfrom the completion handler after hopping to main viadispatch_async.NotificationPermissionStrategyandCriticalAlertsPermissionStrategydirectly on top ofgetNotificationSettingsWithCompletionHandler, without a semaphore, and use the same async check in theirrequestPermissioninstead of the sync status call.Happy to open a PR for this if the approach sounds good.
fix(ios): read notification permission status without blocking the ma…