amplitude / Amplitude-Swift

Native iOS/tvOS/macOS/watchOS SDK
MIT License
26 stars 20 forks source link

watchOS 8 crash #185

Closed maximbilan closed 2 months ago

maximbilan commented 2 months ago

Description

WKExtension.applicationDidEnterBackgroundNotification can't be found in WatchKit for watchOS 8. The app crashes on loading frameworks.

Crashlog

Date/Time:           2024-06-17 15:40:38.1712 -0600
Launch Time:         2024-06-17 15:40:38.0000 -0600
OS Version:          Watch OS 8.8.1 (19U512)
Release Type:        User
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: DYLD 4 Symbol missing
Symbol not found: (_$sSo13WKApplicationC8WatchKitE30didEnterBackgroundNotificationSo18NSNotificationNameavgZ)
Expected in: '/usr/lib/swift/libswiftWatchKit.dylib'
(terminated at launch; ignore backtrace)

Triggered by Thread:  0

Thread 0 Crashed:
0   dyld                            0x00000000057c93b0 __abort_with_payload + 8
1   dyld                            0x00000000057cfef8 abort_with_payload_wrapper_internal + 100 (terminate_with_reason.c:102)
2   dyld                            0x00000000057cff28 abort_with_payload + 12 (terminate_with_reason.c:124)
3   dyld                            0x000000000578d8c8 dyld4::halt(char const*) + 592 (DyldProcessConfig.cpp:2102)
4   dyld                            0x0000000005789ef8 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3132 (dyldMain.cpp:0)
5   dyld                            0x00000000057891d0 start + 444 (dyldMain.cpp:864)

Steps to Reproduce

  1. Run the app with the integrated Amplitude-Swift SDK on watchOS 8 (hardware, not simulator)
  2. See the crash on launch

Environment

crleona commented 2 months ago

Hi @maximbilan - Is it possible you are seeing these crashes with a previous version of the SDK? We fixed a crash (see https://github.com/amplitude/Amplitude-Swift/issues/178) with the same stack trace in 1.6.1. Note that your provided stack trace and referenced symbol are different: WKExtension.applicationDidEnterBackgroundNotification vs WKApplication.didEnterBackgroundNotification.

maximbilan commented 2 months ago

Hi @maximbilan - Is it possible you are seeing these crashes with a previous version of the SDK? We fixed a crash (see #178) with the same stack trace in 1.6.1. Note that your provided stack trace and referenced symbol are different: WKExtension.applicationDidEnterBackgroundNotification vs WKApplication.didEnterBackgroundNotification.

Oh, right. Sorry for the false alert. Yeah, my crash log from the app with Amplitude SDK 1.6.0.