firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.51k stars 1.44k forks source link

FPRTruncatedURLString NSRangeException - *** -[__NSCFString substringToIndex:]: Inde out of bounds #13282

Closed evelyne96 closed 1 month ago

evelyne96 commented 1 month ago

Description

We have recently started using Firebase performance and started seeing the following index out of bounds crash from the network trace library. I was not able to reproduce this issue and did not find any older issues mentioning this. Was there any updates to fix this crash since version 10.24.0 ?

          Fatal Exception: NSRangeException
0   CoreFoundation                 0x83f20 __exceptionPreprocess
1   libobjc.A.dylib                0x16018 objc_exception_throw
2   Foundation                     0x1150ec +[NSObject(NSKeyValueObservingPrivate) _shouldAddObservationForwardersForKey:]
3    x                  0x71bae8 FPRTruncatedURLString + 119 (FPRDataUtils.m:119)
4   x                    0x7222d0 +[FPRNetworkTrace stringByTrimmingURLString:] + 329 (FPRNetworkTrace.m:329)
5   x                    0x720dec -[FPRNetworkTrace initWithURLRequest:] + 95 (FPRNetworkTrace.m:95)
6   x                    0x728248 __InstrumentDataTaskWithRequestCompletionHandler_block_invoke + 316 (FPRNSURLSessionInstrument.m:316)
7   PingerPhone                    0x7281d4 __InstrumentDataTaskWithRequestCompletionHandler_block_invoke + 312 (FPRNSURLSessionInstrument.m:312)
.......
99  JavaScriptCore                 0x4ca64c JSObjectCallAsFunction
100 JavaScriptCore                 0x46c5a0 -[JSValue callWithArguments:]
101 OMSDK_Pinger                   0xdfdc (Missing UUID 0686ed57c09c37caa3bd3c9b3aefc1f5)
102 OMSDK_Pinger                   0xd344 (Missing UUID 0686ed57c09c37caa3bd3c9b3aefc1f5)
103 OMSDK_Pinger                   0xd214 (Missing UUID 0686ed57c09c37caa3bd3c9b3aefc1f5)
104 OMSDK_Pinger                   0x15244 (Missing UUID 0686ed57c09c37caa3bd3c9b3aefc1f5)
105 libdispatch.dylib              0x213c _dispatch_call_block_and_release
106 libdispatch.dylib              0x3dd4 _dispatch_client_callout
107 libdispatch.dylib              0xb400 _dispatch_lane_serial_drain
108 libdispatch.dylib              0xbf30 _dispatch_lane_invoke
109 libdispatch.dylib              0x16cb4 _dispatch_root_queue_drain_deferred_wlh
110 libdispatch.dylib              0x16528 _dispatch_workloop_worker_thread
111 libsystem_pthread.dylib        0x4934 _pthread_wqthread
112 libsystem_pthread.dylib        0x10cc start_wqthread

Reproducing the issue

No response

Firebase SDK Version

10.24.0

Xcode Version

15.3

Installation Method

Swift Package Manager

Firebase Product(s)

Performance

Targeted Platforms

iOS

Relevant Log Output

No response

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
```json Replace this line with the contents of your Package.resolved. ```

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
```yml Replace this line with the contents of your Podfile.lock! ```
google-oss-bot commented 1 month ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

casperriboe commented 1 month ago

I believe this was fixed in the latest release, 10.29.0. See this issue https://github.com/firebase/firebase-ios-sdk/issues/13199

rizafran commented 1 month ago

Hi @evelyne96, as mentioned by @casperriboe, this issue was fixed in the latest release. With this, please try updating your SDK to 10.29.0. Thanks.