Android-app: JsonEncodingException from Android app

Created on 27 May 2020  Â·  10Comments  Â·  Source: wallabag/android-app

Issue details

I'm experiencing the same error as described in #668 but open a new issue as requested in the original issue.
I get this error on a self-hosted wallabag instance with the android app. initially, everything went fine, now I receive the error

com.squareup.moshi.JsonEncodingException: Use JsonReader.setLenient(true) to accept malformed JSON at path $

no articles can be saved.

I wonder whether it might help to set 'JsonReader.setLenient' to true in some config file. If so, which and how?

Duplicate?

yes, see #668

Actual behaviour

I add an article and it is not added when using the android app. Instead, I receive the mentioned error.

Expected behaviour

The article is added with no error.

Steps to reproduce the issue

  1. Add an article via the context menu or manually in the app. (On a desktop browser without the app, adding an article works.)

Environment details

  • wallabag app version: 2.3.0 (219)
  • wallabag app installation source (e.g. Gplay, F-Droid, manual): GPlay
  • Android OS version: 9
  • Android ROM (e.g. stock, LineageOS, SlimRom,…): EMUI 9.1.0
  • Android hardware: P10 Plus
  • wallabag server version: 2.3.8
  • Do you have Two-Factor-Authentication enabled?: no

Your experience with wallabag Android app

Have you had any luck using wallabag Android app before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)

Yes :)

Most helpful comment

You need to check the server logs for errors. Seems like the server fails to save an article and responds with some error message instead of JSON.

I wonder whether it might help to set 'JsonReader.setLenient' to _true_ in some config file. If so, which and how?

Don't mind that, the underlying library suggest a workaround that's not really applicable here.

Also, you may install our beta release (available in releases or opt-in in google play). It won't solve the problem, but it'll at least add some details to the error notification.

All 10 comments

You need to check the server logs for errors. Seems like the server fails to save an article and responds with some error message instead of JSON.

I wonder whether it might help to set 'JsonReader.setLenient' to _true_ in some config file. If so, which and how?

Don't mind that, the underlying library suggest a workaround that's not really applicable here.

Also, you may install our beta release (available in releases or opt-in in google play). It won't solve the problem, but it'll at least add some details to the error notification.

Great, thanks for looking into this!
I'll look for the server logs when back at my desktop, but here's already the detailed error message from the beta app:

Unbekannter Fehler
com.squareup.moshi.JsonEncodingException: Use JsonReader.setLenient(true) to accept malformed JSON at path $
Stacktrace:
com.squareup.moshi.JsonEncodingException: Use JsonReader.setLenient(true) to accept malformed JSON at path $
    at com.squareup.moshi.JsonReader.syntaxError(JsonReader.java:233)
    at com.squareup.moshi.JsonUtf8Reader.checkLenient(JsonUtf8Reader.java:1051)
    at com.squareup.moshi.JsonUtf8Reader.doPeek(JsonUtf8Reader.java:366)
    at com.squareup.moshi.JsonUtf8Reader.peek(JsonUtf8Reader.java:193)
    at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:134)
    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:1496)
    at wallabag.apiwrapper.WallabagService.addArticle(WallabagService.java:233)
    at wallabag.apiwrapper.AddArticleBuilder.execute(AddArticleBuilder.java:73)
    at wallabag.apiwrapper.WallabagService.addArticle(WallabagService.java:196)
    at fr.gaulupeau.apps.Poche.service.MainService.syncOfflineQueue(MainService.java:282)
    at fr.gaulupeau.apps.Poche.service.MainService.onHandleIntent(MainService.java:90)
    at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:76)
    at android.os.Handler.dispatchMessage(Handler.java:112)
    at android.os.Looper.loop(Looper.java:216)
    at android.os.HandlerThread.run(HandlerThread.java:65)

So finally, I managed to look into that log file. And gosh, it is the biggest log file I've ever seen! It's about 600MB! Is that normal? Can I delete it? Is there any housekeeping function that might fix that?

So anyways, here is the logfile excerpt for the last captured lines. Hope this helps to identify the issue.

