iOS debugger connection refused with SDKs 3.5.0 and 3.5.1
After upgrading from SDK 3.4.1 to 3.5.0 (and 3.5.1), I can no longer debug under iOS. The iOS emulator starts and my application is loaded and runs ok. However, although Studio switches to the debug perspective, any breakpoints I set are ignored and I have no debugging capabilities. The only symptom indicating any issue are the series of messages like the one shown below in the Studio log file. Reverting to SDK 3.4.1 in my tiapp.xml restores the debugging capabilities.
Logs
!ENTRY com.aptana.js.debug.core 4 4 2015-05-04 05:30:38.465
!MESSAGE
!STACK 0
java.lang.NullPointerException
at org.eclipse.core.runtime.Path.fromPortableString(Path.java:103)
at com.appcelerator.titanium.core.launching.TitaniumAppURIMapper.resolve(TitaniumAppURIMapper.java:71)
at com.aptana.js.debug.core.internal.model.JSDebugTarget.resolveSourceFile(JSDebugTarget.java:2199)
at com.aptana.js.debug.core.internal.model.JSDebugTarget.handleScripts(JSDebugTarget.java:730)
at com.aptana.js.debug.core.internal.model.JSDebugTarget.access$6(JSDebugTarget.java:703)
at com.aptana.js.debug.core.internal.model.JSDebugTarget$DebugConnectionHandler.handleMessage(JSDebugTarget.java:2355)
at com.aptana.js.debug.core.internal.model.DebugConnection.handleMessage(DebugConnection.java:228)
at com.aptana.js.debug.core.internal.model.DebugConnection.access$3(DebugConnection.java:223)
at com.aptana.js.debug.core.internal.model.DebugConnection$1.run(DebugConnection.java:155)
Discussions
Here is a Q&A discussion where several other developers are reporting a similar issue...
[
http://developer.appcelerator.com/question/181417/debug-connection-refused-with-sdk-35-and-ios]
Softerware is getting the same issue, as a note this is only happening for them in one of their apps (their main app) im including the logs and tiConfig files from their enviroment
Let's start by fixing the NPE. Can we reproduce this in-house?
[~kkolipaka] Can you take a look into this ?
https://github.com/aptana/studio3/pull/328
[~egomez] We capture the debug protocol communication in the logs at the file
<workspace>/.metadata/.plugins/com.appcelerator.titanium.ios.core/logs/iosdebugger.log
. Default workspace for Appcelerator Studio is/Users/<user>/Documents/Appcelerator_Studio_Workspace
. Can you ask the customer to send this file after recreating the problem ? As we were unable to reproduce the problem here, it will give us insight to understand why we were not receiving the correct path of the file from SDK debugger.I have attached both the Studio log file and the iosdebugger.log from a session exhibiting the problem. Before running the iOS emulator, I cleaned the project and cleared both log files. This is with the Titanium SDK set to 3.5.1.GA. In this particular instance, I had a breakpoint set at line 318 of the source controller app/alloy/controllers/map.js which mapped to line 358 in it's generated counterpart at Resources/iphone/alloy/controllers/map.js.
Space in the project name is causing this issue. I could reproduce the issue If I create a project with a space in it.
_/Riverbend Music Center.app/app.js_ converted as _app:.app/app.js_ rather than _app:/app.js_ [~pinnamuri] Looks like iOS team has to look into it.
[~robgabbard] Thanks for providing the logs. Until we address this issue, as a workaround, would it be possible to rename the project to remove spaces in order to debug the app ?
That's not the case with our app, DPMobile. There are no spaces in the name. I believe Marco sent all my information, but if you need anything else I'm happy to send it along. Rob Trueman SofterWare, Inc.
I give up... how do I attach/upload the file? Also, my project is a classic app. I set a breakpoint at line 2516 of the app.js file (this project was mostly all app.js when I got it) and ran it in the simulator as an iPhone 6 (v. 8.3). It never stopped. Project is set to 3.5.1 GA.
While publishing our latest demo to the app store yesterday and showing another developer the build directory, I was shocked to see the Xcode project named "DP Mobile", not "DPMobile" as I had expected from the Appcelerator project. This morning I renamed to DPMobile and tested debugging. It worked successfully. For me, I can rename the project until the permanent solution is available. Thanks for all the support, folks! Rob
[~cng][~penrique] Issue is still there with 4.0 GA builds If project is having a space between the project name. The resource uri is returned wrongly from iOS debugger to studio. Could you please take a look at it ? Attached logs and error reported still valid even today with GA builds. Do let us know If we have to do something from studio.
Debugger PR: https://github.com/appcelerator/titanium_debugger/pull/38 TIMOB Master PR: https://github.com/appcelerator/titanium_mobile/pull/7345
Verified fixed, using: MacOS 10.11.3 (15D21) Studio 4.5.0.201602170821 Ti SDK 5.2.0.v20160220080449 Appc NPM 4.2.3-2 Appc CLI 5.2.0-269 Alloy 1.7.33 Xcode 7.2 (7C68) Was able to successfully debug multiple Alloy and Classic apps with and without spaces in the name across iOS simulators and devices and the QE test suite.