Notification Service Extension didn't work correctly

Hello all. I face problem with Notification Service Extension. User mobile receive notification without any problem, payload contain mutable-content:1 inside it ( also, full example of payload is attached ), but, NSE didn't run correctly, also, original content of notification didn't saw ( in case, and there is a crash because of something wrong in app ) I checked device logs, and I see next errors:

[*] Mutated notification request is nil, will supress original content; notificationRequest=7019-8D60, error=Error Domain=NSCocoaErrorDomain Code=4097 "connection from pid 487 on anonymousListener or serviceListener" UserInfo={NSDebugDescription=connection from pid 487 on anonymousListener or serviceListener}, runtime: 0.410339
[*.notificationextension] Service extension connection encountered an error: sessionUUID=88D39801-67DF-4DC7-AA70-2AD7E8634369, error=Error Domain=NSCocoaErrorDomain Code=4099 "The connection from pid 505 on anonymousListener or serviceListener was invalidated: client is gone." UserInfo={NSDebugDescription=The connection from pid 505 on anonymousListener or serviceListener was invalidated: client is gone.}

example of payload:

"aps": {
    alert =     {
        "loc-args" =         (
            msisdn
        );
        "loc-key" = "key";
    };
    badge = 1;
    "content-available" = 1;
    "mutable-content" = 1;
    sound = "pnsound.aiff";
}, "m": CFG, "j": msisdn, "t": id, "n": M]

This problem is face from time to time, I can't catch this problem on same build and same environment, also, this problem can occur for some time, and after that everything will be fine

Replies

Also, in device logs, after extension is started, I see this error: Could not read values in CFPrefsPlistSource<address> (Domain:group.domain) User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents need refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for system containers. detaching from cfprefsd

Today, I found one more error in device logs, can it be related with problem?

Requestor: TCCDProcess: identifier=com.apple.nsurlsessiond, pid=109, auid=501, euid=501, binary_path=/usr/libexec/nsurlsessiond is not entitled to check access for accessor TCCDProcess: identifier=*.notificationextension, pid=6292, auid=501, euid=501, binary_path=/private/var/containers/Bundle/Application/8D9CB575-1B13-46F7-B4B2-803EC4A969AC/*.app/PlugIns/*.appex/NSE

Problem was in crash because of memory limit for NSE I thought that if it crashed because of memory, I will see crash report on "Device Crashes" tab, but there was no crashes related to memory. After I check device logs thought Console , I found limit about memory

EXC_RESOURCE -> `ProcessName`[8554] exceeded mem limit: ActiveHard 24 MB (fatal)
  • I'm getting same error. That's why some users won't receive notifications. In some users device fix this issue when cold restarting device. I think this is not a solution. Did you find solution?

Add a Comment