-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Infinite requests to the graph API #2326
Comments
{ |
same problem |
to zuck: just pull AppEvents completely and start over. S2S CAPI only until then. to community: FB refuses to document the fingerprinting import Foundation
import CoreTelephony
import UIKit
public struct ExtInfoPayload: Codable {
public let extinfo: [String]
public init() {
let carrierName = CTTelephonyNetworkInfo().subscriberCellularProvider?.carrierName ?? ""
let processorCount = ProcessInfo.processInfo.processorCount
let totalDiskSpace: Int64 = try! FileManager.default.attributesOfFileSystem(forPath: NSHomeDirectory())[.systemSize] as! Int64
let availableDiskSpace: Int64 = try! FileManager.default.attributesOfFileSystem(forPath: NSHomeDirectory())[.systemFreeSize] as! Int64
let bundleId = Bundle.main.bundleIdentifier ?? ""
let shortVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? ""
let longVersion = Bundle.main.infoDictionary?[kCFBundleVersionKey as String] as? String ?? ""
let language = NSLocale.current.identifier
let timeZoneAbbrev = NSTimeZone.system.abbreviation() ?? ""
let screenRect = UIScreen.main.bounds
let scale = String(format: "%.02f", UIScreen.main.scale)
let timeZoneIdentifier = NSTimeZone.system.identifier
let machine: String = {
var systemInfo = utsname()
uname(&systemInfo)
return withUnsafePointer(to: &systemInfo.machine.0) { ptr in
String(cString: ptr)
}
}()
self.extinfo = [
"i2",
bundleId,
shortVersion,
longVersion,
UIDevice.current.systemVersion,
machine,
language,
timeZoneAbbrev,
carrierName,
String(Int(screenRect.size.width)),
String(Int(screenRect.size.height)),
scale,
String(processorCount),
String(totalDiskSpace),
String(availableDiskSpace),
timeZoneIdentifier
]
}
} |
Hi baby |
This issue arose from version 16.3.1. After downgrading to version 16.2.0, the functionality has been restored. |
Any news on this? Given that the Facebook SDK 16.2.x is not working with Xcode 15.3 (see #2353) this is becoming a serious problem now. |
It's been nearly two months since this issue was reported, and it appears that no one from the Facebook team has addressed it yet. |
Was this fixed in 17.0? I would love to update to get the Privacy manifests, but if this is not fixed, I can't update. |
It looks like it was silently fixed, but I would appreciate confirmation as well. |
Hi @antoinepalazzolo, as you were the original author of this issue, can you confirm this is working for you as well since 17.0? |
FWIW, in our experience with testing out version 17.0 of the SDK, we have not seen this bug occur again. I would still like to see official confirmation. |
The issue with the infinite loop of network requests in version 16.3.1 seems to be mitigated in version 17.0 of the SDK. Previously, the error was caused by the SDK attempting to retry the same request repeatedly when it failed to load the server configuration due to (erroneous ?) additional parameters. The infinit loop was observed in previous versions of the SDK when using an HTTP proxy that map the same error. In version 17.0, there appears to be improved communication between the SDK and the backend, potentially avoiding this specific error scenario. However, without explicit confirmation that the underlying error handling mechanism has been redesigned to prevent similar issues, we cannot conclusively say the bug has been fixed. It may be beneficial to monitor the behavior in version 17.0 further before deciding to close the issue. |
Checklist before submitting a bug report
Xcode version
15.1.0
Facebook iOS SDK version
16.3.1
Dependency Manager
SPM
SDK Framework
Core
Goals
The goal is to use the Facebook SDK to track app events. The SDK is generating an infinite number of network requests to the Graph API. This behavior is observed with an HTTP proxy (without SSL proxy) and with Instruments. Each request is sent as a batch to the Graph API, which consistently returns a 400 status code error for each item in the batch. The SDK then repeats the same request, receiving the same error, creating a continuous loop.
This issue leads to unnecessary network traffic and potential performance degradation in the application.
Expected results
Actual results
When the app starts, the SDK sends a batch request to the Graph API, which returns a 400 status code error for each item in the batch. The same request is then sent again, resulting in the same error response. This process repeats indefinitely.
Sample Request and Response (with SSL proxy enabled):
Preliminary Analysis:
The parameters
auto_log_app_events_default
andauto_log_app_events_enabled
appear to be causing the request failure. These are related to the automatic logging of events feature, which is controlled by theFacebookAutoLogAppEventsEnabled
property in the plist and theSettings.shared.isAutoLogAppEventsEnabled
property at runtime. Notably, these parameters are still sent to the API even when not enabled at runtime.Steps to reproduce
ApplicationDelegate.shared.application(, didFinishLaunchingWithOptions: )
method.Code samples & details
The text was updated successfully, but these errors were encountered: