-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash SEGFileStorage.m - Analytics v4.0.4 #936
Comments
Thanks for reporting this @vpetrosky, we're looking into it. |
@vpetrosky this is NSJSONSerialization telling you that you have a type trying to go out in one of your events that is not serializable.
We check for conformance to NSCoding, ideally so the error shows higher up in the chain and makes it easier to debug with more context (ie: the actual key being worked with) and it looks like this is making it past that check. NSTaggedDate is an Apple internal type so it could have something to do with what on the surface appears to be an NSDate but is actually NSTaggedDate underneath. If you find out how the NSDate is being created on your end to produce the NSTaggedDate type, we can probably make a patch. We'll look here as well and see if we can determine what it is as well. |
@bsneed Thanks for the response! I think I've found the call that's triggering the exception. I'm initializing a Swift date and passing it as a value in the
Is |
Hi @vpetrosky! Not sure it was ever an allowed type as dates can’t be serialized, BUT what we’re trying to do is give developers better info on things like this. So it may have just gotten dropped before. You’ll need to convert it to a string before adding it. The fix noted above narrows the allowable scope and should be an early warning for next time. 🙏 |
Since updating to Analytics version 4.0.4, we have a new trending crash.
An exception is thrown on app start up, when we fire our first few Segment events. It's reported in Firebase as a fatal crash. In my testing, I've been able to hit an exception breakpoint but am able to continue with program execution when debugging. I worry though, that this exception may sometimes result in a fatal crash that's affecting users.
Details
Operating Systems: 100% iOS 13
Device States: 75% background
When I set an exception breakpoint, Xcode displays the following error and this stack trace in the debug navigator:
Thread 4: Exception: "Invalid type in JSON write (__NSTaggedDate)"
This may or may not be related to issues described here: #929
The text was updated successfully, but these errors were encountered: