-
Notifications
You must be signed in to change notification settings - Fork 262
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
App crash when receiving notification #763
Comments
Hello what is your log level and visual log level? This crash seems to be coming from a memory management issue when we are trying to print to the log, but I am not sure exactly what object is being mis-managed. |
Hi, I do not set any log level so I assume it is: |
The problem is that I can not reproduce it. @emawby would it help if I set: |
It might but if we are not able to reproduce the issue it is hard to say. If you are able to reproduce it using the common memory debugging tools in Xcode would help. I apologize for not being more helpful but un-reproducable memory issues like this are difficult to track down |
I am having similar but persistent issue with the app on IOS claiming to be on line 194 of OneSignalPush.m. I'm creating an Ionic 4 app with push notification capability. This seems to work perfectly on older IOS devices, but newer ones (IOS 14+) seem to crash. The last 10 items on the crash backtrace are:
Line 5 gives us what I think is the culprit. Things I've already tried:
Nothing seems to work. I am initializing in my app.component.ts within the platform. ready function like this:
And then I'm running the init like this:
Please if anyone can be of assistance, it would be amazing, I can't even imagine what the issue could be, others don't seem to face the same issue, so it must be something stupid that I'm doing. |
Since last time, I have 20 more crashes, one has additional steps in the stack trace, maybe it helps on the track down: Thread 4 name: So this time the app crashes at |
Okay so I found the issue, so in my app initialization I used:
But the issue was actually a null string, meaning that the app was not successfully importing that variable. I fixed that by simply hardcoding the App ID in the actual OneSignalPush.m file... It's not good practice but it stops the app from crashing. |
@AhrenFullStop , These seem like separate issues, but I take it that one change resolved all of them for you? |
The bug was not related to one signal, is just the stack trace absolutely not on target. The issue was generated by attempting to read a nil object |
Description:
App crash pretty rarely, so rare I cannot reproduce it but on app store we have 10 crashes
Environment
2.Installed with CocoaPods
3.Project is in Swift
Steps to Reproduce Issue:
I am not sure, it seems, from the stack trace that it crashes when a notification is received. But it does not crash in my notification action callback or so.
Anything else:
Our project was using carthage, but when we have integrate google analytics, we moved to CocoaPods. Since then the crash started to happen.
This are the logs, with the stack trace, it seems to be crashing in OneSignalNotificationServiceExtensionHandler.m at line 104.
Incident Identifier: 7E78C42F-E991-4A90-879E-FBAF93F32B3A
Hardware Model: iPad8,5
Process: OneSignalNotificationServiceExtension [1824]
Path: /private/var/containers/Bundle/Application/3B70D76A-77E9-4BC8-9CF8-7AF65DCB2DF1/LimeLife.app/PlugIns/OneSignalNotificationServiceExtension.appex/OneSignalNotificationServiceExtension
Identifier: com.*****.OneSignal
Version: 0 (1.0.7)
AppVariant: 1:iPad8,5:13
Code Type: ARM-64 (Native)
Role: Unspecified
Parent Process: launchd [1]
Date/Time: 2020-10-06 23:30:13.8502 -0500
Launch Time: 2020-10-06 23:30:13.3520 -0500
OS Version: iPhone OS 13.7 (17H35)
Release Type: User
Baseband Version: n/a
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000020
VM Region Info: 0x20 is not in any region. Bytes before following region: 4341022688
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [1824]
Triggered by Thread: 1
Thread 1 name:
Thread 1 Crashed:
0 libobjc.A.dylib 0x00000001a066bdc0 objc_release + 16 (objc-object.h:551)
1 ...otificationServiceExtension 0x0000000102c283d0 +[OneSignalNotificationServiceExtensionHandler onNotificationReceived:] + 292 (OneSignalNotificationServiceExtensionHandler.m:104)
2 ...otificationServiceExtension 0x0000000102c27fd0 +[OneSignalNotificationServiceExtensionHandler didReceiveNotificationExtensionRequest:withMutableNotificationContent:] + 368 (OneSignalNotificationServiceExtensionHandler.m:60)
3 ...otificationServiceExtension 0x0000000102bff73c +[OneSignal didReceiveNotificationExtensionRequest:withMutableNotificationContent:] + 56 (OneSignal.m:2352)
4 ...otificationServiceExtension 0x0000000102bf2ca0 specialized NotificationService.didReceive(:withContentHandler:) + 380 (:25)
5 ...otificationServiceExtension 0x0000000102bf28c4 didReceive + 12 (:0)
6 ...otificationServiceExtension 0x0000000102bf28c4 @objc NotificationService.didReceive(:withContentHandler:) + 76
7 UserNotifications 0x00000001a7e0edf4 -[_UNNotificationServiceExtensionRemoteContext didReceiveNotificationRequest:withCompletionHandler:] + 444 (_UNNotificationServiceExtensionRemoteContext.m:53)
8 Foundation 0x00000001a0e4b894 NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S2
9 Foundation 0x00000001a0c55b00 -[NSXPCConnection _decodeAndInvokeMessageWithEvent:flags:] + 1756 (NSXPCConnection.m:655)
10 Foundation 0x00000001a0e4b9b8 message_handler + 228 (NSXPCConnection.m:734)
11 libxpc.dylib 0x00000001a0534bc0 _xpc_connection_call_event_handler + 140 (connection.c:672)
12 libxpc.dylib 0x00000001a0534f40 _xpc_connection_mach_event + 876 (connection.c:1208)
13 libdispatch.dylib 0x00000001a05dd678 _dispatch_client_callout4 + 20 (object.m:535)
14 libdispatch.dylib 0x00000001a05f43f8 _dispatch_mach_msg_invoke + 376 (mach.c:2442)
15 libdispatch.dylib 0x00000001a05e3934 _dispatch_lane_serial_drain + 264 (inline_internal.h:2525)
16 libdispatch.dylib 0x00000001a05f502c _dispatch_mach_invoke + 464 (mach.c:2764)
17 libdispatch.dylib 0x00000001a05e3934 _dispatch_lane_serial_drain + 264 (inline_internal.h:2525)
18 libdispatch.dylib 0x00000001a05e44cc _dispatch_lane_invoke + 452 (queue.c:3863)
19 libdispatch.dylib 0x00000001a05eda5c _dispatch_workloop_worker_thread + 584 (queue.c:6445)
20 libsystem_pthread.dylib 0x00000001a0643718 _pthread_wqthread + 276 (pthread.c:2352)
21 libsystem_pthread.dylib 0x00000001a06499c8 start_wqthread + 8
Thread 2 crashed with ARM Thread State (64-bit):
x0: 0x0000000100722020 x1: 0x00000001f461803d x2: 0x0000000000000006 x3: 0x000000010233d340
x4: 0x000000010233d0d0 x5: 0x0000000000000008 x6: 0x0000000000000000 x7: 0x0000000000000000
x8: 0x0000000010072af0 x9: 0x30fbd7ff5d9700b6 x10: 0x000000020000078c x11: 0x003f00010180cc00
x12: 0x00000002f3f70605 x13: 0x000001a2061649e9 x14: 0x0000000064408071 x15: 0x00000000000027b7
x16: 0x00000001b7ab9db0 x17: 0x910ffc81b7c6c74c x18: 0x0000000000000000 x19: 0x00000001007211f0
x20: 0x00000001004e9a18 x21: 0x000000010233d340 x22: 0x00000001f4d68386 x23: 0x0000000100722020
x24: 0x00000001004e8000 x25: 0x0000000100721310 x26: 0x0000000102334ae0 x27: 0x0000000000000001
x28: 0x000000010071d200 fp: 0x000000016fab5640 lr: 0x0000000100496010
sp: 0x000000016fab5600 pc: 0x00000001b7ab9dc0 cpsr: 0x60000000
esr: 0x92000006 (Data Abort) byte read Translation fault
The text was updated successfully, but these errors were encountered: