Skip to content
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

Recently released update breaks all sync #1049

Closed
shikasta-net opened this issue Sep 1, 2020 · 9 comments
Closed

Recently released update breaks all sync #1049

shikasta-net opened this issue Sep 1, 2020 · 9 comments

Comments

@shikasta-net
Copy link

shikasta-net commented Sep 1, 2020

Issue details

After updating to 2.4.0 of the app, my sync fails part way through.

Duplicate?

I don't see a report of this since the update was released a few days ago.

Actual behaviour

A full update, or even wiping the database, results in a crash part way through import with the error
Unknown error com.squareup.moshi.JsonDataException: Expected a string but was BEGIN_ARRAY at path $._embedded.items[11].published_by[0] Stacktrace: com.squareup.moshi.JsonDataException: Expected a string but was BEGIN_ARRAY at path $._embedded.items[11].published_by[0] at com.squareup.moshi.JsonUtf8Reader.nextString(JsonUtf8Reader.java:644) at com.squareup.moshi.StandardJsonAdapters$10.fromJson(StandardJsonAdapters.java:215) at com.squareup.moshi.StandardJsonAdapters$10.fromJson(StandardJsonAdapters.java:213) at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:137) at com.squareup.moshi.CollectionJsonAdapter.fromJson(CollectionJsonAdapter.java:76) at com.squareup.moshi.CollectionJsonAdapter$2.fromJson(CollectionJsonAdapter.java:53) at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:137) at com.squareup.moshi.ClassJsonAdapter$FieldBinding.read(ClassJsonAdapter.java:194) at com.squareup.moshi.ClassJsonAdapter.fromJson(ClassJsonAdapter.java:156) at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:137) at com.squareup.moshi.CollectionJsonAdapter.fromJson(CollectionJsonAdapter.java:76) at com.squareup.moshi.CollectionJsonAdapter$2.fromJson(CollectionJsonAdapter.java:53) at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:137) at com.squareup.moshi.ClassJsonAdapter$FieldBinding.read(ClassJsonAdapter.java:194) at com.squareup.moshi.ClassJsonAdapter.fromJson(ClassJsonAdapter.java:156) at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:137) at com.squareup.moshi.ClassJsonAdapter$FieldBinding.read(ClassJsonAdapter.java:194) at com.squareup.moshi.ClassJsonAdapter.fromJson(ClassJsonAdapter.java:156) at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:137) at retrofit2.converter.moshi.MoshiResponseBodyConverter.convert(MoshiResponseBodyConverter.java:45) at retrofit2.converter.moshi.MoshiResponseBodyConverter.convert(MoshiResponseBodyConverter.java:27) at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:225) at retrofit2.OkHttpCall.execute(OkHttpCall.java:188) at retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall.execute(DefaultCallAdapterFactory.java:104) at wallabag.apiwrapper.WallabagService.execAndCheckBody(WallabagService.java:1499) at wallabag.apiwrapper.WallabagService.lambda$getArticles$0$WallabagService(WallabagService.java:218) at wallabag.apiwrapper.-$$Lambda$WallabagService$nylw3DAgOM4zumOAh8m95sasuhg.run(Unknown Source:4) at wallabag.apiwrapper.NotFoundPolicy.call(NotFoundPolicy.java:140) at wallabag.apiwrapper.NotFoundPolicy.call(NotFoundPolicy.java:133) at wallabag.apiwrapper.NotFoundPolicy.call(NotFoundPolicy.java:128) at wallabag.apiwrapper.WallabagService.getArticles(WallabagService.java:218) at wallabag.apiwrapper.ArticlesQueryBuilder.execute(ArticlesQueryBuilder.java:282) at wallabag.apiwrapper.ArticlesPageIterator.hasNext(ArticlesPageIterator.java:80) at fr.gaulupeau.apps.Poche.service.workers.ArticleUpdater.performUpdate(ArticleUpdater.java:183) at fr.gaulupeau.apps.Poche.service.workers.ArticleUpdater.update(ArticleUpdater.java:127) at fr.gaulupeau.apps.Poche.service.workers.ArticleUpdateWorker.updateArticles(ArticleUpdateWorker.java:77) at fr.gaulupeau.apps.Poche.service.workers.ArticleUpdateWorker.update(ArticleUpdateWorker.java:37) at fr.gaulupeau.apps.Poche.service.tasks.UpdateArticlesTask.run(UpdateArticlesTask.java:17) at fr.gaulupeau.apps.Poche.service.tasks.ActionRequestTask.run(ActionRequestTask.java:25) at fr.gaulupeau.apps.Poche.service.-$$Lambda$Nf0ej7UkvM-IGhcyH2GG-UaljDo.run(Unknown Source:2) at fr.gaulupeau.apps.Poche.service.TaskService.run(TaskService.java:154) at fr.gaulupeau.apps.Poche.service.TaskService.lambda$gjfracnqY8x0_-mrxsx0oqjQmgk(Unknown Source:0) at fr.gaulupeau.apps.Poche.service.-$$Lambda$TaskService$gjfracnqY8x0_-mrxsx0oqjQmgk.run(Unknown Source:2) at java.lang.Thread.run(Thread.java:764)

Expected behaviour

Syncing completes even if there were errors?

Environment details

  • wallabag app version: 2.4.0 (226)
  • wallabag app installation source (e.g. Gplay, F-Droid, manual): google play store
  • Android OS version: 8.1.0
  • Android ROM (e.g. stock, LineageOS, SlimRom,…): stock
  • Android hardware: BlackBerry keyone
  • wallabag server version: 2.3.8 - in docker
  • Do you have Two-Factor-Authentication enabled?: no

Logs

wallabag server

Nothing visible in the server log but it's inside docker so I may not have found it.

Web server

Just a sequence of GET /api/entries.json up to page 39 and then stops.

Your experience with wallabag Android app

All worked fine before the update.

@shikasta-net shikasta-net changed the title recent update breaks all sync Recently released update breaks all sync Sep 1, 2020
@di72nn
Copy link
Member

di72nn commented Sep 1, 2020

#887 (comment).

@shikasta-net
Copy link
Author

Running select id, url, published_by from wallabag_entry where published_by like '%;a:%'; finds one entry,
1308 | https://www.elitedaily.com/women/why-its-hard-to-talk-feelings/1023633 | a:1:{i:0;a:1:{i:0;s:9:"Eve Stern";}}
but re-fetching content doesn't repair it.

@shikasta-net
Copy link
Author

Manually replacing a:1:{i:0;a:1:{i:0;s:9:"Eve Stern";}} with a:1:{i:0;s:9:"Eve Stern";} in the database fixes the issue. Is there a way to auto-repair these (or handle them in the app)?

@di72nn
Copy link
Member

di72nn commented Sep 1, 2020

Is there a way to auto-repair these

No, it's not a very common problem.

or handle them in the app

Maybe in the future.

Server 2.3.8 fetched this article without authors, so I guess the problem is a remnant of old parsing.

re-fetching content doesn't repair it

Maybe re-fetching doesn't update authors if none found. I didn't know that.

@di72nn di72nn closed this as completed Sep 1, 2020
@anarcat
Copy link

anarcat commented Sep 9, 2020

wait is this fixed? because it's breaking updates for me, which is especially problematic when setting up a new device. in that case, the full sync totally fails and the device doesn't get any articles at all... shouldn't the app at least handle the exception?

equivalent issue on the server side wallabag/wallabag#4411

@di72nn
Copy link
Member

di72nn commented Sep 10, 2020

wait is this fixed?

@anarcat it's not really a client issue - the server contains incorrect data.

shouldn't the app at least handle the exception?

It doesn't crash, does it? The app presents you with a searchable error message.
It's not perfect, but it is a bit problematic to fix in the app. This problem should die down eventually when everyone fixes their old problematic articles.

This comment explains how to fix it.

@anarcat
Copy link

anarcat commented Sep 10, 2020

It doesn't crash, does it? The app presents you with a searchable error message.

The sync crashes: it completely fails to download any content, and makes the entire app unusable.

It's not perfect, but it is a bit problematic to fix in the app. This problem should die down eventually when everyone fixes their old problematic articles.

Maybe a server-side upgrade should fix those kind of brokenness?

@di72nn
Copy link
Member

di72nn commented Sep 10, 2020

Maybe a server-side upgrade should fix those kind of brokenness?

Sure, but it's not up to me.

@anarcat
Copy link

anarcat commented Sep 10, 2020

Sure, but it's not up to me.

Fair enough. At least we have wallabag/wallabag#4411 that we can hope get fixed on the server side...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants