Skip to content
This repository was archived by the owner on Jul 30, 2023. It is now read-only.

Non-numeric account IDs break parsing #89

Open
takeshitakenji opened this issue Dec 28, 2021 · 1 comment
Open

Non-numeric account IDs break parsing #89

takeshitakenji opened this issue Dec 28, 2021 · 1 comment

Comments

@takeshitakenji
Copy link

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  
@hiredman
Copy link

hiredman commented Dec 2, 2022

seeing this same issue with gotosocial

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

No branches or pull requests

2 participants