(Solved) Problem with contentless Android / App build

QUICK ANSWER: the problem is with the firewall on the computer with defold IDE, just disable your computer firewall or allow ports that defold uses`

When try the contentless build on Android, when building the game with target, the android mobile apps just hangs with no respond and crash

When debugging withadb logcat there is a log

 FATAL:ENGINE: Unable to load project file: 'http://192.168.1.10:39071/build/game.projectc'

The problem turns out because my computer has firewall and only open ports that i’ve listed, and the solution is just to list the ports that defold is using to serve the content.

I do not know that the defold IDE runs a server and make the Android mobile app fetch the data from the server.

This misunderstanding occur because when building target for mobile app, we need to insert the target IP on defold IDE, which makes me think that the contentless system is only PUSH based (the IDE push the data to android app client). Turns out the contentless system has push & pull at the same time

I’ve spend one week finding the solution, but there is no answer on google. Now that i’ve found the problem and the solution, i want to leave a answer here for those people who got the same problem

And i would like to propose some things:

  1. Remind defold user to disable / check their computer firewall when the mobile app is hangs / crashing (put it under troubleshooting at Running the development app on device)

  2. If possible can we know which port that defold use to serve the contentless content, so we can allow those port

That’s it

I’m on my first week learning defold, and it has been a great experience. I was using godot before to develop my game, but after just days i’m planning to ditch it, because for me who have been use React.js for years, defold’s philosophy just clicked very well.

Cheers for the defold team!

Ports used by debug versions of the engine are documented here:

1 Like

thanks for the reply

The problem is the http server that defold is running, is there anyway to specify what port should it be using?

here is the sample of the log when starting defold:

INFO  default    util.http-server - {:line 103, :msg "Http server running", :local-url "http://localhost:43285"}

the port is assigned randomly, which means the firewall need to be changed everytime the defold editor is opened.

I have seen https://github.com/defold/defold/blob/dev/engine/docs/DEBUG_PORTS_AND_SERVICES.md

But currently there is no documentation about http port there

I might not understand the question but there are ports documented in that file. The engine service port is dynamic though when you run from the editor. It is this port you’d like to define beforehand, yes? If that is the case it should be relatively trivial for us to add a check for the presence of DM_SERVICE_PORT environment variable and use that port. Please create a ticket on GitHub to request this.

1 Like