Skip to content

[v10] Fix '[FBLPromise HTTPBody]' SwiftUI Preview crash]#146

Merged
ncooke3 merged 6 commits into
mainfrom
nc/fix-previews
Jul 23, 2024
Merged

[v10] Fix '[FBLPromise HTTPBody]' SwiftUI Preview crash]#146
ncooke3 merged 6 commits into
mainfrom
nc/fix-previews

Conversation

@ncooke3

@ncooke3 ncooke3 commented Jul 19, 2024

Copy link
Copy Markdown
Member

I realized that this category was likely not being linked in SwiftUI previews mode. So, I programmatically force linked it with a C function. The crash was a little different thereafter, but the root problem remained the same, the request promise was not resolving and the object remained of type FBLPromise rather than the GDTURLResponse type (which lead to the crash when it tried to send a GDTURLResponse instance method message to an object of type FBLPromise). Deleting the NSURLSession category and moving the code inline worked. This was the only usage of the category so I think this works out fine.

  • Audit other category files

Fix firebase/firebase-ios-sdk#13318
Fix firebase/firebase-ios-sdk#12581
Fix firebase/firebase-ios-sdk#11733

Comment thread GoogleDataTransport/GDTCCTLibrary/NSURLSession+GDTCCTPromises.m
@ncooke3 ncooke3 requested a review from paulb777 July 19, 2024 22:20
@google-oss-bot

google-oss-bot commented Jul 19, 2024

Copy link
Copy Markdown

Coverage Report 1

Affected Products

  • GoogleDataTransport-ios-GoogleDataTransport.framework

    Overall coverage changed from 45.14% (dc65bb4) to 57.44% (6cc8eb1) by +12.31%.

    29 individual files with coverage change

    FilenameBase (dc65bb4)Merge (6cc8eb1)Diff
    GDTCCTCompressionHelper.m81.63%0.00%-81.63%
    GDTCCTNanopbHelpers.m56.04%0.00%-56.04%
    GDTCCTUploader.m89.54%20.26%-69.28%
    GDTCCTUploadOperation.m90.43%0.00%-90.43%
    GDTCCTURLSessionDataResponse.m100.00%0.00%-100.00%
    GDTCORAssert.m0.00%88.24%+88.24%
    GDTCORClock.m71.26%86.21%+14.94%
    GDTCORConsoleLogger.m18.52%74.07%+55.56%
    GDTCORDirectorySizeTracker.m63.79%93.10%+29.31%
    GDTCOREndpoints.m0.00%100.00%+100.00%
    GDTCOREvent+GDTCCTSupport.m35.42%0.00%-35.42%
    GDTCOREvent+GDTMetricsSupport.m100.00%0.00%-100.00%
    GDTCOREvent.m61.80%97.75%+35.96%
    GDTCORFlatFileStorage+Promises.m0.00%27.43%+27.43%
    GDTCORFlatFileStorage.m13.44%91.01%+77.57%
    GDTCORLifecycle.m40.74%55.56%+14.81%
    GDTCORLogSourceMetrics.m52.17%93.91%+41.74%
    GDTCORMetrics+GDTCCTSupport.m95.24%0.00%-95.24%
    GDTCORMetrics.m47.27%40.00%-7.27%
    GDTCORMetricsController.m16.28%94.77%+78.49%
    GDTCORMetricsMetadata.m0.00%100.00%+100.00%
    GDTCORPlatform.m59.18%71.84%+12.66%
    GDTCORProductData.m42.11%84.21%+42.11%
    GDTCORRegistrar.m76.72%74.60%-2.12%
    GDTCORStorageMetadata.m0.00%100.00%+100.00%
    GDTCORTransformer.m0.00%91.26%+91.26%
    GDTCORTransport.m0.00%81.25%+81.25%
    GDTCORUploadBatch.m100.00%0.00%-100.00%
    GDTCORUploadCoordinator.m59.74%79.87%+20.13%

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/PCcYzXsDg7.html

Comment thread GoogleDataTransport/GDTCCTLibrary/GDTCCTUploadOperation.m
Comment thread CHANGELOG.md Outdated
Comment thread GoogleDataTransport/GDTCORLibrary/GDTCORTransport.m

@paulb777 paulb777 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you update release note and minor version update here or in the follow up PR?

@ncooke3

ncooke3 commented Jul 23, 2024

Copy link
Copy Markdown
Member Author

Would you update release note and minor version update here or in the follow up PR?

I have the changelog done in this PR. And we haven't released v10 yet so this will go into the currently staged v10.

Nevermind 🤦

@ncooke3 ncooke3 merged commit 617af07 into main Jul 23, 2024
@ncooke3 ncooke3 deleted the nc/fix-previews branch July 23, 2024 16:49
@ncooke3

ncooke3 commented Jul 23, 2024

Copy link
Copy Markdown
Member Author

Merged. Tagging CocoaPods-11.1.0 and staging to SpecsStaging.

@mikaboo2324

Copy link
Copy Markdown

H

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

Labels

None yet

Projects

None yet

4 participants