You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When updating a Contentful object type that removes an existing relationship with another Contentful object type, will resolve in an app crash when trying to resolve this relationship from cachedUnresolvedRelationships.
For example I have a ContentfulDashboardItem Content Type with a reference to ContentfulColor Content Type called backgroundColor. When I update the ContentfulDashboardItem Content Type that removes the reference to ContentfulColor Content Type and restart my app, 9 out of 10 times it works as expected. Though when the SynchronizationManager.swift find unresolved relationships (see cachedUnresolvedRelationships variable), the app will crash because the reference backgroundColor does not exist anymore.
The crash log:
Fatal Exception: NSUnknownKeyException
[<ContentfulDashboardItem 0x28290af80> setValue:forUndefinedKey:]: the entity ContentfulDashboardItem is not key value coding-compliant for the key "backgroundColor".
The line (220) where it crashes in SynchronizationManager.swift:
When updating a Contentful object type that removes an existing relationship with another Contentful object type, will resolve in an app crash when trying to resolve this relationship from cachedUnresolvedRelationships.
For example I have a ContentfulDashboardItem Content Type with a reference to ContentfulColor Content Type called
backgroundColor
. When I update the ContentfulDashboardItem Content Type that removes the reference to ContentfulColor Content Type and restart my app, 9 out of 10 times it works as expected. Though when the SynchronizationManager.swift find unresolved relationships (see cachedUnresolvedRelationships variable), the app will crash because the referencebackgroundColor
does not exist anymore.The crash log:
The line (220) where it crashes in SynchronizationManager.swift:
entryPersistable.setValue(target, forKey: fieldName)
Could the resolve relationships be updated so that it first checks if it can call
setValue
before calling it and making it crash?The text was updated successfully, but these errors were encountered: