DeveloperCapes icon indicating copy to clipboard operation
DeveloperCapes copied to clipboard

Error on mod load

Open MaegnusTheBlackMage opened this issue 11 years ago • 74 comments

Hello when i add my mod to my game and launch it i get the following error and the cape does not show up

http://pastebin.com/qzs6aNeu

MaegnusTheBlackMage avatar Oct 17 '14 20:10 MaegnusTheBlackMage

You have an invalid JSON file. This is a Google JSON parser exception.

On Oct 17, 2014, at 3:07 PM, Dmitchell94 [email protected] wrote:

Hello when i add my mod to my game and launch it i get the following error and the cape does not show up

[16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated array at line 7 column 14 [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.gson.Gson.fromJson(Gson.java:818) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.gson.Gson.fromJson(Gson.java:768) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.gson.Gson.fromJson(Gson.java:717) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.gson.Gson.fromJson(Gson.java:689) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.jadarstudios.developercapes.cape.CapeConfigManager.parse(CapeConfigManager.java:92) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.jadarstudios.developercapes.cape.CapeConfigManager.parseFromStream(CapeConfigManager.java:127) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.jadarstudios.developercapes.DevCapes.registerConfig(DevCapes.java:132) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.jadarstudios.developercapes.DevCapes.registerConfig(DevCapes.java:102) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.jadarstudios.developercapes.DevCapes.registerConfig(DevCapes.java:88) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.BlackMage.BluTech.BluTech.init(BluTech.java:54) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Method.invoke(Unknown Source) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Method.invoke(Unknown Source) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.post(EventBus.java:275) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Method.invoke(Unknown Source) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.post(EventBus.java:275) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.Loader.initializeMods(Loader.java:691) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:288) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:541) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:867) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.client.main.Main.main(SourceFile:148) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Method.invoke(Unknown Source) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Method.invoke(Unknown Source) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:286) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:376) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at org.multimc.EntryPoint.listen(EntryPoint.java:165) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at org.multimc.EntryPoint.main(EntryPoint.java:54) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: Caused by: com.google.gson.stream.MalformedJsonException: Unterminated array at line 7 column 14 [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1505) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:465) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:403) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.gson.internal.bind.ObjectTypeAdapter.read(ObjectTypeAdapter.java:60) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.gson.internal.bind.ObjectTypeAdapter.read(ObjectTypeAdapter.java:70) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:187) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.gson.Gson.fromJson(Gson.java:803) [16:02:58] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: ... 54 more

— Reply to this email directly or view it on GitHub.

jadar avatar Oct 17 '14 20:10 jadar

http://forgewareinc.com/modresources/DevCapes/devs.json

MaegnusTheBlackMage avatar Oct 17 '14 20:10 MaegnusTheBlackMage

You’re missing commas and a quotation mark.

"users": [ "Shade2010", "Elrol_Arrowsend" "BlackMage ]

should be

"users": [ "Shade2010", “Elrol_Arrowsend", “BlackMage" ]

On Oct 17, 2014, at 3:12 PM, Dmitchell94 [email protected] wrote:

http://forgewareinc.com/modresources/DevCapes/devs.json

— Reply to this email directly or view it on GitHub.

jadar avatar Oct 17 '14 20:10 jadar

wow now i feel stupid

MaegnusTheBlackMage avatar Oct 17 '14 20:10 MaegnusTheBlackMage

It’s ok. Just look at the exception next time :) Also if you could remove Captain_Shadows that’d be nice. His name is just there as an example.

On Oct 17, 2014, at 3:17 PM, Dmitchell94 [email protected] wrote:

wow now i feel stupid

— Reply to this email directly or view it on GitHub.

jadar avatar Oct 17 '14 20:10 jadar

Yeah i left him there while testing figured id replace his name shortly

Now it does not give an error though the cape does not show up?

MaegnusTheBlackMage avatar Oct 17 '14 20:10 MaegnusTheBlackMage

Encoding issue. Make sure it's UTF8.. http://puu.sh/cgbsa/899ce36b56.png

jadar avatar Oct 17 '14 20:10 jadar

http://puu.sh/cgcBB/488cad5377.png

jadar avatar Oct 17 '14 20:10 jadar

I set it to encode in UTF-8 http://i.imgur.com/yYcilV4.png?1 still nothing

MaegnusTheBlackMage avatar Oct 17 '14 20:10 MaegnusTheBlackMage

ok i broke json again

MaegnusTheBlackMage avatar Oct 17 '14 20:10 MaegnusTheBlackMage

