question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

appium kills all instruments processes

See original GitHub issue

@aluedeke commented on Thu Nov 12 2015

We currently experiencing issues running parallel tests with appium on the same host (which is technical possible since some time).

Fortunately testing fails randomly. We currently believe thats because appium is trying to kill all instrument processes on an host. I think that is a super ugly behaviour and should be changed if possible (or must be at least configurable).

@sebv @lbielski do you have some opinions on that?


@lbielski commented on Thu Nov 12 2015

Yes, this is not a good behaviour when Appium is not run locally on a single device. We have successfully tested running multiple Appium sessions in parallel on the same host and it does work (you just have to provide different tmp folders as a parameter), but killing all of the instruments processes also messes up with other running Appium sessions.

I understand that there is a need to kill instruments sometimes and for that we need to link Appium sessions to instruments instance. You can kind of tag a process by starting it with an environmental variable, for example APPIUM_SESSION_ID=<session_id>./. Then, when you need instruments to be restarted you can search for a process which contains this env variable. On Mac it can be done by ps -p <pid> -wwwE. This way you can uniquely identify instruments instance for a specific Appium session. I would think it makes sense to make this an option for people running Appium sessions on parallel.

Another and simpler option would be to provide an option to disable this behaviour, so when instruments are not working Appium just gives up without trying to fix instruments.


@aluedeke commented on Sun Nov 15 2015

@jlipps @bootstraponline any feedback?


@jlipps commented on Mon Nov 16 2015

i do think appium tries to kill all instruments processes, which is bad. i’m not sure if this same strategy is used in appium 1.5 though. @imurchie ?


@imurchie commented on Mon Nov 16 2015

1.5 does still do this. I’m not sure why, other than it always has.

I’m all for making this the default behaviour and putting the other behind a desired capability. We will have to investigate the best route for this.


@aluedeke commented on Tue Nov 17 2015

@imurchie we are currently evaluating if providing a custom path to pkill would be sufficient, will ping back when we now more


@saikrishna321 commented on Mon Dec 28 2015

@aluedeke any updates on this ?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
imurchiecommented, Apr 24, 2017

That log line comes from https://github.com/appium/appium-instruments/blob/master/lib/instruments.js#L358-L385, which only kills the single Instruments process. It should not kill everything.

0reactions
lock[bot]commented, Apr 26, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Instruments Crash Running Parallel Tests in Physical Devices
After each test suite executed on a specific device, I kill the appium server process (related to that device) and launch the server...
Read more >
Had to kill the running app everytime for appium tests to run ...
Is anyone noticing this ? Once a testcase is complete and session is closed, executed via the webdriver , Cannot run the next...
Read more >
Appium Error: Instruments crashed on startup - TesterHome
info: Killing the simulator process info: Killing any other simulator daemons debug: Checking whether instruments supports our device string
Read more >
Automation / Mobile / Troubleshooting Appium - Infinum
Could not proxy command · Open Terminal · Run command: lsof -Pn -i4. Lists all active processes · Run command: kill -9 <processNumber>....
Read more >
Appium, Instruments crashed on startup - ios - Stack Overflow
Making sure you have Use Native Instruments Library checked under Advance settings for IOS platform in Appium's UI and ensuring Enable UI ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found