I had the same issue. I debugged it and found it to be caused by what I assume is a version mismatch between class net.minecraftforge.fml.common.network.NetworkRegistry and enum net.minecraftforge.fml.relauncher.Side.

Side has 3 values but the NetworkRegistry code appears to assume there are only 2, CLIENT and SERVER.

I fixed this by taking a copy of the NetworkRegistry class, and editing it as follows:

In the private, parameterless constructor, add the following line:

channels.put(Side.BUKKIT, Maps.<String,FMLEmbeddedChannel>newConcurrentMap());

Code change

Then you just need to make sure that your version of the class in on the classpath before the original version (if you're using eclipse then it will be automatically). You also need to make sure that you use the exact same package name for your version of the class.

Answer from winstar on Stack Overflow
🌐
Forge Forums
forums.minecraftforge.net › home › minecraft forge › support & bug reports › unexpected error error: java.lang.nullpointerexception
Unexpected error Error: java.lang.NullPointerException - Support & Bug Reports - Forge Forums
November 11, 2018 - Delete the forge-client.toml in your config folder and test it again · By TileEntity · Yesterday at 07:14 AM1 day · repeated tick loop crashes · I can load into the minecraft launcher and game just fine, but as soon as i load into my world i get to the "building terrain" bit, then instant " The game crashed: exception in server tick loop Error: java.lang.NoClassDefFoundError: net/minecraft/entity/Entity$2 " By Lindwyrm ·
🌐
Minecraft Forum
minecraftforum.net › home › minecraft forum › support › java edition support › java.lang.nullpointerexception, need fix please help
java.lang.NullPointerException, need fix please help - Java Edition Support - Support - Minecraft Forum - Minecraft Forum
Memory: 499447576 bytes (476 MB) / 581435392 bytes (554 MB) up to 1065025536 bytes (1015 MB) JVM Flags: 3 total; -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources/LauncherSupport.jar -Xms512M -Xmx1024M AABB Pool Size: 10817 (605752 bytes; 0 MB) allocated, 10817 (605752 bytes; 0 MB) used Suspicious classes: FML and Forge are installed IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v7.23 FML v4.5.11.470 Minecraft Forge 6.4.1.413 31 mods loaded, 31 mods active mcp [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-i
🌐
Reddit
reddit.com › r/feedthebeast › java.lang.nullpointerexception
r/feedthebeast on Reddit: java.lang.NullPointerException
August 24, 2021 -

I'm using Minecraft Forge, and the game freezes when I try to play a singleplayer world.

Part of the log where it freezes (not the entire thing because has 52000+ infos):

17:25:34.375

game

at appeng.core.AppEng.serverStopped(AppEng.java:218) 17:25:34.375 game

at appeng.core.AppEng$$Lambda$42439/1674748790.accept(Unknown Source) 17:25:34.375 game

at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:247) 17:25:34.375 game

at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:239) 17:25:34.375 game

at net.minecraftforge.eventbus.EventBus$$Lambda$3053/743588298.invoke(Unknown Source) 17:25:34.375 game

at net.minecraftforge.eventbus.EventBus$$Lambda$4178/1865052252.invoke(Unknown Source) 17:25:34.375 game

at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) 17:25:34.375 game

at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) 17:25:34.375 game

at net.minecraftforge.fml.server.ServerLifecycleHooks.handleServerStopped(ServerLifecycleHooks.java:124) 17:25:34.375 game

at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:683) 17:25:34.375 game

at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:232) 17:25:34.375 game

at net.minecraft.server.MinecraftServer$$Lambda$79982/1441080155.run(Unknown Source) 17:25:34.375 game

at java.lang.Thread.run(Thread.java:745) 17:25:34.375 game

17:25:34.375

game

[17:25:34] [Server thread/ERROR] [minecraft/MinecraftServer]: java.lang.NullPointerException

It freezes at java.lang.nullpointerexception. Why does it freeze there when i try to load into a singleplayer world?

