coder / deploy-code-server

Deploy code-server to the cloud with a few clicks ☁️ 👨🏼‍💻
MIT License
879 stars 647 forks source link

Haxe doesnt work very well #28

Closed crispyi2 closed 3 years ago

crispyi2 commented 3 years ago

secifically HaxeFlixel, OpenFL, and Lime


⬇️ Here are the links to the websites ⬇️

Haxe ‎‏‏‎ ‎‎‏‏‎ ‎Haxeflixel‎‏‏‎ ‎‎‏‏‎ ‎‎‏‏‎ ‎OpenFL‎‏‏‎ ‎‏‏‎‎‎‏‏‎ ‎‎‏‏‎ ‎Lime ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‎‎‎‎ ‏‏‎ ‎‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎

When I test my haxeflixel game using lime test html5 it did everything it was supposed to do, it built the game and opened up a server on port 3000 with the game loaden up on it so i could test it

only problem was that it didn't serve any of the content except for the .html file it generated even though it was also supposed to serve a .html file a .png file and .js file.

so i got a console error that said this

❌ Failed to load resource: the server responded with a status of 500 ()   4K-Engine.js:1

❌ Uncaught ReferenceError: lime is not defined                            3000:94
     at 3000:94

❌ Failed to load resource: the server responded with a status of 500 ()   favicon.png:1

The .js file

So what this means is it didn't serve the .js file which whas this one 4K-Engine.js

Note: (4K-Engine is the name of the game im developing btw) here is a link to the github repo for my game ⏪⏪⏪ clone it if you want to reproduce it which i will explain how to do in a second

the .js file is what had everything the game needed to run

the .html file was the only thing that was actually served but its really useless without the 4K-Engine.js file here is why

🔽 this part 🔽

❌ Uncaught ReferenceError: lime is not defined                            3000:94
     at 3000:94

is whining about some javascript code automatically embedded in the html tag 🔽 here is the script tag im talking about 🔽

<script type="text/javascript">
    lime.embed ("4K-Engine", "openfl-content", 1280, 720, { parameters: {} });
</script>

Lime was defined in the 4K-Engine.js file but again the 4K-Engine.js file wasn't served (Btw Lime is what is reccomended to build haxeflixel projects with) and if you couldnt tell already lime is also used to embed the content into the webpage

The .png file

I dont really care about the fucking favicon logo since I don't really need it to load the game

reproducing the bug

Here is how you reproduce the bug

Open the games folder in code server so that it is the root directory

Open the integrated terminal

1 type this to automatically build and run a server withe the game loaded on it lime test html5 (also it has to be this command)

2 then go to this url url.codeserver.is.being.hosted.on/proxy/3000

3 open up the developer console (this is done differently with every web browser)

the only reason im not submitting this isuue on lime's github repo is because i haven't had this problem with any other web based ides like Gitpod and GoormIde and iv'e also had similar problems with other programming languages like java (also java is a bad example cuz of how ancient and hard to work with it is but it was the first example that came to mind so yeah) and even ad a similar problem when testing a vscode extension im developing which ill post an issue for in a few days cuz writing details issues is really time consuming so umm yeah


btw again

If this problem is my fault tell me cuz being educated is what keeps me from being a dumbass

Info

bpmct commented 3 years ago

Thanks for reporting. I'll check this out today!

crispyi2 commented 3 years ago

I Figured out why it was doing this. I didnt type / at the end of host.com/proxy/<port> so for some reason that made it not wanna serve it