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

[BUG] not working on linux #23

Open
MSandro opened this issue Jun 30, 2022 · 18 comments
Open

[BUG] not working on linux #23

MSandro opened this issue Jun 30, 2022 · 18 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@MSandro
Copy link

MSandro commented Jun 30, 2022

Describe the bug
I can not use the mod :(

To Reproduce
Steps to reproduce the behavior:

  1. set up the token
  2. Go to 'Open to Lan'
  3. Click on 'Open Public Server'
  4. see the error

Expected behavior
it should open the tunnel to Ngrok

Screenshots
image

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) [?:?]

@MSandro MSandro added the bug Something isn't working label Jun 30, 2022
@dajix350
Copy link

I have experienced this on Fedora 36 and Minecraft 1.19

@Flooflez
Copy link
Collaborator

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.

@Flooflez Flooflez added the help wanted Extra attention is needed label Jul 12, 2022
@dajix350
Copy link

Any updates? On Linux I have been able to use ngrok to manually port forward my singleplayer world.

@solonovamax
Copy link

solonovamax commented Aug 18, 2022

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.

@solonovamax
Copy link

I believe the error is that (for some reason), it's not marking the file as executable.

@TheKodeToad
Copy link

Ah, should be possible to do with Java NIO.

@SimplyTadpole
Copy link

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.

@solonovamax
Copy link

@SimplyTadpole
try doing chmod +x ~/.ngrok2/ngrok, and see if that fixes it

@SimplyTadpole
Copy link

SimplyTadpole commented Aug 13, 2023

@solonovamax That directory doesn't seem to exist for me?

@Flooflez
Copy link
Collaborator

@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.

@Flooflez
Copy link
Collaborator

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 :)

@solonovamax
Copy link

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

@notandvm
Copy link

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) ~[?:?]

@Flooflez
Copy link
Collaborator

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?

@Flooflez
Copy link
Collaborator

Does anyone know an easy way to set up a Linux environment for me to test this myself…?

@notandvm
Copy link

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

@Quiel245
Copy link

Quiel245 commented Sep 13, 2023

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

@Quiel245
Copy link

Quiel245 commented Sep 13, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

9 participants