Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script fails if tokens are no longer valid for discord #1

Open
Solace50 opened this issue Dec 1, 2022 · 2 comments
Open

Script fails if tokens are no longer valid for discord #1

Solace50 opened this issue Dec 1, 2022 · 2 comments

Comments

@Solace50
Copy link

Solace50 commented Dec 1, 2022

Behaviour should be continue on error for 401 as reddit still works without auth

Starting idlecodes
32 codes from REDDIT
Exception in thread "main" kotlinx.serialization.json.internal.JsonDecodingException: Expected start of the array '[', but had 'EOF' instead
JSON input: {"message": "401: Unauthorized", "code": 0}
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32)
at kotlinx.serialization.json.internal.AbstractJsonLexer.fail(AbstractJsonLexer.kt:514)
at kotlinx.serialization.json.internal.AbstractJsonLexer.fail(AbstractJsonLexer.kt:219)
at kotlinx.serialization.json.internal.AbstractJsonLexer.unexpectedToken(AbstractJsonLexer.kt:202)
at kotlinx.serialization.json.internal.StringJsonLexer.consumeNextToken(StringJsonLexer.kt:70)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.beginStructure(StreamingJsonDecoder.kt:40)
at kotlinx.serialization.internal.AbstractCollectionSerializer.merge(CollectionSerializers.kt:29)
at kotlinx.serialization.internal.AbstractCollectionSerializer.deserialize(CollectionSerializers.kt:43)
at kotlinx.serialization.json.JsonArraySerializer.deserialize(JsonElementSerializers.kt:188)
at kotlinx.serialization.json.JsonArraySerializer.deserialize(JsonElementSerializers.kt:170)
at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:59)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:35)
at kotlinx.serialization.json.Json.decodeFromString(Json.kt:100)
at me.dco.CodesKt.getDiscordCodes(Codes.kt:53)
at me.dco.MainKt.main(Main.kt:105)

@didier-coignet
Copy link
Owner

Hi thanks for the feedback.
As a workaround you could just set the value of userToken to "" in settings.json.
I'll get around to fix it sometime in the futur, because i don't use idles champions anymore.

@Solace50
Copy link
Author

Solace50 commented Dec 10, 2022 via email

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

No branches or pull requests

2 participants