Getting "iDeviceInstaller" error even when ideviceinstaller is installed on my mac - eclipse

I am using mac OSX El Capitan. I have installed eclipse Neon in it. I have a full setup of running selenium scripts using appium on real ios device. For this i have "ideviceinstaller" also installed. I created a project in a workspace to launch an app on the device and it is working fine. But when i copied the same code to different project, it starts giving me the error
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Could not initialize ideviceinstaller; make sure it is installed and works on your system) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 33.97 seconds
Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42'
System info: host: 'MacBookBL9138C.local', ip: '10.104.150.28', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_73'.
I tried by uninstalling the current eclipse and installing eclipse lunar, but its still failing. I tried running same code in new workspace, but still same error.
Any help will be appreciated.

I think i have found the answer for this one. I missed to configure the path in eclipse.
For refer the below link for answer:
https://discuss.appium.io/t/error-could-not-initialize-ideviceinstaller-make-sure-it-is-installed-and-works-on-your-system/11699/5?u=tuhuynh

Related

Original error: Could not find 'aapt.exe'

I am having hte below error when i try to open an app using appium
org.openqa.selenium.SessionNotCreatedException: Unable to create a new
remote session. Please check the server log for more details. Original
error: An unknown server-side error occurred while processing the
command. Original error: Could not find 'aapt.exe' in
["C:\Users\nsingh163\Desktop\Naresh Folder\Automation\Mobile
Automation\Downloads\Android-sdk\platform-tools\aapt.exe","C:\Users\nsingh163\Desktop\Naresh Folder\Automation\Mobile
Automation\Downloads\Android-sdk\emulator\aapt.exe","C:\Users\nsingh163\Desktop\Naresh
Folder\Automation\Mobile
Automation\Downloads\Android-sdk\tools\aapt.exe","C:\Users\nsingh163\Desktop\Naresh
Folder\Automation\Mobile
Automation\Downloads\Android-sdk\tools\bin\aapt.exe"]. Do you
have Android Build Tools installed at
'C:\Users\nsingh163\Desktop\Naresh Folder\Automation\Mobile
Automation\Downloads\Android-sdk'? Build info: version: '3.141.59',
revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host:
'USD4FWTN2', ip: '10.88.4.6', os.name: 'Windows 10', os.arch: 'amd64',
os.version: '10.0', java.version: '1.8.0_171' Driver info:
driver.version: AndroidDriver
I have tried installing Android SDK again but still not able to find aapt.exe in hte tools folder
I am quite new to the mobile automation but I encountered this issue and how I managed to fix it...
aapt.exe is actually not in the "tools" folder :), you have to get "build-tools" folder and there you can find it
in cmd or whatever you are using, you can enter this command (bare in mind that the version is just as an example, I think that it has to match platform-tools you installed previously)
sdkmanager "build-tools;28.0.0"
So, once you have the build-tools folder, just go there and copy aapt.exe from there to the "tools" folder
To resolve this issue, below are the steps:
1. Find API level for your phone/ device. Setting -> About device -> Software Info -> Note down Android Version. -> Goto https://en.wikipedia.org/wiki/Android_version_history
from here, find out API Level for your Android Version.
2. Navigate to sdkmanager.bat path in CMD (\sdk-tools-windows-4333796\tools\bin) and use "sdkmanager "build-tools;21.0.0" to download build-tools for API level 21, change it as per your API level.
3. Once done, copy aapt.exe file from build-tools folder to platform-tools folder.
This should resolve the issue.

getting an error on trying to launch Chrome using Protractor

I'm trying to launch the browser through Protractor. I downloaded webdriver through terminal by giving webdriver-manager update command. This is downloading the latest chromedriver v74, but the chrome browser is v73.
How to explicitly set the WebDriver version?
I'm getting the following error:
[11:09:13] E/driverProvider - Error code: 135
[11:09:13] E/driverProvider - Error message: session not created: This version of ChromeDriver only supports Chrome version 74
[11:09:13] E/driverProvider - Error: session not created: This version of ChromeDriver only supports Chrome version 74
(Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729#{#29}),platform=Mac OS X 10.14.2 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.70 seconds
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'Acsahs-MBP', ip: 'fe80:0:0:0:45:3f89:2e8b:ab96%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.2', java.version: '1.8.0_191'
Driver info: driver.version: unknown
at Local.<anonymous> (/usr/local/lib/node_modules/protractor/built/driverProviders/driverProvider.js:69:23)
at Generator.throw (<anonymous>)
at rejected (/usr/local/lib/node_modules/protractor/built/driverProviders/driverProvider.js:5:65)
at processTicksAndRejections (internal/process/next_tick.js:81:5)
[11:09:13] E/launcher - Process exited with error code 135
My config file:
exports.config = {
seleniumaddress:'http://localhost:4444/wd/hub',
specs:['spec.js']
};
is it solved yet? if not then try this.
for my small selenium-webdriver test i did these steps after i researched online and here:
npm install selenium-webdriver
npm install chromedriver
npm install geckodriver and opened file library.js and npm init and ran node library.js (source code below)
Error: (node:14212) UnhandledPromiseRejectionWarning: NoSuchSessionError: invalid session id Some long error related to not same chromedriver version. so i checked the chrome browser version manually in the browser. it was version 73 and my mistake i had downloaded chromedriver version 74.0.
so go to https://chromedriver.storage.googleapis.com/index.html?path=73.0.3683.68/ download according to your OS and download it in ~/Downloads .
then in open terminal in the ~/Downloads folder.
then USER#DESKTOP:~/Downloads$ unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads You will get the raw chromedriver file in ~/Downloads folder.
now i moved the ChromeDriver 73.0.3683.68 file to two places - usr/local/bin and usr/bin in my system.
there was already a chromedriver file in usr/local/bin .
to move the file - USER#DESKTOP:~/Downloads$ sudo mv -f ~/Downloads/chromedriver /usr/local/bin/chromedriver and USER#DESKTOP:~/Downloads$ sudo mv -f ~/Downloads/chromedriver /usr/bin/chromedriver you are saying you want to move the file chromedriver from first location to other means replacing any files already in those locations with same name.
Last all i did was. close the vscode and relaunched it. and ran my code node library.js . and it worked it the chrome browser for me.
TOOK AN HOUR FOR ME TO GO THROUGH AROUND 35-40 STACK-OVERFLOW AND RANDOM ONLINE RESOURCES/QUESTION-ANSWERS BUT WAS WORTH IT. :)
SOURCE CODE : LIBRARY.JS
var webdriver = require('selenium-webdriver');
var By = webdriver.By;
var until = webdriver.until;
var driver = new webdriver.Builder().forBrowser('chrome').build();
driver.get('https://www.google.com');
Add this as a script to your package.json file
"scripts": {
"protactorInstall": "cd ./node_modules/protractor && npm i webdriver-manager#latest"}
use
npm run protactorInstall
to execute the script.
Try the below command from terminal to install particular version
webdriver-manager update --versions.chrome 2.46
Hope it helps you

