2

Sometimes, after the app is resumed from background it shows these messages in the log:

2022-03-23 19:16:53.423801+0000 AppName[15711:6706975] [hapi]         CHHapticEngine.mm:595   -[CHHapticEngine createHapticPlayerWithOptions:]: ERROR: Server failure: Error Domain=com.apple.CoreHaptics Code=-4810 "(null)"
2022-03-23 19:16:53.424531+0000 AppName[15711:6706975] [Feedback] failed initializing core haptics engine for <_UIFeedbackCoreHapticsEngine: 0x282e115e0>: Error Domain=com.apple.CoreHaptics Code=-4810 "(null)"

(AppName is the name of the app)

After that it fails to run code in Task - I can see in the log that the Task is called but the code in it is never executed. The app only recovers after restart.

It may be relevant that the app runs background refresh couple of times before it happens.

Thank you for any help / suggestions.

esp
  • 7,314
  • 6
  • 49
  • 79
  • Are you sure do you right implementation for haptic engine like this https://developer.apple.com/documentation/corehaptics/chhapticengine ? – eyup cimen Mar 31 '22 at 21:33
  • 1
    Thanks for looking at it! I am not using haptic engine directly, the only part of the app that seems to be using it is SwiftUI context menu that is attached to all items in the list - the issue seem to have started to happen after this context menu was added... But I couldn't find anything about this issue, maybe I should submit it to apple. – esp Apr 01 '22 at 10:29
  • Did you every find a solution to this? It has started happening in my app with 16.4.1 and I’m losing my mind over task not executing. (And also this haptics error) – orion Apr 10 '23 at 02:43
  • not really, but it seems to not happen as often – something's changed it... – esp Apr 12 '23 at 18:53
  • But I need to upgrade to 16.4.1 actually... – esp Apr 12 '23 at 18:54

0 Answers0