崩溃断言失败 -[firtrace inittracewithname:], firtrace.m:86.NSInternalInconsistencyException",原因:"名称不能为nil



qgL7c.pnghttps://i.stack.imgur.com/eQFtK.jpg

在更新了最新的FCM SDK后,我的应用程序崩溃了。trace=Performance.startTrace(名称:url.absoluteString(

错误日志在-[firtrace inittracewithname:],firtrace.m:86中发生崩溃断言失败。NSInternalConsistencyException",原因:"名称不能为nil FCMSDK更新

如果传递给Performance.startTrace(name:)的字符串超过100个字符,请小心。在内部,他们正在一个名为NSString *FPRReservableName(NSString *name)的静态方法中对字符串执行一些清理,这不是一个诚实的API,正如你所看到的:

NSString *FPRReservableName(NSString *name) {
NSString *reservableName =
[name stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
if ([reservableName hasPrefix:kFPRInternalNamePrefix]) {
FPRLogError(kFPRClientNameReserved, @"%@ prefix is reserved. Dropped %@.",
kFPRInternalNamePrefix, reservableName);
return nil;
}
if (reservableName.length == 0) {
FPRLogError(kFPRClientNameLengthCheckFailed, @"Given name is empty.");
return nil;
}
if (reservableName.length > kFPRMaxNameLength) {
FPRLogError(kFPRClientNameLengthCheckFailed, @"%@ is greater than %d characters, dropping it.",
reservableName, kFPRMaxNameLength);
return nil;
}
return reservableName;
}

当然,这是完全不可接受的,因为它会在运行时导致意外的崩溃。

相关内容

  • 没有找到相关文章

最新更新