[2020-05-27 11:20:12] graby.INFO: Success ? 1 {"is_success":true} []


[2020-05-27 11:20:12] graby.DEBUG: Body after cleanupHtml, before cleanupXss {


[2020-05-27 11:20:12] graby.INFO: Filtering HTML to remove XSS [] []
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: Folder used for that Entry id {"folder":"wallabag/web/assets/images/3/c/3c270320","entryId":2199} []
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: working on image: https:///assets/images/3/c/3c270320/9639b4c9.jpeg [] []
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: Checking extension {"ext":"jpeg","header":"image/jpeg"} []
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: Re-creating jpg [] []
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: working on image: https:///assets/images/3/c/3c270320/06f0f05a.jpeg [] []
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: Checking extension {"ext":"jpeg","header":"image/jpeg"} []
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: Re-creating jpg [] []
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: working on image: https:///assets/images/3/c/3c270320/5daffa99.jpeg [] []
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: Checking extension {"ext":"jpeg","header":"image/jpeg"} [] 
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: Re-creating jpg [] []
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: working on image: https:///assets/images/3/c/3c270320/e233d34c.jpeg [] []
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: Checking extension {"ext":"jpeg","header":"image/jpeg"} []
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: Re-creating jpg [] [] 
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: working on image: https://www. [] []
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: Checking extension {"ext":null,"header":"text/html; charset=utf-8"} []
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: Checking extension (alternative) {"ext":null} []
[2020-05-27 11:20:12] app.ERROR: DownloadImages: Processed image with not allowed extension. Skipping: https://www. [] []
[2020-05-27 11:20:12] app.ERROR: DownloadImages: Error while regenerating image {"path":"wallabag/web/assets/images/3/c/3c270320/954dd1f2."} []
[2020-05-27 11:20:12] app.DEBUG: DownloadImagesSubscriber: updated html. [] []
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: Folder used for that Entry id {"folder":"wallabag/web/assets/images/3/c/3c270320","entryId":2199} []
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: working on image: https:///assets/images/3/c/3c270320/a8f9f550.jpeg [] []
[2020-05-27 11:20:12] app.DEBUG: DownloadImages: Checking extension {"ext":"jpeg","header":"image/jpeg"} []
[2020-05-27 11:20:13] app.DEBUG: DownloadImages: Re-creating jpg [] []
[2020-05-27 11:20:13] app.DEBUG: DownloadImagesSubscriber: update preview picture. [] []
[2020-05-27 11:22:11] request.INFO: Matched route "api_post_entries". {"route":"api_post_entries","route_parameters":{"_controller":"Wallabag\\ApiBundle\\Controller\\EntryRestController::postEntriesAction","_format":"json","_route":"api_post_entries"},"request_uri":"https:///api/entries.json","method":"POST"} []
[2020-05-27 11:22:11] app.DEBUG: Restricted access config enabled? {"enabled":0} []
[2020-05-27 11:22:11] graby.INFO: . looking for site config for example.com in primary folder {"host":"example.com"} []
[2020-05-27 11:22:11] graby.INFO: Appending site config settings from global.txt [] []
[2020-05-27 11:22:11] graby.INFO: . looking for site config for global in primary folder {"host":"global"} []
[2020-05-27 11:22:11] graby.INFO: ... found site config global.txt {"host":"global.txt"} []
[2020-05-27 11:22:11] graby.INFO: Cached site config with key: example.com {"key":"example.com"} []
[2020-05-27 11:22:11] graby.INFO: . looking for site config for global in primary folder {"host":"global"} [] 
[2020-05-27 11:22:11] graby.INFO: ... found site config global.txt {"host":"global.txt"} []
[2020-05-27 11:22:11] graby.INFO: Appending site config settings from global.txt [] [] 
[2020-05-27 11:22:11] graby.INFO: Cached site config with key: global {"key":"global"} [] 
[2020-05-27 11:22:11] graby.INFO: Cached site config with key: example.com.merged {"key":"example.com.merged"} []
[2020-05-27 11:22:11] graby.DEBUG: Actual site config {"siteConfig":"[object] (Graby\\SiteConfig\\SiteConfig: {\"title\":[\"//meta[@property=\\\"og:title\\\"]/@content\"],\"body\":[],\"author\":[],\"date\":[\"//meta[@property=\\\"article:published_time\\\"]/@content\"],\"strip\":[],\"strip_attr\":[],\"src_lazy_load_attr\":null,\"strip_id_or_class\":[],\"strip_image_src\":[\"doubleclick.net\"],\"native_ad_clue\":[],\"http_header\":[],\"tidy\":null,\"autodetect_on_failure\":null,\"prune\":null,\"test_url\":[],\"if_page_contains\":[],\"single_page_link\":[],\"next_page_link\":[],\"parser\":null,\"find_string\":[\"<amp-img\",\"</amp-img>\",\"<amp-img\",\"</amp-img>\"],\"replace_string\":[\"<img\",\"<!-- nothing -->\",\"<img\",\"<!-- nothing -->\"],\"cache_key\":null,\"requires_login\":false,\"not_logged_in_xpath\":false,\"login_uri\":false,\"login_username_field\":false,\"login_password_field\":false,\"login_extra_fields\":[],\"skip_json_ld\":false})"} []
[2020-05-27 11:22:11] graby.INFO: Strings replaced: 0 (find_string and/or replace_string) {"count":0} []


[2020-05-27 11:22:11] graby.DEBUG: HTML after site config strings replacements

[2020-05-27 11:22:11] graby.INFO: Attempting to parse HTML with libxml {"parser":"libxml"} []
[2020-05-27 11:22:11] graby.INFO: Body size after Readability: 12393 {"length":12393} [] 


[2020-05-27 11:22:11] graby.INFO: Trying //meta[@property="og:title"]/@content for title {"pattern":"//meta[@property=\"og:title\"]/@content"} []
[2020-05-27 11:22:11] graby.INFO: Trying //meta[@property="article:published_time"]/@content for date {"pattern":"//meta[@property=\"article:published_time\"]/@content"} []
[2020-05-27 11:22:11] graby.INFO: Trying //html[@lang]/@lang for language {"pattern":"//html[@lang]/@lang"} [] 
[2020-05-27 11:22:11] graby.INFO: Trying //meta[@name="DC.language"]/@content for language {"pattern":"//meta[@name=\"DC.language\"]/@content"} []


[2020-05-27 11:22:11] graby.DEBUG: DOM after site config stripping


[2020-05-27 11:22:11] graby.INFO: Using Readability [] []
[2020-05-27 11:22:11] graby.INFO: Detected title:  {"title":""} []
[2020-05-27 11:22:11] graby.INFO: Date is bad (strtotime failed):  {"date":null} []
[2020-05-27 11:22:11] graby.INFO: Detecting body [] []
[2020-05-27 11:22:11] graby.INFO: Pruning content [] []
[2020-05-27 11:22:11] graby.INFO: Success ? 1 {"is_success":true} []


[2020-05-27 11:22:11] graby.INFO: Success ? 1 {"is_success":true} []


[2020-05-27 11:22:11] graby.INFO: Filtering HTML to remove XSS [] []
[2020-05-27 11:22:11] app.DEBUG: DownloadImages: Folder used for that Entry id {"folder":"wallabag/web/assets/images/3/c/3c270320","entryId":2199} []
[2020-05-27 11:22:11] app.DEBUG: DownloadImages: working on image: https:///assets/images/3/c/3c270320/3f5ccb46.jpeg [] []
[2020-05-27 11:22:11] app.DEBUG: DownloadImages: Checking extension {"ext":"jpeg","header":"image/jpeg"} []
[2020-05-27 11:22:11] app.DEBUG: DownloadImages: Re-creating jpg [] []
[2020-05-27 11:22:11] app.DEBUG: DownloadImages: working on image: https:///assets/images/3/c/3c270320/33441794.jpeg [] [] 
[2020-05-27 11:22:11] app.DEBUG: DownloadImages: Checking extension {"ext":"jpeg","header":"image/jpeg"} []
[2020-05-27 11:22:11] app.DEBUG: DownloadImages: Re-creating jpg [] []
[2020-05-27 11:22:11] app.DEBUG: DownloadImages: working on image: https:///assets/images/3/c/3c270320/34e2cf9f.jpeg [] []
[2020-05-27 11:22:11] app.DEBUG: DownloadImages: Checking extension {"ext":"jpeg","header":"image/jpeg"} []
[2020-05-27 11:22:11] app.DEBUG: DownloadImages: Re-creating jpg [] [] 
[2020-05-27 11:22:11] app.DEBUG: DownloadImages: working on image: https:///assets/images/3/c/3c270320/adf2ce6b.jpeg [] [] 
[2020-05-27 11:22:11] app.DEBUG: DownloadImages: Checking extension {"ext":"jpeg","header":"image/jpeg"} []
[2020-05-27 11:22:11] app.DEBUG: DownloadImages: Re-creating jpg [] []
[2020-05-27 11:22:11] app.DEBUG: DownloadImages: working on image: https://www. [] []
[2020-05-27 11:22:12] app.DEBUG: DownloadImages: Checking extension {"ext":null,"header":"text/html; charset=utf-8"} []
[2020-05-27 11:22:12] app.DEBUG: DownloadImages: Checking extension (alternative) {"ext":null} []
[2020-05-27 11:22:12] app.ERROR: DownloadImages: Processed image with not allowed extension. Skipping: https://www. [] []
[2020-05-27 11:22:12] app.ERROR: DownloadImages: Error while regenerating image {"path":"wallabag/web/assets/images/3/c/3c270320/954dd1f2."} []
[2020-05-27 11:22:12] app.DEBUG: DownloadImagesSubscriber: updated html. [] []
[2020-05-27 11:22:12] app.DEBUG: DownloadImages: Folder used for that Entry id {"folder":"wallabag/web/assets/images/3/c/3c270320","entryId":2199} []
[2020-05-27 11:22:12] app.DEBUG: DownloadImages: working on image: https:///assets/images/3/c/3c270320/65094eec.jpeg [] []
[2020-05-27 11:22:12] app.DEBUG: DownloadImages: Checking extension {"ext":"jpeg","header":"image/jpeg"} []
[2020-05-27 11:22:12] app.DEBUG: DownloadImages: Re-creating jpg [] []
[2020-05-27 11:22:12] app.DEBUG: DownloadImagesSubscriber: update preview picture. [] []
[2020-05-28 08:34:03] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /userum/mzTnCgeREewWEQi"" at wallabag/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 128 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /userum/mzTnCgeREewWEQi\" at wallabag/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:128, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0):  at wallabag/var/cache/prod/appProdProjectContainerUrlMatcher.php:1012)"} []
[2020-05-30 07:57:51] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /userum/mzTnCgeREewWEQi"" at wallabag/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 128 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /userum/mzTnCgeREewWEQi\" at wallabag/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:128, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0):  at wallabag/var/cache/prod/appProdProjectContainerUrlMatcher.php:1012)"} []
[2020-05-31 08:08:11] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /userum/mzTnCgeREewWEQi"" at wallabag/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 128 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /userum/mzTnCgeREewWEQi\" at wallabag/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:128, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0):  at wallabag/var/cache/prod/appProdProjectContainerUrlMatcher.php:1012)"} []
[2020-06-02 08:46:33] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /userum/mzTnCgeREewWEQi"" at wallabag/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 128 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /userum/mzTnCgeREewWEQi\" at wallabag/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:128, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0):  at wallabag/var/cache/prod/appProdProjectContainerUrlMatcher.php:1012)"} []

