Ngrok-LAN
Ngrok-LAN copied to clipboard
[BUG] not working on linux
Describe the bug I can not use the mod :(
To Reproduce Steps to reproduce the behavior:
- set up the token
- Go to 'Open to Lan'
- Click on 'Open Public Server'
- see the error
Expected behavior it should open the tunnel to Ngrok
Screenshots
Desktop (please complete the following information):
- OS: Manjaro Linux
- Minecraft Version 1.18.2
- Ngrok-LAN Version 1.4.4
Additional context because of the no permissions error I've already used the chmod +x command to enable execution for the file. but it did not work.
[07:34:32] [Thread-69/INFO]: Launched Lan!
[07:34:32] [Thread-69/INFO]: [CHAT] Starting Ngrok Service...
[07:34:32] [Thread-69/INFO]: [STDERR]: com.github.alexdlaird.exception.NgrokException: An error occurred while starting ngrok.
[07:34:32] [Thread-69/INFO]: [STDERR]: at com.github.alexdlaird.ngrok.process.NgrokProcess.start(NgrokProcess.java:167)
[07:34:32] [Thread-69/INFO]: [STDERR]: at com.github.alexdlaird.ngrok.process.NgrokProcess.start(NgrokProcess.java:93)
[07:34:32] [Thread-69/INFO]: [STDERR]: at com.github.alexdlaird.ngrok.NgrokClient.connect(NgrokClient.java:169)
[07:34:32] [Thread-69/INFO]: [STDERR]: at net.minecraft.class_436.mdd0bad4$lambda$ngrokInit$6$0(class_436.java:601)
[07:34:32] [Thread-69/INFO]: [STDERR]: at java.base/java.lang.Thread.run(Unknown Source)
[07:34:32] [Thread-69/INFO]: [STDERR]: Caused by: java.io.IOException: Cannot run program "/home/sandro/.ngrok2/ngrok": error=13, no permissions
[07:34:32] [Thread-69/INFO]: [STDERR]: at java.base/java.lang.ProcessBuilder.start(Unknown Source)
[07:34:32] [Thread-69/INFO]: [STDERR]: at java.base/java.lang.ProcessBuilder.start(Unknown Source)
[07:34:32] [Thread-69/INFO]: [STDERR]: at com.github.alexdlaird.ngrok.process.NgrokProcess.start(NgrokProcess.java:132)
[07:34:32] [Thread-69/INFO]: [STDERR]: ... 4 more
[07:34:32] [Thread-69/INFO]: [STDERR]: Caused by: java.io.IOException: error=13, Keine Berechtigung
[07:34:32] [Thread-69/INFO]: [STDERR]: at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
[07:34:32] [Thread-69/INFO]: [STDERR]: at java.base/java.lang.ProcessImpl.<init>(Unknown Source)
[07:34:32] [Thread-69/INFO]: [STDERR]: at java.base/java.lang.ProcessImpl.start(Unknown Source)
[07:34:32] [Thread-69/INFO]: [STDERR]: ... 7 more
[07:34:32] [Thread-69/INFO]: [CHAT] An error occurred while starting ngrok.
[07:34:32] [Thread-69/INFO]: [CHAT] Ngrok Service Initiation Failed!
[07:34:32] [Thread-69/ERROR]: Uncaught exception in thread "Thread-69"
java.lang.RuntimeException: Ngrok Service Failed to StartAn error occurred while starting ngrok.
at net.minecraft.class_436.mdd0bad4$lambda$ngrokInit$6$0(class_436.java:654) ~[client-intermediary.jar:?]
at java.lang.Thread.run(Unknown Source) [?:?]
I have experienced this on Fedora 36 and Minecraft 1.19
This bug might take a bit for us to figure out since we need to set up a Linux vm or something like that to test it.
I don't really know what could be going wrong here, and it might have something to do with the ngrok wrapper we are using.
In the mean time, apologies for the delay in fixing this.
If anybody can run this mod on Linux, please let me know and drop the specific OS in this thread.
Any updates? On Linux I have been able to use ngrok to manually port forward my singleplayer world.
It runs on for me, Arch Linux 5.19.1-lqx1-1-lqx x86_64 GNU/Linux, OpenJDK version "18.0.2" (build 18.0.2+9).
try running chmod +x ~/.ngrok2/ngrok
and see if that fixes it.
I believe the error is that (for some reason), it's not marking the file as executable.
Ah, should be possible to do with Java NIO.
I'm having the same issue on Linux (Fedora 38, Ngrok LAN version 1.4.4, Minecraft version 1.19.2). Exact same error log posted in the OP.
@SimplyTadpole
try doing chmod +x ~/.ngrok2/ngrok
, and see if that fixes it
@solonovamax That directory doesn't seem to exist for me?
@SimplyTadpole This is interesting, looks like maybe the wrapper isn't installing ngrok correctly. I probably should update the wrapper to a later/the latest version, maybe this bug is fixed in one of the newer releases.
We are currently using version 1.5.6, but it looks like 1.7.1 has a specific changelog for fixing default installation issues.
I'm a little bit hesitant right now to fully move to the latest 2.1.0 release as it uses a different ngrok version. I will have some more time in the coming week or so, so I might look into at least porting to 1.7.1.
Will keep you all updated, and also sorry again everyone for the inactivity.
Hi all, I'm releasing a beta version of this mod for 1.20.1 that uses an updated wrapper version. You can find it under Releases on this github project.
Could someone who is experiencing this bug try this version of the mod to see if there is any difference?
Thanks :)
I no longer have issues with the bug, as chmod'ing the file fixed it for me, however I will try doing chmod -x
to it, to see if I can reproduce it, and then attempt running with the latest version
Could someone who is experiencing this bug try this version of the mod to see if there is any difference?
newcomer to the mod and was experiencing the issue beta build doesn't seem to make a difference, still getting initiation failed
chmod +x ~/.ngrok2/ngrok
hasn't fixed it for me either
͏͏͏ logs spit this out whenever attempting to open a server
[20:57:26] [Thread-28/INFO]: [CHAT] Starting Ngrok Service... [20:57:27] [Server thread/INFO]: Saving chunks for level 'ServerLevel[creeper testing]'/minecraft:the_nether [20:57:27] [Server thread/INFO]: Saving chunks for level 'ServerLevel[creeper testing]'/minecraft:the_end [20:57:27] [Thread-28/INFO]: [STDERR]: com.github.alexdlaird.exception.NgrokException: The ngrok process was unable to start. [20:57:27] [Thread-28/INFO]: [STDERR]: at com.github.alexdlaird.ngrok.process.NgrokProcess.start(NgrokProcess.java:160) [20:57:27] [Thread-28/INFO]: [STDERR]: at com.github.alexdlaird.ngrok.NgrokClient.connect(NgrokClient.java:182) [20:57:27] [Thread-28/INFO]: [STDERR]: at net.minecraft.class_436.md72bd1c$ngroklan$lambda$ngrokInit$5$0(class_436.java:600) [20:57:27] [Thread-28/INFO]: [STDERR]: at java.base/java.lang.Thread.run(Thread.java:833) [20:57:27] [Thread-28/INFO]: [CHAT] The ngrok process was unable to start. [20:57:27] [Thread-28/INFO]: [CHAT] Ngrok Service Initiation Failed! [20:57:27] [Thread-28/ERROR]: Uncaught exception in thread "Thread-28" java.lang.RuntimeException: Ngrok Service Failed to StartThe ngrok process was unable to start. at net.minecraft.class_436.md72bd1c$ngroklan$lambda$ngrokInit$5$0(class_436.java:652) ~[client-intermediary.jar:?] at java.lang.Thread.run(Thread.java:833) ~[?:?]
Hi @notandvm, does the ngrok directory exist on your machine? It should be created when trying to open a server.
Also, could you let me know what Linux distro and version you are using?
Does anyone know an easy way to set up a Linux environment for me to test this myself…?
Hi @notandvm, does the ngrok directory exist on your machine? It should be created when trying to open a server.
Also, could you let me know what Linux distro and version you are using?
it's being created properly yeah, path is ~/.ngrok2/ as intended inside is the executable, ngrok.yml, and ngrok.zip
distro & version is steamos 3.4.8
running into this issue too, i'm on endeavourOS, minecraft 1.20.1 using Prism launcher flatpak version, ~/.ngrok2/ was not created here, maybe it's related to the fact it's running on flatpak, installing the appimage version to see what happens
running into this issue too, i'm on endeavourOS, minecraft 1.20.1 using Prism launcher flatpak version, ~/.ngrok2/ was not created here, maybe it's related to the fact it's running on flatpak, installing the appimage version to see what happens
Seems to have worked just fine now, so i guess this is not compatible with flatpak installs of minecraft, probably because of the lack of permissions to write into home of something like that