When my project is running, Open Web Profiler and Open Resource profiler buttons do nothing. No errors in console or logs. But if I go to localhost:8002, resource profiler is there. Is there a fixed port for web profiler or what can I do to spot the issue? Defold 1.6.4 and Linux. Here logs from console:
INFO:DLIB: Log server started on port 40665
INFO:ENGINE: Target listening with name: yoga7 - 127.0.1.1 - Linux
INFO:ENGINE: Engine service started on port 46035
INFO:GRAPHICS: Installed graphics device 'ADAPTER_FAMILY_OPENGL'
INFO:ENGINE: Defold Engine 1.6.4 (fcec950)
INFO:DLIB: Initialized Remotery (ws://127.0.0.1:17815/rmt)
INFO:ENGINE: Loading data from: build/default
INFO:ENGINE: Initialised sound device 'default'
INFO:DLIB: SSDP: Started on address 172.17.0.1
INFO:DLIB: SSDP: Started on address 192.168.5.97
The 8002 port is a fixed redirect port which redirects the request to the actual port. Do you perhaps have something which blocks this redirect?
And this is the code for opening the profiler:
Ah, this now rings a bell. There is an issues for this already:
It is likely that your OS for some reason doesn’t indicate that the java.awt.Desktop.Action.BROWSE is supported. Perhaps you don’t have a default browser set?
@britzl Thank you for the answer. After a bit of investigation I think this is a KDE specific issue. There are a bunch of questions on stackoverflow about this:
all related to KDE Plasma. I have default browser set, but seems like java.awt.Desktop.Action.BROWSE uses gnome specific functions to open links and it’s generally advised to use xdg-open instead on linux. So I think all KDE users affected by this.
I’ve tried all suggested workarounds without luck. Actually I don’t mind to open profiler manually, but I can’t figure out what url I should use.
The 8002 port is a fixed redirect port which redirects the request to the actual port. Do you perhaps have something which blocks this redirect?
I’m getting redirected, but there is only resource profiler shown.
Actually I don’t mind to open profiler manually, but I can’t figure out what url I should use.
I’ve figured it out! When editor starts, there is a line in logs:
[JavaFX Application Thread] INFO util.http-server - {:line 103, :msg "Http server running", :local-url "http://localhost:34241"}
One need to take an url from the line and full path to the profiler will be:
http://localhost:34241/engine-profiler
@britzl Thank you a lot for pointing to editor source code. I will mark this topic as solved, but ideally something should be done about this. Just print path to profiler in console would be quick workaround. Anyway it’s pretty cool to have such a quick support from Defold team members, I’m impressed!
Thank you for the idea. If I understood correctly, server is started successfully and I just need to figure out what port it occupies. I’ve described a workaround in a post above.