Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 16.0 Crashes - FBSDKPaymentProductRequestor resolveProducts #2119

Open
4 of 5 tasks
SamuelZhaoY opened this issue Sep 28, 2022 · 38 comments
Open
4 of 5 tasks

iOS 16.0 Crashes - FBSDKPaymentProductRequestor resolveProducts #2119

SamuelZhaoY opened this issue Sep 28, 2022 · 38 comments

Comments

@SamuelZhaoY
Copy link

SamuelZhaoY commented Sep 28, 2022

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
Copy link
Author

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

@tejua
Copy link

tejua commented Oct 10, 2022

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

@cpheinrich
Copy link

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

@SamuelZhaoY
Copy link
Author

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.

@kkpattern
Copy link

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.

@landonr
Copy link

landonr commented Oct 18, 2022

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

@svera1213
Copy link

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

@fishandphil
Copy link

Same here!

@JackTheWright
Copy link

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

@tgx64
Copy link

tgx64 commented Oct 27, 2022

arrest mark zuckerbergh

@samodom
Copy link
Contributor

samodom commented Oct 27, 2022

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

@landonr
Copy link

landonr commented Oct 27, 2022

i'm on v9.3.0

@fishandphil
Copy link

Latest version though SPM

Screenshot 2022-10-28 at 07 54 14

@samodom
Copy link
Contributor

samodom commented Oct 28, 2022

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

@khuramdogar
Copy link

khuramdogar commented Oct 29, 2022

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

@khuramdogar
Copy link

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.

@svera1213
Copy link

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

@khuramdogar
Copy link

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

@bohdansasko
Copy link

bohdansasko commented Nov 2, 2022

@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

@khuramdogar
Copy link

@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.

@fishandphil
Copy link

fishandphil commented Nov 6, 2022

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?

@lovelyrowes
Copy link

CFBundleURLTypes


CFBundleURLSchemes

fbAPP-ID



FacebookAppID
APP-ID
FacebookClientToken
CLIENT-TOKEN
FacebookDisplayName
APP-NAME

@james-lgc
Copy link

james-lgc commented Dec 5, 2022

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.

@jfostersn
Copy link

jfostersn commented Dec 5, 2022 via email

@The0racle
Copy link

The0racle commented Jan 3, 2023

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
Copy link

@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?

@bohdansasko
Copy link

@The0racle yep, it does every time. a bit later I'll try out #2119 (comment), maybe it will help us as well

@matijaozetski9y
Copy link

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!

@ccnyou
Copy link

ccnyou commented Jan 16, 2023

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
      }
      // ...
}

@The0racle
Copy link

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?

@AntJahja
Copy link

I am also facing the same issue, are there any updates yet by anybody?

@henrymly
Copy link

We're seeing this crash in version 9.0.1.

Has anyone been able to reliably reproduce this yet?

@trunghvbk
Copy link

this happens when I integrated Apple Subscriptions into our app.
Log in the console:
objc[17011]: thread is already initializing this class!
The line that triggers the crash is
self.productRequest = [[fbsdkdfl_SKProductsRequestClass() alloc] initWithProductIdentifiers:productIdentifiers];
I did process purchase Subscription before so the productId in here is the productId saved when purchasing.
Screenshot 2023-03-22 at 14 54 50

@The0racle
Copy link

It's hard to believe this issue hasn't been fixed or at least addressed in 6 months. It crashes the app on purchases - purchases! We're talking about the official Facebook iOS SDK.

Can anyone from Facebook please chime in? That would be much appreciated.

@landonr
Copy link

landonr commented Mar 22, 2023

arrest mark zuckerbergh

@KerezovTobokel
Copy link

31 may 2023, still having this issue(

@ccnyou
Copy link

ccnyou commented May 31, 2023

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?

both plist file and fb sdk setup code.

LeonardoPasseri added a commit to balzo-tech/PDFEasy-iOS that referenced this issue Jul 21, 2023
@MilanNosal
Copy link

I've had the same problem, I was able to fix it by updating SDK to the newer version (14.1.0) and also importing FacebookAEM and FacebookBasics packages along with FacebookCore. I am not going to invest more time in investigating, but I think it's possible the fix was in adding the packages and not the update, probably autologging of events was dependent on one of those.

Anyway, if anyone stumbles upon this, try the same thing.

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

No branches or pull requests