iOS app crashing with +[NSUserDefaults(NSUserDefaults_NSURLExtras) _web_defaultsDidChange] NSInvalidArgumentException - *** -[__NSCFString stringByReplacingCharactersInRange:withString:]: nil argument

Hi our app facing this crashes 4 times for last one month,

from firebase crashlytics logs I concluded that this crash happens on registration step. from other posts I got that this error happening due to nil arguments but our app is build on ionic and Cordova not on swift so I don't know how this happening to us.

Please help me to fix this crash event.

Device
Model:iPhone 11 Pro
Orientation: Portrait
RAM free: 161.08 MB
Disk free: 94.98 GB
Operating System
Version:14.6.0
Orientation: Portrait
Jailbroken:No
Crash
Date:Feb 1, 2023, 12:09:32 AM
App version:6.3.2 (6.3.2)

crash stacktrace

I'm attaching my different stack traces with this

You know the drill.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi eskimo tam attaching my apple crash report along with this. thanks

Consider the Last Exception Backtrace section:

Last Exception Backtrace:
0 CoreFoundation  … __exceptionPreprocess + 216 (NSException.m:199)
1 libobjc.A.dylib … objc_exception_throw + 56 (objc-exception.mm:565)
2 Foundation      … -[NSString stringByReplacingCharactersInRange:withString:] + 184 (NSString.m:781)
3 TextInput       … -[TIDocumentState(StateTransitions) documentStateAfterReplacingText:withText:] + 360 (TIDoc…

Looking at the code for frame 2, it throws this exception when it’s been called with nil as the replacement string. I’ve no idea what frame 3 would be doing that. Looking further up the backtrace there’s a world of UIKit and WebKit code, which isn’t really my area of expertise. However, I’ve retagged your thread accordingly.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

iOS app crashing with +[NSUserDefaults(NSUserDefaults_NSURLExtras) _web_defaultsDidChange] NSInvalidArgumentException - *** -[__NSCFString stringByReplacingCharactersInRange:withString:]: nil argument
 
 
Q