testmycode / tmc-cli

Command line client for tmc
MIT License
65 stars 21 forks source link

The run of java version on Windows causes error #404

Open ashxz47 opened 5 years ago

ashxz47 commented 5 years ago

C:>java -jar C:\Users\ashorov\Downloads\java\tmc-cli-0.9.2.jar Exception in thread "main" com.google.gson.JsonSyntaxException: java.nio.charset.MalformedInputException: Input length = 1 at com.google.gson.Gson.fromJson(Gson.java:903) at com.google.gson.Gson.fromJson(Gson.java:826) at fi.helsinki.cs.tmc.cli.backend.SettingsIo.getHolderFromJson(SettingsIo.java:183) at fi.helsinki.cs.tmc.cli.backend.SettingsIo.loadAccountList(SettingsIo.java:50) at fi.helsinki.cs.tmc.cli.backend.SettingsIo.loadAccountList(SettingsIo.java:42) at fi.helsinki.cs.tmc.cli.core.CliContext.loadUserInformation(CliContext.java:206) at fi.helsinki.cs.tmc.cli.core.CliContext.checkIsLoggedIn(CliContext.java:168) at fi.helsinki.cs.tmc.cli.command.HelpCommand.run(HelpCommand.java:37) at fi.helsinki.cs.tmc.cli.core.AbstractCommand.execute(AbstractCommand.java:63) at fi.helsinki.cs.tmc.cli.Application.runCommand(Application.java:102) at fi.helsinki.cs.tmc.cli.Application.run(Application.java:211) at fi.helsinki.cs.tmc.cli.Application.main(Application.java:225) Caused by: java.nio.charset.MalformedInputException: Input length = 1 at java.nio.charset.CoderResult.throwException(Unknown Source) at sun.nio.cs.StreamDecoder.implRead(Unknown Source) at sun.nio.cs.StreamDecoder.read(Unknown Source) at java.io.InputStreamReader.read(Unknown Source) at java.io.BufferedReader.fill(Unknown Source) at java.io.BufferedReader.read1(Unknown Source) at java.io.BufferedReader.read(Unknown Source) at com.google.gson.stream.JsonReader.fillBuffer(JsonReader.java:1295) at com.google.gson.stream.JsonReader.nextNonWhitespace(JsonReader.java:1333) at com.google.gson.stream.JsonReader.consumeNonExecutePrefix(JsonReader.java:1576) at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:534) at com.google.gson.stream.JsonReader.peek(JsonReader.java:425) at com.google.gson.Gson.fromJson(Gson.java:884) ... 11 more

csavar commented 4 years ago

i have the same issiue, any idea maybe? thanks

nygrenh commented 4 years ago

My best guest would be corrupted settings files. You can try deleting your settings from %APPDATA%. They are located under a folder called tmc-cli.

Here's information on how you can access app data: https://www.techwalla.com/articles/how-to-access-the-application-data-folder

hesshu commented 4 years ago

Did anyone figure this out yet? I'm having the same issue and deletion of settings did not help.

AfvanMoopen commented 3 years ago

same issue 1

AfvanMoopen commented 3 years ago

@hesshu

Just cross-checking the things in here

https://www.mooc.fi/en/installation/vscode

and restarting the system would be fine

hesshu commented 3 years ago

@Afvanjaffer I switched to Linux on the system and do not have the need for tmc-cli anymore so I cannot cross-check, sorry :)

AfvanMoopen commented 3 years ago

It's okkay 🙂