I am trying to run my appium automations using the Android Emulator, and am running into an issue where the environment is not available. The exact error I am getting is as follows:
Error: [init({"appium-version":"1.0","platformName":"Android","platformVersion":"5.1","deviceName":"Android Emulator","app":"/Users/andrew/Documents/sqor-dev-debug-4.5-19.apk","app-package":"","app-activity":""})] The environment you requested was unavailable.
My code is set up like so:
var wd = require('wd'),
chai = require('chai'),
_ = require('underscore'),
assert = require('assert'),
request = require('superagent'),
R = require('ramda');
var appPath = "/Users/andrew/Documents/sqor-dev-debug-4.5-19.apk";
var desired = {
"appium-version": "1.0",
platformName: "Android",
platformVersion: "5.1",
deviceName: "Android Emulator",
app: appPath,
"app-package": "",
"app-activity": ""
};
// DRIVER
var driver = wd.promiseChainRemote("127.0.0.1", 4723);
I know for sure that the app path is correct, and as far as I know my emulator is called Android Emulator. Any help would be most appreciated
No. And according to the Appium docs, the deviceName is actually ignored for Android, so it shouldnāt even make a difference. Iāve run the tests before with that being blank before, but itās been a few months so Iām essentially having to re-learn everything right now. For some reason, i canāt get my emulator to communicate with the Appium GUI. Here is a screen shot of my settings. The App Path is definitely correct.
From the screenshot of the errors it looks like the name is, āemulator-5554ā.
Also, the error is no longer, āEnvironment not availableā, but is now, āUnable to install apkā. It looks like you are making progress, frustrating as it is.
Edited to add: If it were me, I would bring up the emulator manually and try installing the apk with the adb commands you see in the error log to see if I could pin down exactly whatās failing.
From a quick reading it may be that you have an old version of the apk installed with a different manifest file. Removing that by hand may help things here.
This seems to be part of the issue. I went ahead and uninstalled the app that was already loaded into the emulator (which I didāt realize was even there until just now). When I was running it on a real device, it would automatically install the newest version of the app if I had updated the latest build, not sure why it wouldnāt here. But thank you⦠making progress. Letās see if I can get it to run from my command line now.