<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic v2 API iOS Objective-C SDK: crash after file upload in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/v2-API-iOS-Objective-C-SDK-crash-after-file-upload/m-p/242466#M13523</link>
    <description>&lt;P&gt;I'm getting a lot of crash reports&amp;nbsp;after updating my app to the v2 API using the iOS Objective-C Dropbox library. The crash log seems to suggest something internal with the Dropbox library ... can someone take a look and verfiy what might be going wrong? The file seems to upload just fine, but the user gets a crash.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;My code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        DBFILESWriteMode *mode = [[DBFILESWriteMode alloc] initWithOverwrite];
        DBUploadTask *task = [self.restClientNew.filesRoutes uploadUrl:[NSString stringWithFormat:@"/ContactsJournal/FileAttachments/%@", [url lastPathComponent]] mode:mode autorename:@NO clientModified:[NSDate date] mute:@NO inputUrl: url];
        
        [task setResponseBlock:^(DBFILESFileMetadata *response, id  _Nullable routeError, DBRequestError * _Nullable error) {
            if (response) {&lt;BR /&gt;...&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The crash report itself:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Exception Type:  SIGABRT
Exception Codes: #0 at 0x187429014
Crashed Thread:  0

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Cannot read file at file:///private/var/mobile/Containers/Shared/AppGroup/31BB2FD4-C64D-4B54-BD8D-355637A6EC54/FileAttachments/Picture%20(09-18-2017%2015:21:53)-72550D2A-0EE6-4277-BAAA-9FA0D95E9F8C.pdf'

Last Exception Backtrace:
0   CoreFoundation                       0x000000018842efe0 __exceptionPreprocess + 124
1   libobjc.A.dylib                      0x0000000186e90538 objc_exception_throw + 52
2   CFNetwork                            0x0000000188b1eec8 -[__NSURLBackgroundSession validateUploadFile:] + 268
3   CFNetwork                            0x0000000188b1fd44 -[__NSURLBackgroundSession _onqueue_uploadTaskForRequest:uploadFile:bodyData:completion:] + 84
4   CFNetwork                            0x0000000188b1fbf8 __80-[__NSURLBackgroundSession uploadTaskForRequest:uploadFile:bodyData:completion:]_block_invoke + 36
5   CFNetwork                            0x0000000188b1f0fc __68-[__NSURLBackgroundSession performBlockOnQueueAndRethrowExceptions:]_block_invoke + 72
6   libdispatch.dylib                    0x00000001872e69a0 _dispatch_client_callout + 12
7   libdispatch.dylib                    0x00000001872f3ee0 _dispatch_barrier_sync_f_invoke + 80
8   CFNetwork                            0x0000000188b1f05c -[__NSURLBackgroundSession performBlockOnQueueAndRethrowExceptions:] + 148
9   CFNetwork                            0x0000000188b1fb58 -[__NSURLBackgroundSession uploadTaskForRequest:uploadFile:bodyData:completion:] + 200
10  ObjectiveDropboxOfficial             0x000000010060bc5c -[DBTransportDefaultClient requestUpload:arg:inputUrl:] (DBTransportDefaultClient.m:98)
11  ObjectiveDropboxOfficial             0x00000001006554f8 -[DBFILESRoutes uploadUrl:mode:autorename:clientModified:mute:inputUrl:] (DBFILESRoutes.m:768)
12  SimpleList-iPad                      0x00000001001968b4 -[DropboxNewManager uploadFilesToDropboxWithList:] (DropboxNewManager.m:781)
13  SimpleList-iPad                      0x00000001001963c4 -[DropboxNewManager startUploadFileAttachmentsToDropBox] (DropboxNewManager.m:732)
14  SimpleList-iPad                      0x000000010019629c -[DropboxNewManager handleUploadURLResponse:] (DropboxNewManager.m:714)
15  SimpleList-iPad                      0x0000000100195e44 __55-[DropboxNewManager saveChangesToDropBoxWithParentRev:]_block_invoke_2 (DropboxNewManager.m:669)
16  ObjectiveDropboxOfficial             0x000000010060f570 __46-[DBUploadTask storageBlockWithResponseBlock:]_block_invoke (DBTasks.m:180)
17  ObjectiveDropboxOfficial             0x000000010067919c -[DBDelegate URLSession:task:didCompleteWithError:] (DBDelegate.m:84)
18  CFNetwork                            0x0000000188c07ad4 __51-[NSURLSession delegate_task:didCompleteWithError:]_block_invoke.185 + 68
19  Foundation                           0x0000000188efe854 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 12
20  Foundation                           0x0000000188e437b0 -[NSBlockOperation main] + 92
21  Foundation                           0x0000000188e33b68 -[__NSOperationInternal _start:] + 608
22  Foundation                           0x0000000188f00bf0 __NSOQSchedule_f + 224
23  libdispatch.dylib                    0x00000001872e69a0 _dispatch_client_callout + 12
24  libdispatch.dylib                    0x00000001872eb5e8 _dispatch_main_queue_callback_4CF + 992
25  CoreFoundation                       0x00000001883dd0c8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
26  CoreFoundation                       0x00000001883dace4 __CFRunLoopRun + 1568
27  CoreFoundation                       0x000000018830ada4 CFRunLoopRunSpecific + 420
28  GraphicsServices                     0x0000000189d75074 GSEventRunModal + 96
29  UIKit                                0x000000018e5bec9c UIApplicationMain + 204
30  SimpleList-iPad                      0x00000001000bb850 main (main.m:20)
31  libdyld.dylib                        0x000000018731959c start + 0

Thread 0 Crashed:
0   libsystem_kernel.dylib               0x0000000187429014 __pthread_kill + 8
1   libsystem_pthread.dylib              0x00000001874f3264 pthread_kill + 108
2   libsystem_c.dylib                    0x000000018739d9c4 abort + 136
3   SimpleList-iPad                      0x00000001002b5268 uncaught_exception_handler + 28
4   CoreFoundation                       0x000000018842f354 __handleUncaughtException + 624
5   libobjc.A.dylib                      0x0000000186e90814 _objc_terminate() + 108
6   SimpleList-iPad                      0x00000001002a3084 BITCrashUncaughtCXXTerminateHandler() (BITCrashCXXExceptionHandler.mm:178)
7   libc++abi.dylib                      0x0000000186e7f5d4 std::__terminate(void (*)()) + 12
8   libc++abi.dylib                      0x0000000186e7f640 std::terminate() + 56
9   libdispatch.dylib                    0x00000001872e69b4 _dispatch_client_callout + 32
10  libdispatch.dylib                    0x00000001872eb5e8 _dispatch_main_queue_callback_4CF + 992
11  CoreFoundation                       0x00000001883dd0c8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
12  CoreFoundation                       0x00000001883dace4 __CFRunLoopRun + 1568
13  CoreFoundation                       0x000000018830ada4 CFRunLoopRunSpecific + 420
14  GraphicsServices                     0x0000000189d75074 GSEventRunModal + 96
15  UIKit                                0x000000018e5bec9c UIApplicationMain + 204
16  SimpleList-iPad                      0x00000001000bb850 main (main.m:20)
17  libdyld.dylib                        0x000000018731959c start + 0&lt;/PRE&gt;</description>
    <pubDate>Wed, 29 May 2019 09:19:12 GMT</pubDate>
    <dc:creator>zulfishah</dc:creator>
    <dc:date>2019-05-29T09:19:12Z</dc:date>
    <item>
      <title>v2 API iOS Objective-C SDK: crash after file upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/v2-API-iOS-Objective-C-SDK-crash-after-file-upload/m-p/242466#M13523</link>
      <description>&lt;P&gt;I'm getting a lot of crash reports&amp;nbsp;after updating my app to the v2 API using the iOS Objective-C Dropbox library. The crash log seems to suggest something internal with the Dropbox library ... can someone take a look and verfiy what might be going wrong? The file seems to upload just fine, but the user gets a crash.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;My code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        DBFILESWriteMode *mode = [[DBFILESWriteMode alloc] initWithOverwrite];
        DBUploadTask *task = [self.restClientNew.filesRoutes uploadUrl:[NSString stringWithFormat:@"/ContactsJournal/FileAttachments/%@", [url lastPathComponent]] mode:mode autorename:@NO clientModified:[NSDate date] mute:@NO inputUrl: url];
        
        [task setResponseBlock:^(DBFILESFileMetadata *response, id  _Nullable routeError, DBRequestError * _Nullable error) {
            if (response) {&lt;BR /&gt;...&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The crash report itself:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Exception Type:  SIGABRT
Exception Codes: #0 at 0x187429014
Crashed Thread:  0

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Cannot read file at file:///private/var/mobile/Containers/Shared/AppGroup/31BB2FD4-C64D-4B54-BD8D-355637A6EC54/FileAttachments/Picture%20(09-18-2017%2015:21:53)-72550D2A-0EE6-4277-BAAA-9FA0D95E9F8C.pdf'

Last Exception Backtrace:
0   CoreFoundation                       0x000000018842efe0 __exceptionPreprocess + 124
1   libobjc.A.dylib                      0x0000000186e90538 objc_exception_throw + 52
2   CFNetwork                            0x0000000188b1eec8 -[__NSURLBackgroundSession validateUploadFile:] + 268
3   CFNetwork                            0x0000000188b1fd44 -[__NSURLBackgroundSession _onqueue_uploadTaskForRequest:uploadFile:bodyData:completion:] + 84
4   CFNetwork                            0x0000000188b1fbf8 __80-[__NSURLBackgroundSession uploadTaskForRequest:uploadFile:bodyData:completion:]_block_invoke + 36
5   CFNetwork                            0x0000000188b1f0fc __68-[__NSURLBackgroundSession performBlockOnQueueAndRethrowExceptions:]_block_invoke + 72
6   libdispatch.dylib                    0x00000001872e69a0 _dispatch_client_callout + 12
7   libdispatch.dylib                    0x00000001872f3ee0 _dispatch_barrier_sync_f_invoke + 80
8   CFNetwork                            0x0000000188b1f05c -[__NSURLBackgroundSession performBlockOnQueueAndRethrowExceptions:] + 148
9   CFNetwork                            0x0000000188b1fb58 -[__NSURLBackgroundSession uploadTaskForRequest:uploadFile:bodyData:completion:] + 200
10  ObjectiveDropboxOfficial             0x000000010060bc5c -[DBTransportDefaultClient requestUpload:arg:inputUrl:] (DBTransportDefaultClient.m:98)
11  ObjectiveDropboxOfficial             0x00000001006554f8 -[DBFILESRoutes uploadUrl:mode:autorename:clientModified:mute:inputUrl:] (DBFILESRoutes.m:768)
12  SimpleList-iPad                      0x00000001001968b4 -[DropboxNewManager uploadFilesToDropboxWithList:] (DropboxNewManager.m:781)
13  SimpleList-iPad                      0x00000001001963c4 -[DropboxNewManager startUploadFileAttachmentsToDropBox] (DropboxNewManager.m:732)
14  SimpleList-iPad                      0x000000010019629c -[DropboxNewManager handleUploadURLResponse:] (DropboxNewManager.m:714)
15  SimpleList-iPad                      0x0000000100195e44 __55-[DropboxNewManager saveChangesToDropBoxWithParentRev:]_block_invoke_2 (DropboxNewManager.m:669)
16  ObjectiveDropboxOfficial             0x000000010060f570 __46-[DBUploadTask storageBlockWithResponseBlock:]_block_invoke (DBTasks.m:180)
17  ObjectiveDropboxOfficial             0x000000010067919c -[DBDelegate URLSession:task:didCompleteWithError:] (DBDelegate.m:84)
18  CFNetwork                            0x0000000188c07ad4 __51-[NSURLSession delegate_task:didCompleteWithError:]_block_invoke.185 + 68
19  Foundation                           0x0000000188efe854 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 12
20  Foundation                           0x0000000188e437b0 -[NSBlockOperation main] + 92
21  Foundation                           0x0000000188e33b68 -[__NSOperationInternal _start:] + 608
22  Foundation                           0x0000000188f00bf0 __NSOQSchedule_f + 224
23  libdispatch.dylib                    0x00000001872e69a0 _dispatch_client_callout + 12
24  libdispatch.dylib                    0x00000001872eb5e8 _dispatch_main_queue_callback_4CF + 992
25  CoreFoundation                       0x00000001883dd0c8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
26  CoreFoundation                       0x00000001883dace4 __CFRunLoopRun + 1568
27  CoreFoundation                       0x000000018830ada4 CFRunLoopRunSpecific + 420
28  GraphicsServices                     0x0000000189d75074 GSEventRunModal + 96
29  UIKit                                0x000000018e5bec9c UIApplicationMain + 204
30  SimpleList-iPad                      0x00000001000bb850 main (main.m:20)
31  libdyld.dylib                        0x000000018731959c start + 0

Thread 0 Crashed:
0   libsystem_kernel.dylib               0x0000000187429014 __pthread_kill + 8
1   libsystem_pthread.dylib              0x00000001874f3264 pthread_kill + 108
2   libsystem_c.dylib                    0x000000018739d9c4 abort + 136
3   SimpleList-iPad                      0x00000001002b5268 uncaught_exception_handler + 28
4   CoreFoundation                       0x000000018842f354 __handleUncaughtException + 624
5   libobjc.A.dylib                      0x0000000186e90814 _objc_terminate() + 108
6   SimpleList-iPad                      0x00000001002a3084 BITCrashUncaughtCXXTerminateHandler() (BITCrashCXXExceptionHandler.mm:178)
7   libc++abi.dylib                      0x0000000186e7f5d4 std::__terminate(void (*)()) + 12
8   libc++abi.dylib                      0x0000000186e7f640 std::terminate() + 56
9   libdispatch.dylib                    0x00000001872e69b4 _dispatch_client_callout + 32
10  libdispatch.dylib                    0x00000001872eb5e8 _dispatch_main_queue_callback_4CF + 992
11  CoreFoundation                       0x00000001883dd0c8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
12  CoreFoundation                       0x00000001883dace4 __CFRunLoopRun + 1568
13  CoreFoundation                       0x000000018830ada4 CFRunLoopRunSpecific + 420
14  GraphicsServices                     0x0000000189d75074 GSEventRunModal + 96
15  UIKit                                0x000000018e5bec9c UIApplicationMain + 204
16  SimpleList-iPad                      0x00000001000bb850 main (main.m:20)
17  libdyld.dylib                        0x000000018731959c start + 0&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 May 2019 09:19:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/v2-API-iOS-Objective-C-SDK-crash-after-file-upload/m-p/242466#M13523</guid>
      <dc:creator>zulfishah</dc:creator>
      <dc:date>2019-05-29T09:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: v2 API iOS Objective-C SDK: crash after file upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/v2-API-iOS-Objective-C-SDK-crash-after-file-upload/m-p/242469#M13524</link>
      <description>&lt;P&gt;Thanks for the report! A few questions first:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- What version of the SDK are you using? If you're not using the latest version, &lt;A href="https://github.com/dropbox/dropbox-sdk-obj-c/releases" target="_self"&gt;currently v3.3.2&lt;/A&gt;, please update to that and let us know if it doesn't help.&lt;/P&gt;
&lt;P&gt;- Are you able to reproduce this yourself, or are you only seeing it via user crash reports?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2017 18:02:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/v2-API-iOS-Objective-C-SDK-crash-after-file-upload/m-p/242469#M13524</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-09-20T18:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: v2 API iOS Objective-C SDK: crash after file upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/v2-API-iOS-Objective-C-SDK-crash-after-file-upload/m-p/242471#M13525</link>
      <description>I'm only getting this through user crash reports; not reproducible myself (though I'm trying). Also trying to figure out which version of the SDK I currently have integrated in the project ... how would I be able to do that? I just imported the ObjectiveDropboxOfficial2.framework</description>
      <pubDate>Wed, 20 Sep 2017 18:10:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/v2-API-iOS-Objective-C-SDK-crash-after-file-upload/m-p/242471#M13525</guid>
      <dc:creator>zulfishah</dc:creator>
      <dc:date>2017-09-20T18:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: v2 API iOS Objective-C SDK: crash after file upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/v2-API-iOS-Objective-C-SDK-crash-after-file-upload/m-p/242475#M13526</link>
      <description>&lt;P&gt;As long as you have a copy from around March or later you can check the kV2SDKVersion constant in code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise, it would depend on your &lt;A href="https://github.com/dropbox/dropbox-sdk-obj-c#sdk-distribution" target="_self"&gt;installation method&lt;/A&gt;. E.g., with CocoaPods you can check the Podfile.lock file. For Carthage, you can check the Cartfile.resolved file.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2017 18:28:46 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/v2-API-iOS-Objective-C-SDK-crash-after-file-upload/m-p/242475#M13526</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-09-20T18:28:46Z</dc:date>
    </item>
  </channel>
</rss>