🌐
GitHub
github.com › Creators-of-Create › Create › issues › 5135
[1.20.1][Forge] java.lang.NullPointerException: Cannot invoke "net.minecraft.client.multiplayer.ClientLevel.m_9598_()" because "world" is null · Issue #5135 · Creators-of-Create/Create
June 11, 2023 - [1.20.1][Forge] java.lang.NullPointerException: Cannot invoke "net.minecraft.client.multiplayer.ClientLevel.m_9598_()" because "world" is null#5135
Published   Jul 15, 2023
🌐
Forge Forums
forums.minecraftforge.net › home › minecraft forge › support & bug reports › cant get into my server due to java.lang.nullpointerexception [1.19.2]
Cant get into my server due to java.lang.NullPointerException [1.19.2] - Support & Bug Reports - Forge Forums
March 23, 2023 - Delete the forge-client.toml in your config folder and test it again · By TileEntity · 18 hours ago18 hr · repeated tick loop crashes · I can load into the minecraft launcher and game just fine, but as soon as i load into my world i get to the "building terrain" bit, then instant " The game crashed: exception in server tick loop Error: java.lang.NoClassDefFoundError: net/minecraft/entity/Entity$2 " By Lindwyrm ·
🌐
Fossils and Archeology Mod Revival Wiki
fossils-archeology.fandom.com › f › p › 3320054632415559970 › r › 3587255587307848309
I keep getting the "Error: java.lang.NullPointerException: Initializing game" and i cannot fix it | Fandom
</p><p> </p><p> I'm currently have Fossils_Archeology_Revival-1.7.10_Build-7.3 and llibrary-1.7.14-1.12.2 and used forge-1.7.10-10.13.4.1558-1.7.10-installer-win I have Java version 8 update 181 (build 1.8.0_181-b13), the crash I keep getting is: Error: java.lang.NullPointerException: Initializing game and it will not let me view the crash report. </p><p> </p><p> I'm not the best with this stuff so If anyone can help me I would be very greatful! ;-; </p> ... <p>Your llibrary is the wrong version. You're using llibrary-1.7.14-1.12.2, which is for Minecraft 1.12, not 1.7.10 (which this mod is for.)
Find elsewhere
🌐
GitHub
github.com › MinecraftForge › MinecraftForge › issues › 6911
[1.16.1] NullPointerException when spawning mod-registered entity · Issue #6911 · MinecraftForge/MinecraftForge
July 3, 2020 - [22:11:56] [Server thread/WARN] [minecraft/EntityType]: Exception loading entity: java.lang.NullPointerException: null at net.minecraft.entity.ai.attributes.AttributeModifierManager.func_233795_c_(AttributeModifierManager.java:67) ~[forge-1.16.1-32.0.47_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading} at net.minecraft.entity.LivingEntity.func_233637_b_(LivingEntity.java:1848) ~[forge-1.16.1-32.0.47_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading} at net.minecraft.entity.LivingEntity.getMaxHealth(LivingEntity.java:1609) ~[forge-1.16.1-32.0.47_mapped_snapshot_20200514-1
Published   Jul 03, 2020
🌐
Reddit
reddit.com › r/moddedmc › internal exception java.lang.nullpointerexception can not invoke "net.minecraft.nbt.compoundtag.m_128459_(string) | forge 1.20.1 server
r/ModdedMC on Reddit: internal exception java.lang.nullpointerexception can not invoke "net.minecraft.nbt.compoundtag.m_128459_(string) | Forge 1.20.1 Server
April 17, 2024 -

when people try to connect to my server, they receive this error message
internal exception java.lang.nullpointerexception can not invoke "net.minecraft.nbt.compoundtag.m_128459_(string)

i also received this error message as well but during this test for some reason it let me join the server, i've tested this out on singleplayer as well and the world works fine nothing seems to be corrupted it just doesn't work for the server.
we've also made multiple worlds for this specific pack i've made and they all have had this problem, randomly sometimes people will be able to join and play normally but other times they get this error and they cant play.
friends latest.log: https://mclo.gs/mHmks83
servers lastest.log: https://mclo.gs/si9AJk2

🌐
YouTube
youtube.com › howtounleashed
How To Fix Minecraft java.lang.NullPointerException? - YouTube
How To Fix Minecraft java.lang.NullPointerException?In this video I will explain How To Fix the Minecraft java.lang.NullPointerException problem.Get NordVPN ...
Published   November 30, 2023
Views   3K
🌐
GitHub
github.com › Asek3 › Oculus › issues › 187
Cannot invoke "net.minecraft.client.renderer. ...
September 17, 2022 - ... ---- Minecraft Crash Report ---- // Hey, that tickles! Hehehe! Time: 9/16/22, 11:22 PM Description: Unexpected error java.lang.NullPointerException: Cannot invoke "net.minecraft.client.renderer.ShaderInstance.m_173350_(String, Object)" because "$$13" is null at com.mojang.blaze3d.vertex.BufferUploader.m_166838_(BufferUploader.java:100) ~[client-1.18.2-20220404.173914-srg.jar#270!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:flywheel.mixins.json:BufferUploaderMixin,pl:mixin:A} at com.mojang.blaze3d.vertex.BufferUploader.m_85761_(BufferUploader.jav
Published   Sep 17, 2022
🌐
GitHub
github.com › Asek3 › Rubidium › issues › 629
[1.20.1] Multiplayer Loading Crash "Error: java.lang.NullPointerException: Cannot invoke "net.minecraft.client.renderer.texture.TextureAtlasSprite.m_118367_(double)" · Issue #629 · Asek3/Rubidium
September 27, 2023 - The game crashed whilst encountered exception while building chunk meshes Error: java.lang.NullPointerException: Cannot invoke "net.minecraft.client.renderer.texture.TextureAtlasSprite.m_118367_(double)" because "sprite" is null ---- Min...
Published   Sep 27, 2023
🌐
YouTube
youtube.com › quick and easy
How To Fix Minecraft java.lang.NullPointerException [Very EASY!] - YouTube
In this video I will show you how to fix minecraft java.lang.nullpointerexception.Hit the Like button and Subscribe to the channel to receive various useful ...
Published   February 5, 2023
Views   100K
🌐
Forge Forums
forums.minecraftforge.net › home › minecraft forge › support & bug reports › getting an null pointer exception error when trying to join a server
Getting an null pointer exception error when trying to join a server - Support & Bug Reports - Forge Forums
April 21, 2023 - getting the following error: java.lang.NullPointerException: Cannot invoke "net.minecraft.network.protocol.Packet.m_5797_(net.minecraft.network.PacketListener)" because "packet" is null here are both of the logs you require
🌐
GitHub
github.com › CreativeMD › AmbientSounds › issues › 20
Unexpected error - Caused by: java.lang.NullPointerException · Issue #20 · CreativeMD/AmbientSounds
WARNING: coremods are present: BetterFoliageLoader (BetterFoliage-MC1.12-2.1.10.jar) DynamicSurroundingsCore (DynamicSurroundings-1.12.2-3.4.7.2.jar) SoundFixPatchingLoader (AmbientSounds v2.2.1 mc1.12.2.jar) Contact their authors BEFORE contacting forge ... net.minecraftforge.fml.relauncher.ReflectionHelper$UnableToAccessFieldException: java.lang.NullPointerException at net.minecraftforge.fml.relauncher.ReflectionHelper.getPrivateValue(ReflectionHelper.java:144) at com.creativemd.ambientsounds.AmbientSoundEngine.tick(AmbientSoundEngine.java:78) at com.creativemd.ambientsounds.TickHandler.onTi
🌐
Fossils and Archeology Mod Revival Wiki
fossils-archeology.fandom.com › f › p › 3869894282051912385
I'm getting error: java.lang.NullPointerException: Initializing game Would anyone be willing to help me fix it? | Fandom
Redeem at your nearest Mojangsta: [~~HUG~~] <p>Time: 8/14/20 11:26 AM Description: Initializing game </p><p>java.lang.NullPointerException: Initializing game at net.minecraft.client.renderer.color.BlockColors.func_186722_a(BlockColors.java:97) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at knightminer.inspirations.building.BuildingClientProxy.registerBlockColors(BuildingClientProxy.java:100) ~[?:1.15.2-1.1.0] {re:classloading} at net.minecraftforge.eventbus.ASMEventHandler_128_BuildingClientProxy_registerBlockColors_Block.invoke(.dynamic) ~[?:?] {} at net.minecraftf
🌐
GitHub
github.com › Railcraft › Railcraft › issues › 1915
java.lang.NullPointerException when loading railcraft with forge 14.23.5.2838 · Issue #1915 · Railcraft/Railcraft
August 11, 2019 - Description of the Bug minecraft 1.12.2 using forge 14.23.5.2838 crashes an reports the following error while loading net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Railcraft (railcraft) Caused by: java.lang.NullPointerException ·
Published   Jan 25, 2020
🌐
Hypixel Forums
hypixel.net › home › forums › games › skyblock › skyblock community help
1.8.9 forge crashes (Error: java.lang.NullPointerException: Initializing game Exit Code: -1) | Hypixel Forums
October 13, 2021 - This is the error i get: --- Minecraft Crash Report ---- WARNING: coremods are present: FMLLoadingPlugin (TNT Time-1.1 (1.8.9).jar) Skytils On Top (!Skytils-1.1.2.jar) ModTweaker (Patcher-1.7.0 (1.8.9) (1).jar) PlayerAPIPlugin (PlayerAPI-1.8.9-1.0.jar) SkyblockAddonsLoadingPlugin (SkyblockAddons-1.7.0-beta.16915-for-MC-1.8.9.jar) FMLLoadingPlugin (Scrollable Tooltips-1.4 (1.8.9) (1).jar) AutoCorrectTweaker (Autocorrect-1.1 (1.8.9) (1).jar) AsmHelperLoadingPlugin (ctjs-2.0.0-1.8.9.jar) PatcherTweaker (Patcher-1.7.0 (1.8.9) (1).jar) Contact their authors BEFORE contacting forge // Don't do that.