wallabag / android-app

Android application to read your articles saved in your wallabag. You can also easily add new articles.
https://www.wallabag.org
GNU General Public License v3.0
483 stars 259 forks source link

Offline queue is blocked if server fails to add URL #483

Closed ngosang closed 4 years ago

ngosang commented 7 years ago

wallabag-app master branch

1) Open this URL in the smartphone browser => http://lamiradadelreplicante.com/2017/03/12/15-anos-de-arch-linux/ 2) Share => Add to Wallabag 3) Wallabag app shows a notification with HTTP error 500. I can't perform fast or full updates. The app is broken until I delete all data in Android settings.

Debug trace:

I/WallabagService: intercept() unsuccessful response; code: 500
W/MainService: syncOfflineQueue() com.di72nn.stuff.wallabag.apiwrapper.exceptions.UnsuccessfulResponseException
               com.di72nn.stuff.wallabag.apiwrapper.exceptions.UnsuccessfulResponseException: HTTP response: 500 Internal Server Error
                   at com.di72nn.stuff.wallabag.apiwrapper.WallabagService.checkResponse(WallabagService.java:812)
                   at com.di72nn.stuff.wallabag.apiwrapper.WallabagService.addArticle(WallabagService.java:594)
                   at com.di72nn.stuff.wallabag.apiwrapper.WallabagService.access$400(WallabagService.java:25)
                   at com.di72nn.stuff.wallabag.apiwrapper.WallabagService$AddArticleBuilder.execute(WallabagService.java:274)
                   at com.di72nn.stuff.wallabag.apiwrapper.WallabagService.addArticle(WallabagService.java:574)
                   at fr.gaulupeau.apps.Poche.network.WallabagServiceWrapper.addArticle(WallabagServiceWrapper.java:100)
                   at fr.gaulupeau.apps.Poche.service.MainService.syncOfflineQueue(MainService.java:250)
                   at fr.gaulupeau.apps.Poche.service.MainService.onHandleIntent(MainService.java:85)
                   at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
                   at android.os.Handler.dispatchMessage(Handler.java:102)
                   at android.os.Looper.loop(Looper.java:135)
                   at android.os.HandlerThread.run(HandlerThread.java:61)
I/MainService: syncOfflineQueue() itemError: UNKNOWN
I/MainService: syncOfflineQueue() the itemError is a showstopper; breaking
tcitworld commented 7 years ago

Please have a look on your server logs why this link provoked a 500 error. It doesn't do that on my side.

ngosang commented 7 years ago

I also reported this => https://github.com/wallabag/wallabag/issues/2976

ngosang commented 7 years ago

Anyway this is blocking the whole app. I think you should show the notification but don't add the link to the queue.

di72nn commented 7 years ago

The app doesn't skip errors (read: lose) important changes.

It may be a good idea to:

  1. Mark as "failed" offline changes that fail to sync.
  2. Add UI for managing (retry/remove) "failed" offline changes.

However, I'm not aware of any possible sync errors that do not involve broken server configuration. So, fix your server.

ngosang commented 7 years ago

@di72nn It's happening again. Try with this link (I know it's pdf but wallabag web doesn't fails) => http://cs229.stanford.edu/proj2014/David%20Montague,%20Algorithmic%20Trading%20of%20Futures%20via%20Machine%20Learning.pdf

Strubbl commented 7 years ago

@ngosang So you found a bug in wallabag core api.

if i add via app:

[2017-03-15 22:44:02] request.CRITICAL: Uncaught PHP Exception Exception: "Object list not found. Possible secured file." at /home/wallabag/vendor/smalot/pdfparser/src/Smalot/PdfParser/Parser.php line 98 {"exception":"[object] (Exception(code: 0): Object list not found. Possible secured file. at /home/wallabag/vendor/smalot/pdfparser/src/Smalot/PdfParser/Parser.php:98)"} []

If i add via web interface exception is caught by the web-wallabag:

[2017-03-15 22:45:36] app.ERROR: Error while saving an entry {"exception":"[object] (Exception(code: 0): Object list not found. Possible secured file. at /home/wallabag/vendor/smalot/pdfparser/src/Smalot/PdfParser/Parser.php:98)","entry":"[object] (Wallabag\\CoreBundle\\Entity\\Entry: {})"} []
di72nn commented 7 years ago

@Strubbl can you report it?

di72nn commented 4 years ago

Improved in #915. Continue discussion it #905.