urbanairship / capacitor-airship

1 stars 2 forks source link

Preference Center Fails to Open After Updating to Capacitor Plugin 1.1.0 on Existing App Installations #4

Closed michaelschoenbaechler closed 6 months ago

michaelschoenbaechler commented 7 months ago

Preliminary Info

What Airship dependencies are you using?

Capacitor Plugin 1.1.0

What are the versions of any relevant development tools you are using?

NPM 10.5
Xcode 15.3

Report

What unexpected behavior are you seeing?

After migrating from Cordova to the Capacitor plugin (version 1.1.0) and updating an app that already has an older version installed, the preference center cannot be opened. However, It works fine after a clean install.

What is the expected behavior?

The preference center should open without issues after updating the app with the new Capacitor plugin, regardless of the version previously installed. The previous settings of the user should remain.

What are the steps to reproduce the unexpected behavior?

  1. Install an older version of an app with the cordova plugin
  2. Change some settings
  3. Update the app to the new version that uses Capacitor plugin 1.1.0.
  4. Attempt to open the preference center

Do you have logging for the issue?

CoreData: warning: no NSValueTransformer with class name 'UANSDictionaryValueTransformer' was found for attribute 'metadata' on entity 'UARemoteDataStorePayload'
error: addPersistentStoreWithType:configuration:URL:options:error: returned error NSCocoaErrorDomain (134140)
CoreData: error: addPersistentStoreWithType:configuration:URL:options:error: returned error NSCocoaErrorDomain (134140)
error: userInfo:
CoreData: error: userInfo:
error:  sourceModel : (<NSManagedObjectModel: 0x30080dbd0>) isEditable 0, entities {
    UARemoteDataStorePayload = "(<NSEntityDescription: 0x301c96b50>) name UARemoteDataStorePayload, managedObjectClassName UARemoteDataStorePayload, renamingIdentifier UARemoteDataStorePayload, isAbstract 0, superentity name (null), properties {\n    data = \"(<NSAttributeDescription: 0x3005a9080>), name data, isOptional 1, isTransient 0, entity UARemoteDataStorePayload, renamingIdentifier data, validation predicates (\\n), warnings (\\n), versionHashModifier (null)\\n userInfo {\\n}, attributeType 1800 , attributeValueClassName (null), defaultValue (null), preservesValueInHistoryOnDeletion NO, allowsCloudEncryption NO\";\n    metadata = \"(<NSAttributeDescription: 0x3005a8600>), name metadata, isOptional 1, isTransient 0, entity UARemoteDataStorePayload, renamingIdentifier metadata, validation predicates (\\n), warnings (\\n), versionHashModifier (null)\\n userInfo {\\n}, attributeType 1800 , attributeValueClassName (null), defaultValue (null), preservesValueInHistoryOnDeletion NO, allowsCloudEncryption NO\";\n    timestamp = \"(<NSAttributeDescription: 0x3005a8180>), name timestamp, isOptional 1, isTransient 0, entity UARemoteDataStorePayload, renamingIdentifier timestamp, validation predicates (\\n), warnings (\\n), versionHashModifier (null)\\n userInfo {\\n}, attributeType 900 , attributeValueClassName NSDate, defaultValue (null), preservesValueInHistoryOnDeletion NO, allowsCloudEncryption NO\";\n    type = \"(<NSAttributeDescription: 0x3005a8d00>), name type, isOptional 1, isTransient 0, entity UARemoteDataStorePayload, renamingIdentifier type, validation predicates (\\n), warnings (\\n), versionHashModifier (null)\\n userInfo {\\n}, attributeType 700 , attributeValueClassName NSString, defaultValue (null), preservesValueInHistoryOnDeletion NO, allowsCloudEncryption NO\";\n}, subentities {\n}, userInfo {\n}, versionHashModifier (null), uniquenessConstraints (\n)";
}, fetch request templates {
}
error:  reason : Can't find or automatically infer mapping model for migration
CoreData: error:    reason : Can't find or automatically infer mapping model for migration
error:  NSUnderlyingError : Error Domain=NSCocoaErrorDomain Code=134190 "(null)" UserInfo={entity=UARemoteDataStorePayload, property=data, reason=Source and destination attribute types are incompatible}
error: storeType: SQLite
CoreData: error: storeType: SQLite
error: configuration: (null)
CoreData: error: configuration: (null)
error: URL: file:///var/mobile/Containers/Data/Application/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/Library/com.urbanairship.no-backup/RemoteData-XXXXXXXXXXXXXXX.sqlite
rlepinski commented 6 months ago

Sorry about missing these issues. New repo and I must not have monitoring setup properly. We have this particular issue fixed in the native iOS release, we just need to bump the version. Hopefully we will get a release out today with that.

michaelschoenbaechler commented 6 months ago

The update has resolved the issue.

Thank you.