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

Error on nation creation. #9

Closed
Nullcaller opened this issue Jul 10, 2018 · 17 comments
Closed

Error on nation creation. #9

Nullcaller opened this issue Jul 10, 2018 · 17 comments

Comments

@Nullcaller
Copy link

Nullcaller commented Jul 10, 2018

I get a following message: Error occurred while executing command: lateinit property currencies has not been initialized in chat when i do /n create test with sufficient amount of gold in my inventory.
Also, this gets printed out into console:

flavor.pie.pieconomy.runtime.kotlin.UninitializedPropertyAccessException: lateinit property currencies has not been initialized
        at flavor.pie.pieconomy.PieconomyServerAccount.getCurrencies(PieconomyServerAccount.kt:20) ~[PieconomyServerAccount.class:?]
        at flavor.pie.pieconomy.PieconomyService.getOrCreateAccount(PieconomyService.kt:28) ~[PieconomyService.class:?]
        at com.arckenver.nations.cmdexecutor.nation.NationCreateExecutor.execute(NationCreateExecutor.java:110) ~[NationCreateExecutor.class:?]
        at org.spongepowered.api.command.args.ChildCommandElementExecutor.execute(ChildCommandElementExecutor.java:255) ~[ChildCommandElementExecutor.class:1.12.2-2705-7.1.0-BETA-3206]
        at org.spongepowered.api.command.spec.CommandSpec.process(CommandSpec.java:388) ~[CommandSpec.class:1.12.2-2705-7.1.0-BETA-3206]
        at org.spongepowered.api.command.dispatcher.SimpleDispatcher.process(SimpleDispatcher.java:341) ~[SimpleDispatcher.class:1.12.2-2705-7.1.0-BETA-3206]
        at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:328) [SpongeCommandManager.class:1.12.2-2705-7.1.0-BETA-3206]
        at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:1083) [dh.class:?]
        at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:958) [pa.class:?]
        at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:937) [pa.class:?]
        at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:37) [la.class:?]
        at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:9) [la.class:?]
        at org.spongepowered.common.network.PacketUtil.onProcessPacket(PacketUtil.java:148) [PacketUtil.class:1.12.2-2705-7.1.0-BETA-3206]
        at net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$zla000(SourceFile:539) [hv$1.class:?]
        at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [hv$1.class:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_172]
        at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_172]
        at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?]
        at org.spongepowered.common.SpongeImplHooks.onUtilRunTask(SpongeImplHooks.java:288) [SpongeImplHooks.class:1.12.2-2705-7.1.0-BETA-3206]
        at net.minecraft.server.MinecraftServer.redirect$onRun$zjf000(MinecraftServer.java:3987) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:723) [MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:396) [nz.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]

I'm using default config, but with dynamic accounts enabled on Minecraft 1.12.2 with Forge 14.23.4.2705 and SpongeForge 7.1.0-BETA-3206. Nations version is 2.11-S7.0 and the config is default.

@pie-flavor
Copy link
Owner

pie-flavor commented Jul 12, 2018

Please send me your entire log via Gist, as that error indicates that a previous error prevented a property from being initialized.

@Nullcaller
Copy link
Author

Nullcaller commented Jul 12, 2018

Here is latest.log: https://gist.github.com/Nullcaller/6edae4cbcbbcffdc2ad28bfddee84957
And here is debug.log: https://gist.github.com/Nullcaller/ad52669285744fa16e8396221ee973c5
But... There isn't any other error there. 🤔

@Nullcaller
Copy link
Author

Nullcaller commented Jul 12, 2018

Actually, here is the actual server I use, uploaded to MEGA (it syncs automatically): https://mega.nz/#F!9aYGgYrC!znzCzpZHmWux8gSC6BQAAA
I am unsure whether it helps or no, but it certainly does no harm.

@Artres
Copy link

Artres commented Jul 30, 2018

