facebook-ios-sdk icon indicating copy to clipboard operation
facebook-ios-sdk copied to clipboard

iOS 16.0 Crashes - `FBSDKPaymentProductRequestor resolveProducts`

Open SamuelZhaoY opened this issue 2 years ago • 38 comments

Checklist before submitting a bug report

Xcode version

13.2

Facebook iOS SDK version

9.3.0

Dependency Manager

CocoaPods

SDK Framework

Login

Goals

bug fix. resolve all the crashes that appears in iOS 16.0

Expected results

should be no crash in 16.0 device

Actual results

There are multiple crashes on iOS 16.0 devices with following crash stacks:

Date/Time:       2022-09-28 03:08:00 +0000
OS Version:      iPhone OS 16.0 (20A362)
Report Version:  104

Exception Type:  SIGABRT
Exception Codes: #0 at 0x20075dbc4
Crashed Thread:  0

Thread 0 Crashed:
0   libsystem_kernel.dylib              0x000000020075dbc4 0x20074f000 + 60356
1   libsystem_kernel.dylib              0x000000020077fbac 0x20074f000 + 199596
2   libobjc.A.dylib                     0x00000001bd44f85c 0x1bd41c000 + 211036
3   libobjc.A.dylib                     0x00000001bd44f7e8 0x1bd41c000 + 210920
4   libobjc.A.dylib                     0x00000001bd43bf10 0x1bd41c000 + 130832
5   libobjc.A.dylib                     0x00000001bd4261a4 0x1bd41c000 + 41380
6   libobjc.A.dylib                     0x00000001bd440450 0x1bd41c000 + 148560
7   libobjc.A.dylib                     0x00000001bd423c78 0x1bd41c000 + 31864
8   libobjc.A.dylib                     0x00000001bd41e0c4 0x1bd41c000 + 8388
9   libobjc.A.dylib                     0x00000001bd431fcc 0x1bd41c000 + 90060
[FBSDKPaymentProductRequestor resolveProducts] + 187724860 (FBSDKPaymentObserver.m:210)
[FBSDKPaymentObserver handleTransaction:] + 187723640 (FBSDKPaymentObserver.m:139)

Steps to reproduce

This is reproduced online with small possibilities, our team has no clue on how to effectively reproduce the crash.

Code samples & details

n.a.

SamuelZhaoY avatar Sep 28 '22 04:09 SamuelZhaoY

Hi please let me know if there is any feedback on this issue.

SamuelZhaoY avatar Sep 30 '22 11:09 SamuelZhaoY

HI @SamuelZhaoY I am facing same issue, did you find any solution ?

tejua avatar Oct 10 '22 04:10 tejua

I am seeing this crash as well -- second most common crash happening in my app. All I do is initialize the FB SDK so about 99% sure this is an issue with the SDK. I also see it only on iOS 16

cpheinrich avatar Oct 14 '22 18:10 cpheinrich

HI @SamuelZhaoY I am facing same issue, did you find any solution ?

Nope, currently there is no clue, waiting the feedback from FB SDK team.

SamuelZhaoY avatar Oct 15 '22 10:10 SamuelZhaoY

We're also facing this issue. The fbsdk version we have is 9.2.0. The FBSDKPaymentObserver.m changed a lot in the following versions. It has been refactored to swift in 15.0.0. Maybe update fbsdk version can solve this issue.

kkpattern avatar Oct 17 '22 07:10 kkpattern

also seeing a lot of crashes on 16.0 to 16.1 with FBSDKPaymentObserver

landonr avatar Oct 18 '22 18:10 landonr

Facing the same issue ios 16.0.3 and fbsdk 9.3.0 Please let us know if you found a work around or something. Cheers

svera1213 avatar Oct 18 '22 21:10 svera1213

Same here!

fishandphil avatar Oct 22 '22 06:10 fishandphil

Getting what could be considered an illegal amount of crashes!!!!

JackTheWright avatar Oct 26 '22 20:10 JackTheWright

arrest mark zuckerbergh

tgx64 avatar Oct 27 '22 03:10 tgx64

Is this happening for anyone on a version higher than 9.x? Especially more recent versions.

samodom avatar Oct 27 '22 19:10 samodom

i'm on v9.3.0

landonr avatar Oct 27 '22 23:10 landonr

Latest version though SPM

Screenshot 2022-10-28 at 07 54 14

fishandphil avatar Oct 28 '22 06:10 fishandphil

@fishandphil Do you have the ability to reproduce this or is this just a crash report you've received from the wild?

samodom avatar Oct 28 '22 18:10 samodom

Hi, I am also having the same issue. Facebook login works fine but somehow app crashed unexpectedly. image

khuramdogar avatar Oct 29 '22 20:10 khuramdogar

I have disabled the Login with Facebook functionality for now. But I would really like some suggestions to keep my 'Login with Facebook' feature without app crashing.

khuramdogar avatar Oct 30 '22 21:10 khuramdogar

I have disabled the Login with Facebook functionality for now. But I would really like some suggestions to keep my 'Login with Facebook' feature without app crashing.

It works for iOS below 16

svera1213 avatar Oct 31 '22 02:10 svera1213

I have received some crash reports. so I don't want to upset new users.

khuramdogar avatar Oct 31 '22 10:10 khuramdogar

@khuramdogar do you use in-app subscriptions? I've noticed that it started right after I bought a subscription with a test user, crash happens immediately on the first screen

We use SPM, FB SDK 9.0.0, iOS 16.1, Xcode 14.0.1

bohdansasko avatar Nov 02 '22 14:11 bohdansasko

@khuramdogar do you use in-app subscriptions? I've noticed that it started right after I bought a subscription with a test user, crash happens immediately on the first screen