Selenium shows java.net.SocketException: Connection reset

I have searched for the solution but I have not found the solution I always get this error
codigo :
public static void main(String [] args) {
System.setProperty("webdriver.chrome.driver","C:\\Users\\Ofima\\workspace\\OfimaWeb\\chromedriver.exe");
WebDriver driver= new ChromeDriver();
driver.get("http://ofimawebbeta.ofima.com/");
driver.manage().window().maximize();
driver.getTitle();
}
Error :
Starting ChromeDriver (v2.9.248315) on port 41785
ene 19, 2018 9:48:49 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFORMACIÓN: Detected dialect: OSS
Exception in thread "main" org.openqa.selenium.WebDriverException: java.net.SocketException: Connection reset
Build info: version: '3.8.0', revision: '924c4067df', time: '2017-11-30T11:37:19.049Z'
System info: host: 'PCPOF-021', ip: '10.72.4.128', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_151'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:92)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:325)
at OfimaWeb.cartera.main(cartera.java:23)
Caused by: java.net.SocketException: Connection reset
The error does gives us some hint as follows :
org.openqa.selenium.WebDriverException: java.net.SocketException: Connection reset
Which essentially implies that ChromeDriver binary is unable to spawn a new Chrome Browser process.
Your main issue is the version compatibility among the binaries you are using as follows:
You are using ChromeDriver v2.9 (released 2014-01-31)
Release Notes of ChromeDriver v2.9_ clearly mentions the following :
Supports Chrome v31-34
You mentioned of using latest Chrome. I suppose it is chrome=65.x
You are using Selenium Version 3.8.0 (released 2017-11-30T11:37:19.049Z) [as per the error stack trace within your question]
So there is a clear mismatch between requirement for ChromeDriver v2.9 and the Chrome Browser version you are using. Hence ChromeDriver is unable to spawn the new Chrome Browser process.
Solution
Update ChromeDriver to current v2.35 level.
Downgrade Chrome to stable Chrome v64.x levels. (as per ChromeDriver v2.35 release notes)
Upgrade Selenium to current levels Version 3.8.1.
Clean and Re-Build your project through your IDE.
Clear the Browser Cache
Use CCleaner tool to wipe off all the OS chores.
If your Web Browser base version is too old, uninstall the Web Browser through Revo Uninstaller with Moderate Scan and install a recent GA Released version of the Web Browser.
Execute your #Test.
Download ChromeDriver from
http://chromedriver.storage.googleapis.com/index.html?path=2.33/
This ChromeDriver shall work with your version of Google Chrome.

Install4j installer fails with internal error for Mac OS

I have built an installer using the latest Install4J. On the Mac OS, it fails to install with the following message: "An internal error has occuerred (error code: launch path not accessible)".
The same installer for other platforms (Windows 32/64, and Linux) work fine. Has anyone else seen this and know how to fix it?
It turns out, this error was caused by the OpenJDK JRE version i was using. It works fine with the Installed version of the JRE on my Mac.

Unable to determine gdb version in eclipse using PTP and SDM on OSX

I had this working fine until today and I have seemingly tried everything. I get an error when I try to launch a debugger in eclipse with PTP on OSX. The error comes up as:
Error completing debug job launch
Reason: Debugger error: Unable to
determine gdb version
I have tried running the same code in regular debugger, minus all the MPI stuff and that works fine. It also works fine when I simply run the MPI job locally. I have read somewhere that this might be an issue with Process Launcher? Where do I check this in PTP? I am also using latest Indigo eclipse with PTP version 5.0 and I have also built the sdm ddebugger for mac locally.
This also appears in console:
gdb: invalid option -- q
sdm [--debugger=value] [--debugger_path=path]
[--proxy=proxy]
[--ho
st=host_name] [--port=port]
[--master]
[--server=rank]
[--debug[=level]]
Finally, running gdb from terminal gives me:
GNU gdb 6.3.50-20050815 (Apple version
gdb-1515) (Sat Jan 15 08:33:48 UTC
2011)
Any ideas?
Thanks, Alex