Running remote appium server using AppiumService, python

hello.

I want to run the server on the remote mac using AppiumService () of Python-Appium-Client.
It is possible to pass the IP address and port number through the Args parameter in the start() method, but it is not executed properly.

appium_server.start(args=["--address", f"{ip}", "-p", f"{port}"], node="/usr/local/bin/node", npm="/usr/local/bin/npm", main_script="/usr/local/lib/node_modules/appium/build/lib/main.js")
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/node'

Do I have to pass the remote Mac information in the node, npm, main_script parameters?

If you know any blog post or documentation, could you share that?

Thank you.

Is node installed on remote Mac? If so, what is the path to node? If you have physical access you can open a terminal and type:

which node

to find the correct path. If you only have ssh access you can give the same command once you’ve connected.

Once you’ve found the path to node you can change your Python to the correct value.

hello @wreed !

of course, node="/usr/local/bin/node" is collect path which on remote Mac (intel chip).

all parameter info that I wrote is collect information on remote mac.

I don’t understand this at all. I think you are making a mistake somewhere, probably in the path. If you disagree that’s fine, I can’t personally look at the path and verify. It may be that I can’t help you.

This API is only supposed to work on the same machine where it is executed. If you want to control the server remotely then consider using something else, for example paramiko

1 Like

@mykola-mokhnach

Oh, I got it. Thanks!