We use SPM, FB SDK 9.0.0, iOS 16.1, Xcode 14.0.1

Yes I am using use IN App Purchase as well in my app.

khuramdogar avatar Nov 03 '22 10:11 khuramdogar

I recently got the crash myself while debugging within Xcode. Maybe this can help:

Screenshot 2022-11-06 at 19 06 12

This is launch time. It was a cold install and I had enabled the Network Link Conditioner to do some bad networking tests. I don't know if this is related or not. First time I get it myself.

In our case, we use Facebook for login/sharing. But we have no interest in Facebook looking at the transactions that happens within our product. Is there a way to disable this feature which would maybe provide this bug?

fishandphil avatar Nov 06 '22 18:11 fishandphil

CFBundleURLTypes CFBundleURLSchemes fbAPP-ID FacebookAppID APP-ID FacebookClientToken CLIENT-TOKEN FacebookDisplayName APP-NAME

lovelyrowes avatar Nov 14 '22 14:11 lovelyrowes

We have been facing the same issue on certain devices that have upgraded to iOS 16.0.

We have only encountered this on one or two devices within the team, but we are no longer able to re-create it after the following steps:

  • Open the Facebook Developer Portal
  • Navigate to App Events -> Settings
  • Disable all settings in this section ("Collect the Apple Advertising Identifier (IDFA) with App Events", "Log in-app events automatically", "Log in-app events automatically")

Don't have any data yet on whether this has resolved the issue for live users outside of our team, but wanted to share this in case it proves useful for anyone else.

james-lgc avatar Dec 05 '22 10:12 james-lgc

Need to update to 16.1.2Sent from my iPhoneOn Dec 5, 2022, at 2:23 AM, James N @.***> wrote: We have been facing the same issue on certain devices that have upgraded to iOS 16.0. We have only encountered this on one or two devices within the team, but we are no longer able to re-create it after the following steps:

Open the Facebook Developer Portal Navigate to App Events -> Settings Disable all settings in this section ("Collect the Apple Advertising Identifier (IDFA) with App Events", "Log in-app events automatically", "Log in-app events automatically")

Don't have any data yet on whether this has resolved the issue for live users outside of our team, but wanted to share this in case it proves useful for anyone else. We have also run builds with the Facebook SDK fully removed, and have not encountered any immediate crashes in those builds.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

jfostersn avatar Dec 05 '22 18:12 jfostersn

Any updates on this? We are facing this issue and disabling events is not an option, since we advertise on Facebook and need to see campaign effectiveness.

It would be great to hear from someone from the FB team. This crash is directly impacting purchasing users.

The0racle avatar Jan 03 '23 13:01 The0racle

@khuramdogar do you use in-app subscriptions? I've noticed that it started right after I bought a subscription with a test user, crash happens immediately on the first screen

We use SPM, FB SDK 9.0.0, iOS 16.1, Xcode 14.0.1

@bohdansasko Does it happen on every app launch after a purchase?

The0racle avatar Jan 05 '23 11:01 The0racle

@The0racle yep, it does every time. a bit later I'll try out https://github.com/facebook/facebook-ios-sdk/issues/2119#issuecomment-1337093742, maybe it will help us as well

bohdansasko avatar Jan 09 '23 16:01 bohdansasko

Hey guys! I had the same problem as I am using Facebook login and Auto-Renewable Subscriptions In-App purchases in my app.

The way I fixed this bug is by adding two keys to the info.plist file:

  • FacebookAdvertiserIDCollectionEnabled: Boolean NO
  • FacebookAutoLogAppEventsEnabled: Boolean NO

After that, the app was not crashing anymore. I hope it works for you as well!

matijaozetski9y avatar Jan 11 '23 15:01 matijaozetski9y

Hey guys! I had the same problem as I am using Facebook login and Auto-Renewable Subscriptions In-App purchases in my app.

The way I fixed this bug is by adding two keys to the info.plist file:

  • FacebookAdvertiserIDCollectionEnabled: Boolean NO
  • FacebookAutoLogAppEventsEnabled: Boolean NO

After that, the app was not crashing anymore. I hope it works for you as well!

This should be a temporary solution. When AutoLogAppEvents is enabled, the FB SDK will add Payment observers, causing this crash. Don't forget to check that your code contains [FBSDKSettings setAutoLogAppEventsEnabled:YES];

Key code:

- (void)fetchServerConfiguration:(FBSDKCodeBlock)callback
{
      // ...
      if ([g_settings isAutoLogAppEventsEnabled] && self->_serverConfiguration.implicitPurchaseLoggingEnabled) {
        [g_paymentObserver startObservingTransactions]; // here
      }
      // ...
}

ccnyou avatar Jan 16 '23 07:01 ccnyou

Hey guys! I had the same problem as I am using Facebook login and Auto-Renewable Subscriptions In-App purchases in my app. The way I fixed this bug is by adding two keys to the info.plist file:

  • FacebookAdvertiserIDCollectionEnabled: Boolean NO
  • FacebookAutoLogAppEventsEnabled: Boolean NO

After that, the app was not crashing anymore. I hope it works for you as well!

This should be a temporary solution. When AutoLogAppEvents is enabled, the FB SDK will add Payment observers, causing this crash. Don't forget to check that your code contains [FBSDKSettings setAutoLogAppEventsEnabled:YES];

Key code:

- (void)fetchServerConfiguration:(FBSDKCodeBlock)callback
{
      // ...
      if ([g_settings isAutoLogAppEventsEnabled] && self->_serverConfiguration.implicitPurchaseLoggingEnabled) {
        [g_paymentObserver startObservingTransactions]; // here
      }
      // ...
}

@ccnyou Where is this code supposed to be added?

The0racle avatar Jan 17 '23 13:01 The0racle