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

localhost paths seem hardcoded — impossible to run the app on a remote server #867

Open
GentleHoneyLover opened this issue Nov 15, 2023 · 2 comments

Comments

@GentleHoneyLover
Copy link

GentleHoneyLover commented Nov 15, 2023

Hi,

I'm running TNoodle-WCA-1.1.2.jar in a container (here's my image: link). It is basically a slight modification of the Dockerfile from your repo. When I deploy the container on localhost (my laptop) it runs just fine and generates scrambles correctly (Screenshot 1 below). However, when I run the same image on my home server (accessed via ip-address:port or through reverse-proxy), the app breaks (Screenshot 2 below). Presumably because localhost paths are hardcoded in the app.

Is that the case? Are there workarounds (like e. g. passing some arguments to java when starting the app)? Or, otherwise, can the app be updated to make all URL paths dynamic rather than static localhost?

Here's how the app starts from within the container:
java -server -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:InitialRAMFraction=2 -XX:MinRAMFraction=2 -XX:MaxRAMFraction=2 -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:+UseStringDeduplication -jar tnoodle-application.jar --online

Screenshot 1 (localhost):

Screenshot 2023-11-15 at 10 39 22

Screenshot 2 (server):

Screenshot 2023-11-15 at 10 39 52
@GentleHoneyLover GentleHoneyLover changed the title localhost paths seems hardcoded — impossible to run the app on a remote server localhost paths seem hardcoded — impossible to run the app on a remote server Nov 15, 2023
@GentleHoneyLover
Copy link
Author

Would be great if somebody could help out here! Thanks!

@gregorbg
Copy link
Member

Hey there, sorry for the delay! TNoodle was never conceived to run in remote containers, the Dockerfile we're providing is really just a "proof of concept" and not an officially supported means of development.

You are right that localhost is indeed hardcoded, at https://github.com/thewca/tnoodle/blob/master/tnoodle-ui/src/main/api/tnoodle.api.ts#L12. We do not have the capacity at the moment to come up with a smarter solution.

In other news, TNoodle will soon be retired in favor of more modern scrambling algorithms anyways. We're not ready to share all the details yet, but for most projects you can take a look at https://js.cubing.net/cubing/scramble/. Active development on TNoodle has ceased and we're driving the project forward in a "ciritcal bugfixes only" mode.

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

2 participants