braze-inc / braze-swift-sdk

Braze SDK for the Apple ecosystem, including: iOS, macOS, iPadOS, visionOS, tvOS
https://www.braze.com
Other
52 stars 19 forks source link

[Bug]: Geofence Crash Issue #74

Closed BrazeCJ closed 1 year ago

BrazeCJ commented 1 year ago

Platform

iOS

Platform Version

iOS 14 +

Braze SDK Version

5.11.0

Xcode Version

Xcode 14.2

Computer Processor

Intel

Repro Rate

100%

Steps To Reproduce

Example:

  1. Add braze.logCustomEvent(name: "custom_event") in AppDelegate.swift.
  2. Run the app.
  1. Add below code in 'AppDelegate.swift' let configuration = Braze.Configuration(apiKey: brazeApiKey, endpoint: brazeEndpoint) configuration.logger.level = .info configuration.location.brazeLocationProvider = BrazeLocationProvider() configuration.location.automaticLocationCollection = true configuration.location.geofencesEnabled = true configuration.location.automaticGeofenceRequests = true let braze = Braze(configuration: configuration) AppDelegate.braze = braze

  2. Braze Dashboard set location feature.

Expected Behavior

The app is crashing due to the geofence slient push that is delivered once every 24 hours.(in Firebase Crashlytics) CJONE Braze Geofence Log.TXT

Actual Incorrect Behavior

The user did not take any action.

Verbose Logs

No response

Additional Information

No response

jerielng commented 1 year ago

Hi @BrazeCJ, this issue looks like it's being caused by negative integer value being supplied to our geofence sorting logic. We've filed a ticket internally to add safeguards that will prevent this and will keep you updated here when we have released a fix.

To ensure that this fix is holistic, is there any further information you can provide about the crash rate? Is this happening for all users on a consistent basis? Any other details you can give will be helpful!

BrazeCJ commented 1 year ago

Hi @BrazeCJ, this issue looks like it's being caused by negative integer value being supplied to our geofence sorting logic. We've filed a ticket internally to add safeguards that will prevent this and will keep you updated here when we have released a fix.

To ensure that this fix is holistic, is there any further information you can provide about the crash rate? Is this happening for all users on a consistent basis? Any other details you can give will be helpful!

Hi @jerielng

Thanks you for answer.

It doesn't happen to all users, but a high number of app crashes are occurring, and we will send you a screenshot of it.

Last 30 days BrazeGeofence Crash
jerielng commented 1 year ago

@BrazeCJ thanks for sharing! We will keep you updated when we have released a fix for this.

jerielng commented 1 year ago

Hi @BrazeCJ, we've just released 6.6.1 of the Swift SDK, which should resolve this crash. Please let us know if you have any further questions. Thank you!