Debugging

RSS for tag

Discover and resolve issues with your app.

Posts under Debugging tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Is there a trick to viewing an EnvironmentObject in Xcode debugger? They currently show up as invalid Expression.
I am trying to watch an @EnvironmentObject in the Xcode debugger and it comes up as an Invalid Expression in the View pane. If I want to view it, I need to declare it as a local variable and then assign it the value of the passed in @EnvironmentObject. While not impossible, it's a lot of work. Or maybe I am doing something incorrectly and this is a symptom of that? Would like to resolve this. encl: Example code & Screenshot, where choice is the passed/unviewable EnviornmentObject and ch is the local variable I use to view it in the debugger Project "TestingApp" File: TestingApp import SwiftUI @main struct TestingApp: App { @StateObject private var choice = Choices() var body: some Scene { WindowGroup { ContentView() .environmentObject(choice) } } } File: Choices import Foundation @MainActor class Choices: ObservableObject { @Published var aChoice = 1 @Published var bChoice = 2 } File: ContentView import SwiftUI struct ContentView: View { @EnvironmentObject private var choice: Choices var body: some View { VStack { let ch = choice Text("\(choice.aChoice)") .font(.largeTitle) .padding(.bottom) Text("2") .font(.largeTitle) } .padding() } } #Preview { ContentView() }
0
0
287
Mar ’24
Xcode crashing on second run
Hey everybody. I have a weird issue where I run my code with no issues. Then I run my code again, and Xcode crashes, without fail, every single time. Anyone have a similar issue? Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6 Terminating Process: Xcode [32564] Application Specific Information: abort() called Application Specific Signatures: NSInvalidArgumentException
4
1
512
Mar ’24
Invalid MinimumOSVersion
Asset validation failed Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in 'MyApp.app/Frameworks/abseil.framework' is ''. (ID: 976fe056-e7a1-4d39-bacb-df90b8efea9b) Asset validation failed Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in 'MyApp.app/Frameworks/BoringSSL-GRPC.framework' is ''. (ID: c68c6576-9c7d-4b4f-8562-348578079194) Asset validation failed Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in 'MyApp.app/Frameworks/FirebaseAnalytics.framework' is ''. (ID: 098dcfe7-c07f-47e8-b9fa-ad081a0f45a6) Asset validation failed Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in 'MyApp.app/Frameworks/FirebaseFirestore.framework' is ''. (ID: 814fbcf1-cb95-4775-b394-f9d150f577cb) Asset validation failed Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in 'MyApp.app/Frameworks/GoogleAppMeasurement.framework' is ''. (ID: 288331b7-ad05-45e9-8989-4668645f9723) Asset validation failed Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in 'MyApp.app/Frameworks/GoogleAppMeasurementIdentitySupport.framework' is ''. (ID: 83aba61f-862e-400d-a67f-6afd021bd1d2) Asset validation failed Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in 'MyApp.app/Frameworks/gRPC-C++.framework' is ''. (ID: e8494bc6-78bf-496c-bc26-c71e9cb771b2) Asset validation failed Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in 'MyApp.app/Frameworks/gRPC-Core.framework' is ''. (ID: c91250c0-c445-483a-a0e3-6e5b4b01197f) Asset validation failed Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle MyApp.app/Frameworks/abseil.framework is required. (ID: f5adb088-e079-4df9-95ed-107fe244ee33) Asset validation failed Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle MyApp.app/Frameworks/BoringSSL-GRPC.framework is required. (ID: 7e8def5b-283f-4ef7-9d17-562cf4fa0e54) Asset validation failed Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle MyApp.app/Frameworks/FirebaseAnalytics.framework is required. (ID: 39ebde66-fbfc-496c-83f5-92e81b057930) Asset validation failed Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle MyApp.app/Frameworks/FirebaseFirestore.framework is required. (ID: 4f34e998-9151-40d4-9b85-7942076f01ff) Asset validation failed Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle MyApp.app/Frameworks/GoogleAppMeasurement.framework is required. (ID: 6ca3ba96-85df-4cd6-bcb9-4ca0d1faffe5) Asset validation failed Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle MyApp.app/Frameworks/GoogleAppMeasurementIdentitySupport.framework is required. (ID: 6cb9b76b-653a-494b-97b8-88702c6fbee8) Asset validation failed Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle MyApp.app/Frameworks/gRPC-C++.framework is required. (ID: 7a37ef2b-55a9-446a-9eaa-3ffccee0e99b) Asset validation failed Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle MyApp.app/Frameworks/gRPC-Core.framework is required. (ID: a9b0eb06-2cf3-4265-87f4-997b7926e8a8) Asset validation failed The bundle 'Payload/MyApp.app/Frameworks/abseil.framework' is missing plist key. The Info.plist file is missing the required key: CFBundleShortVersionString. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring (ID: f7116884-2736-47e3-8c1a-942572fa6a97) Asset validation failed The bundle 'Payload/MyApp.app/Frameworks/BoringSSL-GRPC.framework' is missing plist key. The Info.plist file is missing the required key: CFBundleShortVersionString. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring (ID: 2faae9e4-78af-4437-8830-b778d4059489) Asset validation failed The bundle 'Payload/MyApp.app/Frameworks/FirebaseAnalytics.framework' is missing plist key. The Info.plist file is missing the required key: CFBundleShortVersionString. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring (ID: 4b53026c-c01c-43a3-ada0-a23340b40844) Asset validation failed The bundle 'Payload/MyApp.app/Frameworks/FirebaseFirestore.framework' is missing plist key. The Info.plist file is missing the required key: CFBundleShortVersionString. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring (ID: 995291aa-028e-432d-b9f9-422398739388) Asset validation failed The bundle 'Payload/MyApp.app/Frameworks/GoogleAppMeasurement.framework' is missing plist key. The Info.plist file is missing the required key: CFBundleShortVersionString. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring (ID: a5e7337e-4504-4119-be9a-b372efa0a95d) Asset validation failed The bundle 'Payload/MyApp.app/Frameworks/GoogleAppMeasurementIdentitySupport.framework' is missing plist key. The Info.plist file is missing the required key: CFBundleShortVersionString. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring (ID: 1ce00379-9d3c-442d-8959-8d400ae22137)
6
1
3.2k
Mar ’24
The operation couldn’t be completed. (NSURLErrorDomain error -1011.)
I'm using Firebase Auth and Firestore on my app. When I already signed in, my code in init() function workes fine and my screens automatically updated when data load. But when I first sign in, I get The operation couldn’t be completed. (NSURLErrorDomain error -1011.) error and the rest of the code dont work as it should be. What is the issue and how can I solve it?
1
0
657
Mar ’24
Debugging Big Sur kernel on inter-based macbook from Monterey on m1
HI devs, help me please, i want to debug Big Sur kernel on inter-based macbook from Monterey on m1, i have installed KDK_11.6.4_20G417.kdk in Monterey system on m1 macmini, then launch lldb, have created target and got this message : WARNING! Python version 3 is not supported for xnu lldbmacros. (lldb) target create /Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel warning: 'kernel' contains a debug script. To run this script in this debug session:   command script import "/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/kernel.py" To run all discovered debug scripts in this session:   settings set target.load-script-from-symbol-file true Current executable set to '/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel' (x86_64). (lldb) settings set target.load-script-from-symbol-file true ############################## WARNING! Python version 3 is not supported for xnu lldbmacros. Please restart your debugging session with the following workaround defaults write com.apple.dt.lldb DefaultPythonVersion 2 ############################## Loading kernel debugging from /Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/kernel.py LLDB version lldb-1300.0.42.3 Swift version 5.5.2-dev settings set target.process.python-os-plugin-path "/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/lldbmacros/core/operating_system.py" settings set target.trap-handler-names hndl_allintrs hndl_alltraps trap_from_kernel hndl_double_fault hndl_machine_check _fleh_prefabt _ExceptionVectorsBase _ExceptionVectorsTable _fleh_undef _fleh_dataabt _fleh_irq _fleh_decirq _fleh_fiq_generic _fleh_dec command script import "/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/lldbmacros/xnu.py" error: module importing failed: Traceback (most recent call last):  File "<string>", line 1, in <module>  File "/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/lldbmacros/xnu.py", line 123   print "Execution interrupted by user"      ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Execution interrupted by user")? settings set target.process.optimization-warnings false How can i solve this problem? lldb linked with python 3, but kdk uses python 2, also command line tools version 12.5.1 which uses python 2 i can not install on monterey too.
4
0
2.3k
Mar ’24
iCloud Password Manager for associated domains broken in iOS 17.4
I’m looking to see if anybody else has noticed that iOS 17.4 seems to have broken password autofill for associated domains. Meaning if I open my app to the login page (web view) it recognizes the associated domains and they password in my keychain. If I tap on my user name my keychain is unlocked with biometrics (FaceID) and I’m returned to the page, but the user name and password field is not filed in. This just started happening in iOS 17.4 (17.3.1 works fine for example). Interestingly, if you choose the 🔑 icon on the right side of the keyboard and then choose your credentials you get a blank page until you tap in a text field then the username and password show up. I have filled out a bug report with Apple, but in the mean time I was curious if anybody else has seen this or have a solution.
3
0
648
Mar ’24
App Only Crashes on Launch in iOS 17.4 for Production Version
Hello, I'm encountering an issue where my released app fails to launch only on iOS 17.4. The version of the app released through TestFlight works fine without any issues. Specifically, when the app installed from the App Store is launched on iOS 17.4, it immediately crashes. However, I've noticed the following: If I turn off the network connection, such as putting the device in Airplane Mode, the app launches successfully. Once the app is launched, I can re-enable the network connection, and the app continues to run without crashing. My app uses StoreKit2 for handling transactions and connections with the App Store. It initiates a connection to the App Store via StoreKit2 at launch. The primary difference between the TestFlight version and the production version is the App Store endpoint they connect to. This leads me to suspect that there might be an issue with the connection to the App Store. (Another possibility is that the app communicates with Firebase or Google Admob, so there could be an issue with these SDKs as well.) This issue only occurs in the production version, making it difficult to investigate. Are there any suggestions on what I can do to further diagnose this issue? You can download my app from here: https://apps.apple.com/us/app/repeatable-player-cut-loop/id616310281 I can provide the TestFlight URL if needed. Any help or guidance would be greatly appreciated.
1
1
2.3k
Mar ’24
domToImage JS library not working well on iPhone and Mac
I have a problem with the JS library 'dom-to-image', This JavaScript library converts a div to an image, but it's not working well on iPhone and Mac devices. Sometimes it doesn't work at all, and other times I need to download the image multiple times for it to work. I understand that Mac/iPhone devices have different rendering logic, but is there a way to check what the problem is and how to fix it? I tried dom-to-image-more and some delay but still not working. Thank you!
0
0
405
Mar ’24
visionOS WKWebView FullScreen bug
I am having a problem when trying to implement a WKWebView in a window in VisionOS and that when trying to do it in full screen and exiting full screen, the size of the webview changes, becoming smaller or larger while the window remains the same size as before. I used webView.configuration.preferences.isElementFullscreenEnabled = true for enabling fullscreen mode. I made a simple code to test this. import SwiftUI @main struct TestApp: App { var body: some Scene { WindowGroup() { ContentView() } } } import SwiftUI import WebKit struct WebView: UIViewRepresentable { let url: URL func makeUIView(context: Context) -&gt; WKWebView { let wkwebView = WKWebView() wkwebView.configuration.preferences.isElementFullscreenEnabled = true let request = URLRequest(url: url) wkwebView.load(request) return wkwebView } func updateUIView(_ uiView: WKWebView, context: Context) { } } struct ContentView: View { var body: some View { WebView(url: URL(string: "https://glitch.com/~fullscreen-test")!) } }
2
0
786
Mar ’24
ios 17 background crash after receiving notification
Hi, When our app receive a push notification in killed state (background), it will crash a few seconds after the first time notification banner was shown, and it happened only on ios 17. From the crash log, It should be a watchdog terminations problem based on https://developer.apple.com/documentation/xcode/identifying-the-cause-of-common-crashes, which might caused by unresponsive UI or network call. Our app use a hybrid framework React Native, and use a few notification handler, such as local notification, remote notification using firebase, and third party marketing tools library. I am fairly new to ios debugging, can someone help me identifying the crash source of attached log? Does it crash because it tries to open the app in the background? Or there are some network call from third party lib? Does the error happen in native obj c layer, or it already reached the javascript layer of React?The last line of thread 0 where the crash happened was: "dyld 0x1d4acedcc start + 2240m". From what I gathered, dyld itself is a dynamic framework linking process in runtime, does it mean it crash because it failed to link a framework? Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: FRONTBOARD 2343432205 <RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-create watchdog transgression: app<com.bcad.blu.uat(EABDB60C-B43B-40F0-B9B8-EEA50D7818DA)>:1029 exhausted CPU time allowance of 9.52 seconds ProcessVisibility: Background ProcessState: Running WatchdogEvent: scene-create WatchdogVisibility: Background WatchdogCPUStatistics: ( "Elapsed total CPU time (seconds): 14.150 (user 10.740, system 3.410), 38% CPU", "Elapsed application CPU time (seconds): 9.818, 27% CPU" ) reportType:CrashLog maxTerminationResistance:Interactive> Triggered by Thread: 0 Kernel Triage: VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter crash-2024-03-04-212235.log
3
0
645
Mar ’24
CommonCrypto swift module error in App
I'm working on an app that uses CommonCrypto. The app works perfectly well in my own computer, but when using the very same exe build in another computer it "quit unexpectedly". Suspecting that the issue could be on the said module, I commented out the few lines that requires the module and problem solved!. Now, as I need to use the module at the very beginning of the app, to perform certain security operations, I'm wondering what could I do to assure the module is included in the build, so the app may work in any other computer as well. This sounds weird, because I would had assumed either that the module was to be included in the build or if not, an error claiming the lack of it should have been produced. (within Xcode) what setting should I change when build the app for use in other computers, so to assure the operations that requires this module can be completed? Although this may not be relevant, I'm using swift 5, Xcode 15 (latest versions) and Sonoma 14.2.1
5
0
448
Mar ’24
This neural network model does not have a parameter for requested key 'precisionRecallCurves'
Hello I am making a rock paper scissors game using object detection with a model I made using create ml and a dataset I found online. The trained model works and I tried to implement it into Xcode but when I run my app I get this error This neural network model does not have a parameter for requested key 'precisionRecallCurves'. Note: only updatable neural network models can provide parameter values and these values are only accessible in the context of an MLUpdateTask completion or progress handler. I am still new to create ml and I cannot seem to find anything about making my model updatable in create ml.
1
3
650
Mar ’24
系统键盘崩溃
Thread 0 Crashed: 20 libsystem_kernel.dylib 0x00000001f58df4c4 __abort_with_payload + [ : 8] 31 libsystem_kernel.dylib 0x00000001f5901bf0 abort_with_payload_wrapper_internal + [ : 104] 42 libsystem_kernel.dylib 0x00000001f5901b88 abort_with_payload_wrapper_internal 53 libobjc.A.dylib 0x00000001b0f6fa5c _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + [ : 116] 64 libobjc.A.dylib 0x00000001b0f6f9e8 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) 75 libobjc.A.dylib 0x00000001b0f42c24 weak_register_no_lock + [ : 392] 86 libobjc.A.dylib 0x00000001b0f485b0 objc_initWeak + [ : 436] 97 UIKitCore 0x00000001ba0fcde0 -[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:] + [ : 776] 108 UIKitCore 0x00000001b9fa5094 -[UIView(Internal) _didMoveFromWindow:toWindow:] + [ : 1232] 119 UIKitCore 0x00000001ba05b350 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + [ : 112] 1210 CoreAutoLayout 0x00000001d4838e90 -[NSISEngine withBehaviors:performModifications:] + [ : 84] 1311 UIKitCore 0x00000001bafc7d40 -[UIView _postMovedFromSuperview:] + [ : 672] 1412 UIKitCore 0x00000001b9fa5fec -[UIView(Internal) _addSubview:positioned:relativeTo:] + [ : 1904] 1513 UIKitCore 0x00000001ba48d8e0 -[_UIKBCompatInputView addSubview:] + [ : 52] 1614 UIKitCore 0x00000001ba36d718 -[UICompatibilityInputViewController setInputMode:] + [ : 1028] 1715 UIKitCore 0x00000001ba48e528 -[UICompatibilityInputViewController shouldUpdateInputMode:] + [ : 228] 1816 CoreFoundation 0x00000001b7dea3b4 CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + [ : 148] 28 UIKitCore 0x00000001ba493f08 -[UIKeyboardTaskQueue performSingleTask:] + [ : 96] 3129 UIKitCore 0x00000001bab129e0 -[UIKeyboardImpl setInputMode:userInitiated:] + [ : 328] 3230 UIKitCore 0x00000001ba9dc758 -[UIKeyboardInputModeController _setCurrentInputMode:force:] + [ : 240] 3331 UIKitCore 0x00000001ba9e0304 -[UIKeyboardInputModeController switchToCurrentSystemInputMode] + [ : 52] 3432 UIKitCore 0x00000001baa020a8 -[UICompatibilityInputViewController resetInputModeInMainThread] + [ : 156] 3533 libdispatch.dylib 0x00000001bf3d3460 _dispatch_call_block_and_release + [ : 32] 3634 libdispatch.dylib 0x00000001bf3d4f88 _dispatch_client_callout + [ : 20] 3735 libdispatch.dylib 0x00000001bf3e37f4 _dispatch_main_queue_drain + [ : 928] 3836 libdispatch.dylib 0x00000001bf3e3444 _dispatch_main_queue_callback_4CF + [ : 44] 3937 CoreFoundation 0x00000001b7e4d6c8 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + [ : 16] 4038 CoreFoundation 0x00000001b7e2f02c __CFRunLoopRun + [ : 2036] 4139 CoreFoundation 0x00000001b7e33eb0 CFRunLoopRunSpecific + [ : 612] 4240 GraphicsServices 0x00000001f2029368 GSEventRunModal + [ : 164] 4341 UIKitCore 0x00000001ba329668 -[UIApplication _run] + [ : 888] 4442 UIKitCore 0x00000001ba3292cc UIApplicationMain + [ : 340] 4543 KYE_iOS 0x0000000104474848 0x1043e0000 + 608328 4644 (null) 0x00000001d672c960 0x0 + 7892814176
0
0
189
Mar ’24
Crash in background for iOS 17.3.0 and later devices
We found crash reports from Xcode organizer about some crashes happening only in iOS and iPadOS version 17.3.0 and later across all our releases mostly in background state related to Network SDK. Unfortunately, we are unable to reproduce the issue. On the crashed thread, it seems to refer to process from Network SDK but we never import and use it directly in our project. Most of the functions found in the main thread in the crash report can't be accessed from the project, it seems to be internal framework calls in iOS SDK. The crash pointing to this line of code: nw_protocol_error Bug number: FB13661192 Somehow I cannot attach any crash report here, it always return error This post contains sensitive language. Please revise it in order to continue. whenever I try to submit it. If I remove it, I can submit the post.
4
0
566
Mar ’24
SIGABRT error in Xcode just by cloning a repo for an App
I have a Swift-SwiftUI app for MacOS that runs perfectly well (meaning no errors whatsoever) on an Intel MacBook Pro (16 GB ram) but crashed immediately when trying to run on an ARM MacBook Air (8 GB ram). The error in the app is SIGTRAP (Name space Signal, Code 5 Trace/BPT trap 5 (Terminating process exc handler 1496. Although the exe was build on the intel Mac, but for both platforms (Intel &amp; ARM) seeking to troubleshoot this issue, I tried to clone the app to further debug it using Xcode within the ARM platform, just to get into a bigger issue: As soon as the app is cloned and read, Xcode crashes with error SIGABRT (Name space Signal, Code 6 Trace/BPT trap 6 (Terminating process exc handler 1006). That happens just by attempt to load the source code of the app within Xcode, which surprises me a lot. Xcode Version on the ARM 15.0.1 (15A507) Xcode Version on the Intel 15.2 (15C500b) OS on the ARM Sonoma 14.2 OS on the Intel Sonoma 14.2.1 As this App is intended to run MacOS 12 and above, I discarded the tiny difference between OS. As to Xcode, it confuses me, as in my view, it shouldn't crash at least before the time of building the exe file... Any help to troubleshoot this will be very much appreciated! Attached: Xcode "quit unexpectedly" crash log Xcode_Cred_Log.txt
3
0
410
Feb ’24