BranchMetrics/ios-branch-deep-linking-attribution

[Hang Risk] Thread QoS issue on share sheet action

willbattel opened this issue · 2 comments

Describe the bug

So far this has not appeared to have become a user-facing issue but it's a worrisome warning we wanted to bring attention to.

We're creating a BUO for content in our app and when we select an action after showShareSheet we experience the following:

Xcode flags this in BNCServerInterface
Screen Shot 2022-10-11 at 2 33 20 PM

And this is spat out in the console.

Thread Performance Checker: Thread running at QOS_CLASS_USER_INITIATED waiting on a lower QoS thread running at QOS_CLASS_BACKGROUND. Investigate ways to avoid priority inversions
PID: 37030, TID: 2876889
Backtrace
=================================================================
3   appname                           0x00000001008ee8e4 -[BNCServerInterface genericHTTPRequestSynchronous:] + 292
4   appname                           0x00000001008edc6c -[BNCServerInterface postRequestSynchronous:url:key:] + 144
5   appname                           0x000000010091374c -[BranchShortUrlSyncRequest makeRequest:key:] + 380
6   appname                           0x00000001008fe26c -[Branch generateShortUrl:andAlias:andType:andMatchDuration:andChannel:andFeature:andStage:andCampaign:andParams:ignoreUAString:forceLinkCreation:] + 424
7   appname                           0x00000001008fbd50 -[Branch getShortURLWithParams:andTags:andChannel:andFeature:andStage:andCampaign:andAlias:ignoreUAString:forceLinkCreation:] + 68
8   appname                           0x0000000100911b1c -[BranchShareLink shareObjectForItem:activityType:] + 1000
9   appname                           0x000000010091076c -[BranchShareActivityItem item] + 72
10  ShareSheet                          0x00000001b6dffb14 42FF9E2C-426A-3125-B768-156F76DD4CD3 + 465684
11  Foundation                          0x000000019a450e40 0B0D9361-7EFA-31DA-9524-6F4A7412B618 + 474688
12  Foundation                          0x000000019a415f18 0B0D9361-7EFA-31DA-9524-6F4A7412B618 + 233240
13  Foundation                          0x000000019a415c64 0B0D9361-7EFA-31DA-9524-6F4A7412B618 + 232548
14  Foundation                          0x000000019a41ad34 0B0D9361-7EFA-31DA-9524-6F4A7412B618 + 253236
15  libdispatch.dylib                   0x0000000102850d50 _dispatch_block_async_invoke2 + 104
16  libdispatch.dylib                   0x00000001028418c4 _dispatch_client_callout + 16
17  libdispatch.dylib                   0x0000000102844588 _dispatch_continuation_pop + 488
18  libdispatch.dylib                   0x00000001028439fc _dispatch_async_redirect_invoke + 676
19  libdispatch.dylib                   0x0000000102853aa4 _dispatch_root_queue_drain + 356
20  libdispatch.dylib                   0x0000000102854414 _dispatch_worker_thread2 + 208
21  libsystem_pthread.dylib             0x00000001e70f4b14 _pthread_wqthread + 224
22  libsystem_pthread.dylib             0x00000001e70f467c start_wqthread + 8
2022-10-11 14:42:06.860283-0400 appname[37030:2876511] [NSExtension] Extension request contains input items but the extension point does not specify a set of allowed payload classes. The extension point's NSExtensionContext subclass must implement `+_allowedItemPayloadClasses`. This must return the set of allowed NSExtensionItem payload classes. In future, this request will fail with an error.

There may actually be two separate issues, the hang risk and the NSExtension warning.

Steps to reproduce

  1. Initialize BranchUniversalObject
  2. Initialize BranchLinkProperties
  3. Call buo.showShareSheet(with: lp, andShareText: "some text", from: self)
  4. Tap an option, such as Twitter

Expected behavior

We expected to not receive these warnings.

SDK Version

1.43.2

XCode Version

14.0.1

Device

iPhone 8 Plus

OS

16.0

Additional Information/Context

No response

Thanks for report. I'm opening a ticket to research this and your other ticket in the next sprint. We did lower the thread priority of our queue last summer, but did not see this during our own testing.

This was fixed in 2.0.0