ok so http://jsonlint.com/ says my Json is valid but when i launch minecraft it throws a a Google JSON parser exception again: http://pastebin.com/C8xNv15k

Source code: https://bitbucket.org/blackmagedevelopment/blutech/src/4d2466e25a28a26ac657b3c2d1c228a105732a1e/java/com/BlackMage/BluTech/?at=master

JSON: http://forgewareinc.com/modresources/DevCapes/devs.json

Exception: http://pastebin.com/C8xNv15k

im lost at what im doing wrong at this point and sadly its probally such a minor stupid thing that im just missing

MaegnusTheBlackMage avatar Oct 17 '14 20:10 MaegnusTheBlackMage

Ok. Try this: go to http://jsoneditoronline.org/ copy and paste your JSON in there, then click the arrow that points right, after click the arrow that points left. Copy that and paste it in the file.

CaptainShadows avatar Oct 17 '14 20:10 CaptainShadows

and what is the exception…

On Oct 17, 2014, at 3:57 PM, Dmitchell94 [email protected] wrote:

ok so http://jsonlint.com/ says my Json is valid but when i launch minecraft it throws a a Google JSON parser exception again

— Reply to this email directly or view it on GitHub.

jadar avatar Oct 17 '14 20:10 jadar

btw jadar mind me doing some cleaning javadoc and other general stuffs? I feel like coding.... :P also do you still need me to do that other project? Sorry I kind of forgot :(

CaptainShadows avatar Oct 17 '14 21:10 CaptainShadows

Exception: http://pastebin.com/C8xNv15k

which is a syntax exception

MaegnusTheBlackMage avatar Oct 17 '14 21:10 MaegnusTheBlackMage

what is the json? is it still http://forgewareinc.com/modresources/DevCapes/devs.json?

CaptainShadows avatar Oct 17 '14 21:10 CaptainShadows

yep ive updated it after using the link you suggested

MaegnusTheBlackMage avatar Oct 17 '14 21:10 MaegnusTheBlackMage

@CaptainShadows I opened an issue for discussion of the JavaDoc. Also, no I don't need you to work on that project. It's placed on hiatus.

@Dmitchell94 that's really weird I donno what would cause that.

jadar avatar Oct 17 '14 21:10 jadar

well it is throwing an error in here ... uhm ......ok, try updating the dev. capes you have?

CaptainShadows avatar Oct 17 '14 21:10 CaptainShadows

so you want me to spam that issue? :P also sorry for not getting to it earlier I kind of took a break from all coding

CaptainShadows avatar Oct 17 '14 21:10 CaptainShadows

@CaptainShadows Yes ;P It's fine me too.

This is of relevance. http://stackoverflow.com/questions/24233564/cant-deserialize-object-expected-begin-object-but-was-string-at-line-1-column

jadar avatar Oct 17 '14 21:10 jadar

Throw a break point on there and see what the input to the parse method is..

jadar avatar Oct 17 '14 21:10 jadar

@CaptainShadows Ima guess it's to do with this... I blame @Plancke ;P But I can't test right now so I can't be sure..

https://github.com/jadar/DeveloperCapes/blob/master/src/main/java/com/jadarstudios/developercapes/cape/CapeConfigManager.java#L125-L126

jadar avatar Oct 17 '14 21:10 jadar

Ok might of found the problem last test before work i had: public static final String $IDENTIFIER = MODID; Going to try public static final String $IDENTIFIER = "blutech";

MaegnusTheBlackMage avatar Oct 17 '14 21:10 MaegnusTheBlackMage

Nope still throwing the same error. Im off for work but ill work on this more when i get home

MaegnusTheBlackMage avatar Oct 17 '14 21:10 MaegnusTheBlackMage

@jadar I'll test some and PR if changes are needed :P What MC version are we testing with?

CaptainShadows avatar Oct 17 '14 21:10 CaptainShadows

I was working with 1.7.10

MaegnusTheBlackMage avatar Oct 17 '14 21:10 MaegnusTheBlackMage

ok

CaptainShadows avatar Oct 17 '14 21:10 CaptainShadows

@CaptainShadows 1.7.10.

On Oct 17, 2014, at 4:25 PM, Captain Shadows [email protected] wrote:

@jadar I'll test some and PR if changes are needed :P what MC version are we testing with?

— Reply to this email directly or view it on GitHub.

jadar avatar Oct 17 '14 21:10 jadar

So i spent most of today looking at other mods that use DeveloperCapes in their code and have not been able to come up with much to why mine is still not working. I've tried several things and am wondering if it may be my code causing the issue rather than yours.

MaegnusTheBlackMage avatar Oct 19 '14 02:10 MaegnusTheBlackMage