-
Notifications
You must be signed in to change notification settings - Fork 18
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
Exception thrown after the content type is changed #98
Comments
Can you please post the entire stacktrace? |
This probably happens due to #97 - since the upgrade process fails (at runtime), the generated code does not correspond to your schema. |
Rest of the stacktrace:
This is trigerred by executing the following code: |
No, this problem happened with freshly downloaded schema (empty local db before sync). |
What do you mean by freshly downloaded schema? if the model existed and you've changed it, it is likely that a vault db (even though empty) existed beforehand. You can easily confirm this by simply uninstalling+reinstalling the app, and checking if the exception still happens. |
I meant app was removed on device and then freshly installed. I also just noticed this happens when there is no data from contentful synced yet. |
Can you provide a sample project where this issue reproduces? |
We probably need to work on the same contentful dataset. Maybe it will be easier if we move discussion to the priv? |
👍 please ping support@contentful.com, I'll pull the ticket once you do. Thanks! |
It seems this problem exists when running on device with Android 6.0 prerelease version. I tried Android 5.1.1 and cannot trigger this exception anymore. I'd bet a new sqlite version on Android 6.0 is the cause. |
I added a new field into existing content type. Model object was updated to reflect this field. Also I had previously many entries created for this content type. I got then the following exception in ModelHelper of that content type (fromCursor method):
Caused by: java.lang.IllegalStateException: Couldn't read row 0, col 6 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it. at android.database.CursorWindow.nativeGetString(Native Method) at android.database.CursorWindow.getString(CursorWindow.java:438) at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:51)
I think a null check should be added somewhere inside the appendFromCursor method of com.contentful.vault.compiler.ModelInjection class.
The text was updated successfully, but these errors were encountered: