• 0

    posted a message on [Help needed] [1.15.2] [FabricMC] Netty socket won't open in standard FabricMC but works fine in dev environment

    So after trying a lot of things I managed to find the problem, when loaded from the dev environment IntelliJ compiles everything including the dependencies. In the normal environment the dependencies are already compiled, in this instance it was netty that caused the problem. It has a module to send and receive google protobuf messages using the protobuf library. But netty has been compiled using a very specific version of this protobuf library, and if you use any other version it refuses to work.

    I didn't manage to hunt down the correct protobuf version so instead I copied the offending java classes from the netty source code into my own environment and recompiled them into the mod. Now everything works smoothly and netty isn't crashing when you give it protobuf packages.

    Posted in: Mod Development
  • 0

    posted a message on [Help needed] [1.15.2] [FabricMC] Netty socket won't open in standard FabricMC but works fine in dev environment

    So I am working on a mod sends data via a TCP socket with google protobuf using the built-in netty with a NIO socket to an external server.

    This all works fine when I launch the client from my development environment. But as soon as I export the mod and launch it with the default fabric launcher it gives this error when I try to establish the connection:

    java.nio.channels.ClosedChannelException
        at io.netty.channel.AbstractChannel$AbstractUnsafe.ensureOpen(...)(Unknown Source)

    (I tried everything to get a better stack trace, but I can't find a way to get one.)

    The normal fabricmc client is running the exact same build as the development version, same goes for the fabricapi and the netty build.

    The Google protobuf package is bundled inside the mod jar, so that shouldn't be a problem either.

     

    The request to connect is not even received at the server end.

    But since I am running on Linux without a firewall, I doubt the request is getting blocked by my system.

     

    I just have no clue as to what might be causing this anymore, maybe someone else does?

     

    -----

     

    Versions:

    fabricloader@0.8.2+build.194

    fabric-api-0.10.1+build.307-1.15

    netty-all-4.1.25.final

    Posted in: Mod Development
  • To post a comment, please or register a new account.