Re: [appium-discuss] Cannot launch app on device for second time.

124 views
Skip to first unread message
Message has been deleted

Jonathan Lipps

unread,
Apr 4, 2013, 12:09:40 PM4/4/13
to Rakesh Cherian, appium-...@googlegroups.com
Hi Rakesh,

Are you using latest from github or are you using Appium.app?

I'm definitely able to run any number of sessions, calling driver.quit in between, with no problem. How are you starting the server? Are you passing 'app' in with desiredCaps or as a command line parameter?

Jonathan

On Apr 4, 2013, at 8:27 AM, Rakesh Cherian <rakesh...@gmail.com> wrote:

Hello 

Hmm. the previous query i sent vanished into this air.. so here it goes again..

I am running java scripts ( ruby show the same effect ) to launch an app and perform test using appium

BeforeTest {  
Webdriver launches app
 }
AfterTest {  Webdriver .quit }
Test1 {}
Test2 {}


In  Simulator, it runs as follows

BeforeTest
Test1
AfterTest
BeforeTest
Test2
AfterTest

But on device, it shows different behaviour

BeforeTest
Test1
AfterTest
BeforeTest   --> Error

Appium side Message:  
error: Instruments did not launch successfully, failing session
error: Failed to start an Appium session, err was: Instruments did not launch successfully--please check your app paths or bundle IDs and try again

Script side Message:


INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ test ---
[INFO] Surefire report directory: /Users/rakesh/Work/git/qa/gui_tests/IphoneAutomation/test/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running TestSuite
Tests run: 19, Failures: 1, Errors: 0, Skipped: 17, Time elapsed: 25.766 sec <<< FAILURE!

Results :

Failed tests: 
  setUp on null(com.qnective.qtalksecure.test.ExecLoginTests)(com.qnective.qtalksecure.test.ExecLoginTests): A session is either terminated or not started (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2.84 seconds
Build info: version: '2.31.0', revision: '1bd294d185a80fa4206dfeab80ba773c04ac33c0', time: '2013-02-27 13:51:26'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.7.4', java.version: '1.6.0_35'
Driver info: org.openqa.selenium.remote.RemoteWebDriver

Tests run: 19, Failures: 1, Errors: 0, Skipped: 17

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.654s
[INFO] Finished at: Thu Apr 04 17:03:58 CEST 2013
[INFO] Final Memory: 5M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.7.2:test (default-test) on project test: There are test failures.
[ERROR] 
[ERROR] Please refer to /Users/rakesh/Work/git/qa/gui_tests/IphoneAutomation/test/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
PC018:test rakesh$ 


I have found that whenever driver.quit() is called , next time app is not launched by the driver. So I manually have to kill the instance in iphone and then run the test. Is there any workaround ?

Thanks for any help.



--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Rakesh Cherian

unread,
Apr 5, 2013, 4:37:17 AM4/5/13
to appium-...@googlegroups.com, Rakesh Cherian
Thats surprising Jonathan.

I use github, commit : 2a3fedf8d73e6d60adcff5c83dc18141cc290ed6
s

I tried with both --app parameter,
 and without --app  but with desiredcapabilites

Both cases, it does not work on DEVICE for second time, Did you try on device or simulator ?

Rakesh

Rakesh Cherian

unread,
Apr 8, 2013, 3:10:08 AM4/8/13
to appium-...@googlegroups.com, Rakesh Cherian
anyone tried on DEVICE  twice ?
Reply all
Reply to author
Forward
0 new messages