-
Notifications
You must be signed in to change notification settings - Fork 469
enhancement on python run_command #218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1. the python script should move forward only if it launches the app successfully
I've tested this change with 'cordova', and running 'cordova run ios' still results in the process hanging on this line:
|
Same here using XCode 7.3 and ios-deploy with your fix. |
@omefire @akofman Thanks for the feedback:)
Update: |
I just tested it manually and it happens every times :/ |
Same here, manual test and I always face this issue. |
Might be an Xcode 7.3 thing. |
@shazron : if it can help, XCode 7.2 is using lldb-340.4.119.1 while XCode 7.3 is using lldb-350.0.21.3. |
I tried a fix but not sure it is fine for every version of XCode : akofman@396daae. |
I'll check it out @akofman |
@akofman good news, and bad news -- it solves the hanging issue, but now the app quits after launch. |
Ah ? I'll try on ios9.3 and XCode 7.3 and the app stayed alive. |
I'm using Xcode 7.3, iOS 9.3.1 (iPhone 6s), and launching using "cordova run --device" |
Ah yes sorry, I was testing on ios8. With ios9.3, indeed the app quits. grrrr |
I noticed the app doesn't quit actually but goes in background. |
So when I commented out this line: After a wait, I now get:
|
Now I can't repro the hanging state anymore -- very strange. |
Even with this line commented, it still hangs on my side :( |
I've rebooted my computer, etc, and still can't get this issue to repro, when I could before. I did have a fresh install of Xcode 7.3 hours ago, not sure what changed in the interim (did it install something in the background?) |
Without any changes in the code ? |
Yes, no changes. |
And you're still using an ios 9.3 ?? WTH |
I see in the Xcode 7.3 Release Notes: "Debugging can hang on launch if an .lldbinit file is present that tries to call quit in Python code during debugger initialization. (24360903)" |
@akofman Nothing has changed. I will have to try tonight on another computer. The code is the same, so it has to be my "environment" somehow. |
Did you check if your lldb version has been changed ? XCode 7.3 (7D175) => lldb-350.0.21.3 |
No change, it's XCode 7.3 (7D175) => lldb-350.0.21.3 |
Guys, I wish I could help but I am stuck with a python error |
@hackjustu that's strange, ios-deploy does not import any module named "six" at all, I believe everything is standard lib |
@hackjustu Seems it's one of the lldb python init files |
@shazron Trying it out ... |
Update: I didn't have time to write my results before I left, but I did more testing after my last statement, and I could eventually repro if I ran the command immediately again after a successful quit. It's sporadic. When running, ios-deploy should have two processes, plus one lldb process. "killall ios-deploy" and "killall lldb" to have a clean slate. The essential problem is, lldb is not exiting, thus ios-deploy cannot exit as well. |
It's really weird you're not able to reproduce it like before. In my case, it hangs every time we try to detach the app from the debugger. As an example If I add a log after this line, it will never be printed. What do you think ? |
@akofman Did you actually get |
@akofman doing a |
trying to find changes since lldb-340.4.119.1 - not sure how that is tagged |
I believe I found the culprit. I'm on a different computer and I can repro reliably. It's not Make sure you have the latest
Create a new Cordova project with the iOS platform:
I've tried it a lot of times, with the results above. Make sure you do a Perhaps cordova's usage of nodejs' |
@hackjustu: yep I get the @shazron : I just noticed you're using ios 9.3.1 and I'm using ios 9.3. I'm going to update my iPad and check again. |
It is the same using ios 9.3.1. |
If I add a quite long sleep before detaching the process, it works. But it needs like a sleep of 20s.
|
Ok. So I investigated a little bit more. It looks like without the waitForEvent method, everything works well and detaching the process doesn't hang anymore. So I just removed all this part and simply get the state of the process from ... the process himself => akofman@4400067 I tested it on ios 9.3, ios 9.3.2 and ios 8.1 using @omefire: could you have a try ? |
@akofman I'm not sure. The commit is here perhaps @senthilmanick can comment since I merged it in from his implementation. |
Yep, would be nice to have an explanation from the commiter :) |
Is this superseded by #223 now? :) |
I think yes. @hackjustu agree ? |
Yes, even the |
justlaunch
scenario, the python script should move forward only if it launches the app successfully. If it fails, it should propagate the exit code out to notify the the users to handle the failure (perhaps relaunch?), instead of being trapped in the following loop in thesafequit
method.ios-deploy --justlaunch --debug --bundle my.app
.-justlaunch
scenario.