Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Fatal Exception: NSInvalidArgumentException #100

Open
otopba opened this issue Dec 11, 2021 · 6 comments
Open

Fatal Exception: NSInvalidArgumentException #100

otopba opened this issue Dec 11, 2021 · 6 comments

Comments

@otopba
Copy link

otopba commented Dec 11, 2021

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x9905c __exceptionPreprocess
1  libobjc.A.dylib                0x15f54 objc_exception_throw
2  CoreFoundation                 0x17601c +[NSObject(NSObject) _copyDescription]
3  CoreFoundation                 0x2e484 ___forwarding___
4  CoreFoundation                 0x2d5c0 _CF_forwarding_prep_0
5  YandexMobileMetrica            0x27618 (Missing)
6  YandexMobileMetrica            0xb214c (Missing)
7  YandexMobileMetrica            0xa1498 (Missing)
8  libdispatch.dylib              0x1c04 _dispatch_call_block_and_release
9  libdispatch.dylib              0x3950 _dispatch_client_callout
10 libdispatch.dylib              0xb0ac _dispatch_lane_serial_drain
11 libdispatch.dylib              0xbc10 _dispatch_lane_invoke
12 libdispatch.dylib              0x16318 _dispatch_workloop_worker_thread
13 libsystem_pthread.dylib        0x11b0 _pthread_wqthread
14 libsystem_pthread.dylib        0xf50 start_wqthread

I use sdk v4.0

@ghost
Copy link

ghost commented Dec 11, 2021 via email

@eugrdn
Copy link

eugrdn commented Jan 10, 2022

Hey!
Is there any updates on this issue?

@GLinnik21
Copy link
Contributor

Hi! Do you know any steps how to reproduce this bug or maybe a full crashlog?

@eugrdn
Copy link

eugrdn commented Jan 10, 2022

Yes
In my example I've just added the package (tried both v3 and v4) via SPM into the SwiftUI project
After I initialise SDK at
application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) method every time I try to preview any view in canvas the project crashes with the following stacktrace

CrashReportError: TestAppDev6 crashed due to an uncaught exception

TestAppDev6 crashed due to an uncaught exception `NSInvalidArgumentException`. Reason: *** -[NSFileManager contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:]: URL is nil.

Process: TestAppDev6[58486]
Date/Time: 2022-01-10 12:21:41 +0000
Log File: <none>

Application Specific Information:
     [
        dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/user/Library/Developer/Xcode/DerivedData/TestApp-czwxhgpanlnvmeakblahsozpjmly/Build/Intermediates.noindex/Previews/TestAppDev6/Products/Debug-iphonesimulator DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot//System/Library/PrivateFrameworks/PreviewsInjection.framework/PreviewsInjection DYLD_FRAMEWORK_PATH=/Users/user/Library/Developer/Xcode/DerivedData/TestApp-czwxhgpanlnvmeakblahsozpjmly/Build/Intermediates.noindex/Previews/TestAppDev6/Products/Debug-iphonesimulator 
        *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSFileManager contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:]: URL is nil'
        terminating with uncaught exception of type NSException
        abort() called
        CoreSimulator 783.5 - Device: iPhone 13 (********-****-****-****-************) - Runtime: iOS 15.2 (19C51) - DeviceType: iPhone 13
        
    ]

==================================

|  MessageSendFailure: Message send failure for update
|  
|  ==================================
|  
|  |  MessageError: Connection interrupted
Application Specific Backtrace 1:
0   CoreFoundation                      0x00007fff203feba4 __exceptionPreprocess + 242
1   libobjc.A.dylib                     0x00007fff201a1be7 objc_exception_throw + 48
2   Foundation                          0x00007fff2075bfb8 -[NSFileManager contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:] + 1266
3   YandexMobileMetrica                 0x000000010a920076 +[YMMFileUtility sortedByDateContentOfDirectory:error:] + 219
4   YandexMobileMetrica                 0x000000010a91fe58 +[YMMFileUtility pathsForFilesWithExtension:] + 99
5   YandexMobileMetricaCrashes          0x0000000109f4648d +[YMMSymbolsManager enumerateCacheFilesWithBlock:] + 96
6   YandexMobileMetricaCrashes          0x0000000109f45da8 +[YMMSymbolsManager registeredApiKeys] + 151
7   YandexMobileMetricaCrashes          0x0000000109f417cb __48-[YMMCrashReporter addRegisteredCrashProcessors]_block_invoke + 65
8   YandexMobileMetrica                 0x000000010a94c2cf __28-[YMMAsyncExecutor execute:]_block_invoke + 25
9   libdispatch.dylib                   0x00007fff2011265a _dispatch_call_block_and_release + 12
10  libdispatch.dylib                   0x00007fff2011383a _dispatch_client_callout + 8
11  libdispatch.dylib                   0x00007fff20119e0c _dispatch_lane_serial_drain + 743
12  libdispatch.dylib                   0x00007fff2011a9d0 _dispatch_lane_invoke + 400
13  libdispatch.dylib                   0x00007fff2012557d _dispatch_workloop_worker_thread + 772
14  libsystem_pthread.dylib             0x00007fff6da2845d _pthread_wqthread + 314
15  libsystem_pthread.dylib             0x00007fff6da2742f start_wqthread + 15

@GLinnik21
Copy link
Contributor

Thank you. It would help a lot

@spinogrizz
Copy link

The same crash appears when trying to use SwiftUI Previews, just had to disable YMM for simulator builds as described here:
#92 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants