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

Adding URL to remoteLibraries.txt causes crash on startup #4

Open
Targren opened this issue Aug 7, 2022 · 1 comment
Open

Adding URL to remoteLibraries.txt causes crash on startup #4

Targren opened this issue Aug 7, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Targren
Copy link
Owner

Targren commented Aug 7, 2022

Version Info

Forge version:
Mod version: Initial Fork

Description

See title

Steps to reproduce:

  1. Add a url to remoteLibraries.txt
  2. Start client

What I expect to happen:

Not crash.

What actually happens:

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Better Records (betterrecords)
Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224)
at com.google.gson.Gson.fromJson(Gson.java:887)
at com.google.gson.Gson.fromJson(Gson.java:852)
at com.google.gson.Gson.fromJson(Gson.java:801)
at com.google.gson.Gson.fromJson(Gson.java:773)
at tech.feldman.betterrecords.library.LibraryContent$Companion.fromJson(LibraryContent.kt:50)
at tech.feldman.betterrecords.library.RemoteLibrary.(Library.kt:80)
at tech.feldman.betterrecords.library.Libraries.init(Libraries.kt:118)
at tech.feldman.betterrecords.CommonProxy.init(CommonProxy.kt:43)
at tech.feldman.betterrecords.client.ClientProxy.init(ClientProxy.kt:48)
at tech.feldman.betterrecords.BetterRecords.init(BetterRecords.kt:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...

@Targren Targren added the bug Something isn't working label Aug 7, 2022
@Targren
Copy link
Owner Author

Targren commented Aug 8, 2022

Problem is sloppy library handling. Doesn't verify file even exists before trying to process it as JSON (404 error also caused full fatal crash).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant