mastodon4j
mastodon4j copied to clipboard
Non-numeric account IDs break parsing
Pleroma uses user IDs like 9unzDNYyW6HRdNjoS8
, which causes Account
parsing to break because it requires them to be numeric:
Caused by: twitter2mastodon.com.sys1yagi.mastodon4j.api.exception.Mastodon4jRequestException: twitter2mastodon.com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: For input string: "9unzDNYyW6HRdNjoS8"
at twitter2mastodon.com.sys1yagi.mastodon4j.MastodonRequest.execute(MastodonRequest.kt:59)
at twitter2mastodon.RuntimeConfiguration.lambda$finishUserSetup$2(RuntimeConfiguration.java:166)
... 42 common frames omitted
Caused by: twitter2mastodon.com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: For input string: "9unzDNYyW6HRdNjoS8"
at twitter2mastodon.com.google.gson.internal.bind.TypeAdapters$11.read(TypeAdapters.java:307)
at twitter2mastodon.com.google.gson.internal.bind.TypeAdapters$11.read(TypeAdapters.java:297)
at twitter2mastodon.com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
at twitter2mastodon.com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
at twitter2mastodon.com.google.gson.Gson.fromJson(Gson.java:963)
at twitter2mastodon.com.google.gson.Gson.fromJson(Gson.java:928)
at twitter2mastodon.com.google.gson.Gson.fromJson(Gson.java:877)
at twitter2mastodon.com.google.gson.Gson.fromJson(Gson.java:848)
at twitter2mastodon.com.sys1yagi.mastodon4j.api.method.Accounts$getVerifyCredentials$2.invoke(Accounts.kt:32)
at twitter2mastodon.com.sys1yagi.mastodon4j.api.method.Accounts$getVerifyCredentials$2.invoke(Accounts.kt:19)
at twitter2mastodon.com.sys1yagi.mastodon4j.MastodonRequest.execute(MastodonRequest.kt:44)
... 43 common frames omitted
Caused by: java.lang.NumberFormatException: For input string: "9unzDNYyW6HRdNjoS8"
at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.base/java.lang.Double.parseDouble(Double.java:543)
at twitter2mastodon.com.google.gson.stream.JsonReader.nextLong(JsonReader.java:963)
at twitter2mastodon.com.google.gson.internal.bind.TypeAdapters$11.read(TypeAdapters.java:305)
... 53 common frames omitted
seeing this same issue with gotosocial