OK, I dared to just delete prod.log and had a clean new one. After using the app to add an article, here's the fresh log (cleaned of content)

[2020-06-03 11:30:42] request.INFO: Matched route "api_post_entries". {"route":"api_post_entries","route_parameters":{"_controller":"Wallabag\\ApiBundle\\Controller\\EntryRestController::postEntriesAction","_format":"json","_route":"api_post_entries"},"request_uri":"https://bla.com/api/entries.json","method":"POST"} []
[2020-06-03 11:30:42] app.ERROR: Authentication failure for user "", from IP "37.201.224.41", with UA: "okhttp/4.4.1". [] []
[2020-06-03 11:30:42] request.INFO: Matched route "api_post_entries". {"route":"api_post_entries","route_parameters":{"_controller":"Wallabag\\ApiBundle\\Controller\\EntryRestController::postEntriesAction","_format":"json","_route":"api_post_entries"},"request_uri":"https://bla.com/api/entries.json","method":"POST"} []
[2020-06-03 11:30:43] app.DEBUG: Restricted access config enabled? {"enabled":0} []
[2020-06-03 11:30:43] graby.INFO: . looking for site config for viva-bla.com in primary folder {"host":"viva-bla.com"} []
[2020-06-03 11:30:43] graby.INFO: Appending site config settings from global.txt [] []
[2020-06-03 11:30:43] graby.INFO: . looking for site config for global in primary folder {"host":"global"} []
[2020-06-03 11:30:43] graby.INFO: ... found site config global.txt {"host":"global.txt"} []
[2020-06-03 11:30:43] graby.INFO: Cached site config with key: viva-bla.com {"key":"viva-bla.com"} []
[2020-06-03 11:30:43] graby.INFO: . looking for site config for global in primary folder {"host":"global"} []
[2020-06-03 11:30:43] graby.INFO: ... found site config global.txt {"host":"global.txt"} []
[2020-06-03 11:30:43] graby.INFO: Appending site config settings from global.txt [] []
[2020-06-03 11:30:43] graby.INFO: Cached site config with key: global {"key":"global"} []
[2020-06-03 11:30:43] graby.INFO: Cached site config with key: viva-bla.com.merged {"key":"viva-bla.com.merged"} []
[2020-06-03 11:30:43] graby.DEBUG: Actual site config {"siteConfig":"[object] (Graby\\SiteConfig\\SiteConfig: {\"title\":[\"//meta[@property=\\\"og:title\\\"]/@content\"],\"body\":[],\"author\":[],\"date\":[\"//meta[@property=\\\"article:published_time\\\"]/@content\"],\"strip\":[],\"strip_attr\":[],\"src_lazy_load_attr\":null,\"strip_id_or_class\":[],\"strip_image_src\":[\"doubleclick.net\"],\"native_ad_clue\":[],\"http_header\":[],\"tidy\":null,\"autodetect_on_failure\":null,\"prune\":null,\"test_url\":[],\"if_page_contains\":[],\"single_page_link\":[],\"next_page_link\":[],\"parser\":null,\"find_string\":[\"<amp-img\",\"</amp-img>\",\"<amp-img\",\"</amp-img>\"],\"replace_string\":[\"<img\",\"<!-- nothing -->\",\"<img\",\"<!-- nothing -->\"],\"cache_key\":null,\"requires_login\":false,\"not_logged_in_xpath\":false,\"login_uri\":false,\"login_username_field\":false,\"login_password_field\":false,\"login_extra_fields\":[],\"skip_json_ld\":false})"} []
[2020-06-03 11:30:43] graby.INFO: Strings replaced: 0 (find_string and/or replace_string) {"count":0} []
[2020-06-03 11:30:43] graby.DEBUG: HTML after site config strings replacements {"html":"<p>"} []
[2020-06-03 11:30:43] graby.INFO: Attempting to parse HTML with libxml {"parser":"libxml"} []
[2020-06-03 11:30:43] graby.INFO: Body size after Readability: 12393 {"length":12393} []
[2020-06-03 11:30:43] graby.DEBUG: Body after Readability {"dom_saveXML":"<?xml version=\"1.0\" standalone=\"yes\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\"></html>\n"} []
[2020-06-03 11:30:43] graby.INFO: Using Readability [] []
[2020-06-03 11:30:43] graby.INFO: Detected title:  {"title":""} []
[2020-06-03 11:30:43] graby.INFO: Date is bad (strtotime failed):  {"date":null} []
[2020-06-03 11:30:43] graby.INFO: Detecting body [] []
[2020-06-03 11:30:43] graby.INFO: Pruning content [] []
[2020-06-03 11:30:43] graby.INFO: Success ? 1 {"is_success":true} []
[2020-06-03 11:30:43] graby.DEBUG: Body after cleanupHtml, before cleanupXss {"html":"<head><title/></head><body class=\"readabilityBody\" readability=\"230\">\n<p></p>\n</body>"} []
[2020-06-03 11:30:43] graby.INFO: Filtering HTML to remove XSS [] []
[2020-06-03 11:30:43] app.DEBUG: DownloadImages: Folder used for that Entry id {"folder":"/_tools/wallabag/web/assets/images/3/c/3c270320","entryId":2199} []
[2020-06-03 11:30:43] app.DEBUG: DownloadImages: working on image: https://bla.com/assets/images/3/c/3c270320/2e9a0bed.jpeg [] []
[2020-06-03 11:30:43] app.DEBUG: DownloadImages: Checking extension {"ext":"jpeg","header":"image/jpeg"} []
[2020-06-03 11:30:43] app.DEBUG: DownloadImages: Re-creating jpg [] []
[2020-06-03 11:30:43] app.DEBUG: DownloadImages: working on image: https://bla.com/assets/images/3/c/3c270320/77a5c81f.jpeg [] []
[2020-06-03 11:30:43] app.DEBUG: DownloadImages: Checking extension {"ext":"jpeg","header":"image/jpeg"} []
[2020-06-03 11:30:43] app.DEBUG: DownloadImages: Re-creating jpg [] []
[2020-06-03 11:30:43] app.DEBUG: DownloadImages: working on image: https://bla.com/assets/images/3/c/3c270320/a3b8025f.jpeg [] []
[2020-06-03 11:30:43] app.DEBUG: DownloadImages: Checking extension {"ext":"jpeg","header":"image/jpeg"} []
[2020-06-03 11:30:43] app.DEBUG: DownloadImages: Re-creating jpg [] []
[2020-06-03 11:30:43] app.DEBUG: DownloadImages: working on image: https://bla.com/assets/images/3/c/3c270320/08a4d07d.jpeg [] []
[2020-06-03 11:30:43] app.DEBUG: DownloadImages: Checking extension {"ext":"jpeg","header":"image/jpeg"} []
[2020-06-03 11:30:43] app.DEBUG: DownloadImages: Re-creating jpg [] []
[2020-06-03 11:30:43] app.DEBUG: DownloadImages: working on image: https://bla.com/n/511/168/bla [] []
[2020-06-03 11:30:44] app.DEBUG: DownloadImages: Checking extension {"ext":null,"header":"text/html; charset=utf-8"} []
[2020-06-03 11:30:44] app.DEBUG: DownloadImages: Checking extension (alternative) {"ext":null} []
[2020-06-03 11:30:44] app.ERROR: DownloadImages: Processed image with not allowed extension. Skipping: https://bla.com/n/511/168/bla [] []
[2020-06-03 11:30:44] app.ERROR: DownloadImages: Error while regenerating image {"path":"/_tools/wallabag/web/assets/images/3/c/3c270320/954dd1f2."} []
[2020-06-03 11:30:44] app.DEBUG: DownloadImagesSubscriber: updated html. [] []
[2020-06-03 11:30:44] app.DEBUG: DownloadImages: Folder used for that Entry id {"folder":"/_tools/wallabag/web/assets/images/3/c/3c270320","entryId":2199} []
[2020-06-03 11:30:44] app.DEBUG: DownloadImages: working on image: https://bla.com/assets/images/3/c/3c270320/5c3dd1b3.jpeg [] []
[2020-06-03 11:30:44] app.DEBUG: DownloadImages: Checking extension {"ext":"jpeg","header":"image/jpeg"} []
[2020-06-03 11:30:44] app.DEBUG: DownloadImages: Re-creating jpg [] []
[2020-06-03 11:30:44] app.DEBUG: DownloadImagesSubscriber: update preview picture. [] []

