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
490 stars 259 forks source link

Sharing post to Wallabag results in "unknown" JSON error #1322

Closed jamietanna closed 1 year ago

jamietanna commented 1 year ago

Issue details

Duplicate?

Have you searched the issues of this repository if your issue is already known? yes/no

Actual behaviour

Attempting to save a new URL results in an error dialog

Expected behaviour

Post is saved

Steps to reproduce the issue

  1. Copy a URL
  2. Share it to Wallabag via Android share intent
  3. See error

Environment details

Logs

Android log:

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.TokenRefreshingInterceptor.getAccessToken(TokenRefreshingInterceptor.java:197)
    at wallabag.apiwrapper.TokenRefreshingInterceptor.getAccessToken(TokenRefreshingInterceptor.java:147)
    at wallabag.apiwrapper.TokenRefreshingInterceptor.intercept(TokenRefreshingInterceptor.java:81)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
    at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
    at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
    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:1012)

wallabag server

Using wallabag.it

Your experience with wallabag Android app

Yes, working great for several years, keep up the excellent work 👏🏽

jamietanna commented 1 year ago

Seems to no longer be happening - may have been an upstream issue. I'll close this for now