I have the same problem. Build works normally through dmengine.apk but debugging throws HTTP 400 code in the editor. If I build and run the game first and then attach debugger, I get also this in the console:
ERROR:ENGINE: Too large message
WARNING:DLIB: Unsupported status code: 400
I also checked the editor log file from AppData\Local\Defold and this error comes in both debug and attach scenarios:
2020-07-14 13:27:36.325 109925 [JavaFX Application Thread] ERROR editor.debug-view - {:line 492, :msg “Failed to attach debugger to 192.168.178.21:8172.\nCheck that the game is running and is reachable over the network.\n”}
java.io.IOException: Server returned HTTP response code: 400 for URL: http://192.168.178.21:8001/post/@system/run_script
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1913)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
at editor.engine$run_script_BANG_.invokeStatic(engine.clj:112)
at editor.debug_view$attach_BANG_$fn__43803.invoke(debug_view.clj:566)
at editor.debug_view$attach_BANG_.invokeStatic(debug_view.clj:566)
at editor.app_view$attach_debugger_BANG_$fn__45874.invoke(app_view.clj:865)
at editor.app_view$async_build_BANG_$fn__45774$fn__45782.invoke(app_view.clj:772)
at clojure.lang.AFn.run(AFn.java:22)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)
Info from editor:
Defold channel
editor-alpha
Defold editor sha
93dfddbda0cfa48df9b4cbbd805addeeff1edae3
Defold engine sha
5791ee6d96b87e50eee5acd70abaa4026fefef28
Defold version
1.2.170
GPU
GeForce GT 635M/PCIe/SSE2
GPU Driver
4.6.0 NVIDIA 391.35
Java version
11.0.1+13
OS arch
amd64
OS name
Windows 10
OS version
10.0
Info from dmengine.apk:
Defold version
1.2.170
SHA1
5791ee6d96b87e50eee5acd70abaa4026fefef28
Listening on interfaces:
192.168.178.21
Info from Android:
Model
moto g7 plus (XT1965-3)
Android version
10
Security batch level
June 1, 2020
Build number:
QPWS30.61-21-11
Edit: I’ve also tried these:
restart phone and PC
check firewall settings and let through dmengine.exe and java.exe
delete Defold folders from AppData and and reinstall editor and dmengine.apk
test in different project (I created a new project from mobile project template)
If I remember right, this worked couple weeks back when I was using another computer. But I haven’t had many successes with Android debugging. It works sometimes
Also a side question: Most of the time I have to wait approx. 5 minutes until my phone is showing in the editor Project -> Target. Is this normal?
2020-07-14 21:02:51.590 23956 [clojure-agent-send-off-pool-7] INFO editor.boot-open-project - {:line 407, :message "project loaded"}
2020-07-14 21:03:04.951 37317 [pool-3-thread-1] ERROR editor.error-reporting - {:line 110}
java.net.SocketTimeoutException: connect timed out
at java.base/java.net.PlainSocketImpl.waitForConnect(Native Method)
at java.base/java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:107)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
at java.base/java.net.Socket.connect(Socket.java:591)
at editor.debugging.mobdebug$try_connect_BANG_.invokeStatic(mobdebug.clj:328)
at editor.debugging.mobdebug$connect_BANG_$fn__43028.invoke(mobdebug.clj:333)
at clojure.lang.AFn.run(AFn.java:22)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
I get that same error too if I start debugging the game before building it first. If you build it first and then debug/attach debugger it should work. I’ve had that error always. I don’t know if it’s a bug but it has not been a problem for me