fun fact: the URL captured in this fresh log is NOT the one I just added in the app. It is an older one I added on the app before (not sure whether immediately before). So somehow the queue in the app seems to be clogged.

It's about 600MB! Is that normal? Can I delete it? Is there any housekeeping function that might fix that?

I'm not knowledgeable enough of the server workings to tell, but logging seems excessive for normal usage. You might wanna look into changing verbosity / log level parameters after the issue is dealt with.

Neither of the logs seem to have errors that may cause that problem in the app. Can you also check your web server logs?

the URL captured in this fresh log is NOT the one I just added in the app. It is an older one I added on the app before (not sure whether immediately before).

Is this older URL saved (check web UI)?

So somehow the queue in the app seems to be clogged.

The app never drops URLs if it doesn't get confirmation that the URL is saved by the server.
You can go to Settings -> Miscellaneous -> Local changes and press "Dump to file" to see the contents of the app queue.

OK cool, this helped me somewhat. As I just want my wallabag to work somehow, I did the following after reading your hints:

  • delete the prod.log file
  • go into the app and press the "delete last article" option in the Settings -> Miscellaneous -> Local changes section multiple times
  • delete the article manually in the queue that was mentioned in the log all the time with its URL.

Especially after this last step, it started working again. So somehow this one URL seems to mess up the app and blocked everything. I can provide it via PM, if needed, to investigate this further.