Just to make a nobody like myself known for a moment. I would like to confirm that I am also having this issue. I have just come over from the Nations' GitHub's issues section (Link: Arckenver/Nations#189).

I use a custom modpack server that's hosted online if that helps clarify things at all. If you could help me out here, it would be much appreciated. Thank you for your time, no matter what the response.

Stack Trace (repost from other issue) - https://pastebin.com/rkcTcqSH

@Nullcaller
Copy link
Author

I tried looking at the source code... And I am quite confused. Maybe it's because I don't know Kotlin.
Anyhow, from what I've read, a lateinit property should be initialized. Marking properties lateinit just prevents the compiler from screaming about property not being initialized in constructor/initializer and refusing to compile anything.
And here's the thing: I don't see anything that could initialize this value, so... Why should it be initialized?
Or maybe I'm just being stupid and/or blind.

@pie-flavor
Copy link
Owner

Can someone test this build?

@Artres
Copy link

Artres commented Aug 1, 2018

https://imgur.com/a/d9VoEaF

It's fixed, at least for me it is. Thanks for your help @pie-flavor and for creating this thread @Nullcaller. I can finally start my idiotic conquest of the world.

@Nullcaller
Copy link
Author

Nullcaller commented Aug 1, 2018

Yes, that build works for me. Nation creation successful.
But now there is another issue: when I try to deposit money to nation's balance, it tells me that the money is deposited, but nation's balance is still empty, and there is no error in the log.

@Nullcaller
Copy link
Author

Nullcaller commented Aug 1, 2018

I feel like I should totally create another issue, reference it here and close this one, but it is kind of strange for me to do it for a version that is "well, you know that build in issue about error on nation creation"...
I don't feel like it is a good practice. But I don't feel like resolving two issues in one is a good practice either.

@Artres
Copy link

Artres commented Aug 1, 2018

Ah, I opened an issue on the nations end about that very same thing earlier today amongst others since I'm thinking it might be on that end (though I might be horribly wrong).

Arckenver/Nations#191

Anyway, I'm with you on this. I was already here trying to get the plugins to work together, may ask well try to them both fully working.

@Artres
Copy link

Artres commented Aug 4, 2018

I just found some spare time and and am now certain that it's Nations. I tried testing some things out and realized that the admin commands allow you to set a nation's 'money'. So I create a nation and ran the command /na eco set Land 1000 (or Nation Admin set the economy/money of Land to 1000). It gave out a green 'Success !' and then when I tried /n info it came out as 'Money: 0 G'. I think the money system on that end is broke unless the admin command just doesn't work either.

Screenshot: https://imgur.com/a/A9N68bH

Note: I'm probably going the repost the majority of this on the issue I linked. I just thought I'd pass this on to @Nullcaller here to pass on that it's likely that side rather than Pieconomy.

@Nullcaller
Copy link
Author

Actually, it does not seem like an issue with Nations. Nations (2.11-S7.0) seems to work perfectly well with Total Economy (1.8.1) and EconomyLite (2.14.3).

@Nullcaller
Copy link
Author

Nullcaller commented Aug 4, 2018

Moreover, I don't believe Nations does something more than interact with Sponge's built-in economy APIs. If you want to make a transaction somewhere in your own plugin, you do something like Sponge.getService(EconomyService.class).getOrCreateAccount("my_foe").withdraw(new BigDecimal("a lot"));
Obviously, that would throw a RuntimeException in your face, since "a lot" is no number, and, probably, it won't even compile, because, with a possibility of 99.9%, there is no such thing as "Sponge#getService", and the actual method has another signature, but still, this is very close to reality.

@Artres
Copy link

Artres commented Aug 4, 2018

Right. Sorry about that. I generally lack much knowledge on the inner workings of these sorts of plugins. My bad if I was wrong. I do think since this issue is closed however that pie-flavor isn't seeing any of this, though I'm not sure how GitHub's notification system works for closed issues. The fact that he hasn't replied sort of reinforces that but anyway, just to be safe.

@pie-flavor Mind coming back here when you have some time?

@Nullcaller
Copy link
Author

This issue is not closed, so I guess, all we should do is wait and allow @pie-flavor to take his time. Everyone has business way more important than fixing a mod for a mod for a mod for a game that is older than some of its players.

@Artres
Copy link

Artres commented Aug 4, 2018

facepalm Once again, sorry to the both of you. I had closed the linked issue then when writing that post I just had that in mind. Yeah, people have much more important things to be doing than bug-fixing all the time. Well, I'll go back to sort of watching things for a while.

@pie-flavor
Copy link
Owner

I have no idea how the notifications for this vanished.
Is the issue still reproducible on the latest release?

@Nullcaller Nullcaller closed this as not planned Won't fix, can't repro, duplicate, stale Oct 29, 2024
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

3 participants