Send it to

I don't think I received any mail, but the issue is resolved anyway.

Hi, this was solved indeed for a while, now it reappeared and I have no idea about any URL that might have caused this issue. I just repeated the steps above and deleted
WALLABAG_DIR/var/logs/prod.log
But still, the App (2.4.2 / 228) doesn't sync correctly and I recieve the moshi error when trying to sync

Unknown Error
com.squareup.moshi.JsonEncodingException: Use JsonReader.setLenient(true) to accept malformed JSON at path $
Stacktrace:
com.squareup.moshi.JsonEncodingException: Use JsonReader.setLenient(true) to accept malformed JSON at path $
 at com.squareup.moshi.JsonReader.syntaxError(JsonReader.java:233)
 at com.squareup.moshi.JsonUtf8Reader.checkLenient(JsonUtf8Reader.java:1051)
 at com.squareup.moshi.JsonUtf8Reader.doPeek(JsonUtf8Reader.java:366)
 at com.squareup.moshi.JsonUtf8Reader.peek(JsonUtf8Reader.java:193)
 at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:134)
 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.addArticle(WallabagService.java:236)
 at wallabag.apiwrapper.AddArticleBuilder.execute(AddArticleBuilder.java:73)
 at fr.gaulupeau.apps.Poche.service.workers.OfflineChangesSynchronizer.addLink(OfflineChangesSynchronizer.java:252)
 at fr.gaulupeau.apps.Poche.service.workers.OfflineChangesSynchronizer.syncOfflineQueue(OfflineChangesSynchronizer.java:146)
 at fr.gaulupeau.apps.Poche.service.workers.OfflineChangesSynchronizer.synchronize(OfflineChangesSynchronizer.java:68)
 at fr.gaulupeau.apps.Poche.service.tasks.SyncOfflineChangesTask.run(SyncOfflineChangesTask.java:17)
 at fr.gaulupeau.apps.Poche.service.tasks.ActionRequestTask.run(ActionRequestTask.java:25)
 at fr.gaulupeau.apps.Poche.service.-$$Lambda$0cveUIqKhxWljSld0gpOhfhYfj0.run(Unknown Source:2)
 at fr.gaulupeau.apps.Poche.service.TaskService.run(TaskService.java:162)
 at fr.gaulupeau.apps.Poche.service.TaskService.lambda$PgumDII_lptJcUDKRD70B1M_ER8(Unknown Source:0)
 at fr.gaulupeau.apps.Poche.service.-$$Lambda$TaskService$PgumDII_lptJcUDKRD70B1M_ER8.run(Unknown Source:2)
 at java.lang.Thread.run(Thread.java:784)

If it is still relevant:
Export local changes (Settings -> Miscellaneous -> Local changes -> Dump to file), get URL from the first item and try adding it using web UI. It will likely fail, the problem may be dealt with separately.
The problematic item can be removed Settings -> Miscellaneous -> Local changes -> Remove first local queue item.

Was this page helpful?
0 / 5 - 0 ratings