tns stopped recognizing my device. Cannot find connected devices - nativescript

I am developing an app using
nativescript 5.4.0,
tns-core-modules 5.4.2,
tns-android 5.4.0
In the past days I started receiving an error saying Cannot find connected devices.
Before everything was working fine. I was able to deploy my app on my RedMi 3 device and debug it from the console using tns run android.
I tried a lot of stuff. Reinstalling nativescript and android, reconfiguration of the device (usb debugging is active)...
adb is able to recognize the device, but tns is not. Additionally I am able to build a debug version as well.
I installed and tried on a new machine and continued to having this problem. I even tried with a different device.
Error: Trying to handle SIGINT event. CLI overrides this behavior and does not allow handling SIGINT as this causes issues with Ctrl + C in terminal
at process.on (C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\nativescript-cli.js:22:22)
at C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\node_modules\signal-exit\index.js:122:15
at Array.filter (<anonymous>)
at load (C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\node_modules\signal-exit\index.js:120:21)
at module.exports (C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\node_modules\signal-exit\index.js:35:5)
at Object.<anonymous> (C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\node_modules\proper-lockfile\lib\lockfile.js:296:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
Looking for project in 'C:\app\challenger'
Project directory is 'C:\app\challenger'.
Loading extensions.
Asserting extension nativescript-cloud is installed.
Extension nativescript-cloud is installed.
Asserting extension nativescript-starter-kits is installed.
Extension nativescript-starter-kits is installed.
System information:
{ platform: 'win32',
shell: 'C:\\Windows\\system32\\cmd.exe',
os: 'Windows 10 Pro 6.3.17134',
procArch: 'x64',
nodeVer: '8.11.3',
npmVer: '5.6.0',
nodeGypVer: null,
nativeScriptCliVersion: '5.4.0',
gitVer: '2.18.0.windows.1',
dotNetVer: '4.7.03056',
javacVersion: '1.8.0_211',
javaVersion: '1.8.0_211',
adbVer: '1.0.41',
androidInstalled: true,
monoVer: null,
gradleVer: null,
isAndroidSdkConfiguredCorrectly: true,
xcodeVer: undefined,
xcodeprojLocation: null,
itunesInstalled: false,
cocoaPodsVer: undefined,
isCocoaPodsWorkingCorrectly: false,
isCocoaPodsUpdateRequired: false,
pythonInfo: null }
Starting watch on killswitch C:\Users\stefa\AppData\Local\Temp\stefa\KillSwitches\cli
Initializing analytics statuses.
spawn: C:\Program Files\nodejs\node.exe "C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\detached-processes\cleanup-process.js" "C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\bootstrap.js"
Analytics statuses: { TrackFeatureUsage: 'enabled', TrackExceptions: 'enabled' }
Will send the following information to Google Analytics: { type: 'googleAnalyticsData',
category: 'CLI',
googleAnalyticsDataType: 'event',
action: 'Check Local Build Setup',
label: 'Starting',
customDimensions: { cd2: 'Angular', cd9: 'false', cd5: 'CLI' },
value: undefined }
spawn: C:\Program Files\nodejs\node.exe "C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\services\analytics\analytics-broker-process.js" "C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\bootstrap.js"
Your ANDROID_HOME environment variable is set and points to correct directory.
Your adb from the Android SDK is correctly installed.
The Android SDK is installed.
A compatible Android SDK for compilation is found.
Javac is installed and is configured properly.
The Java Development Kit (JDK) is installed and is configured properly.
Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
Will send the following information to Google Analytics: { type: 'googleAnalyticsData',
category: 'CLI',
googleAnalyticsDataType: 'event',
action: 'Check Local Build Setup',
label: 'Finished: Is setup correct: true',
customDimensions: { cd2: 'Angular', cd9: 'false', cd5: 'CLI' },
value: undefined }
Installed Android Targets are: [ 'android-28' ]
Directories found in C:\Android\android-sdk\build-tools are 28.0.3
Versions found in C:\Android\android-sdk\build-tools are 28.0.3
Selected version is: 28.0.3
Selected targetSdk is: 28
Validate options for platform: Android
Will send the following information to Google Analytics: { type: 'googleAnalyticsData',
category: 'CLI',
googleAnalyticsDataType: 'pageview',
path: 'run android',
title: 'run android',
customDimensions: { cd5: 'CLI', cd2: 'Angular', cd9: 'false' } }
Will send the following information to Google Analytics: { type: 'googleAnalyticsData',
category: 'CLI',
googleAnalyticsDataType: 'event',
action: 'Options',
label: '{"hmr":true,"log":"trace","$0":"_localpath","bundle":"webpack","profileDir":"private"}',
customDimensions: { cd2: 'Angular', cd9: 'false', cd5: 'CLI' },
value: undefined }
Will send the following information to Google Analytics: { type: 'PreviewAppData',
category: 'CLI',
googleAnalyticsDataType: 'event',
action: 'Preview App Data',
platform: 'Android',
label: 'Android',
customDimensions: { cd2: 'Angular', cd9: 'false', cd5: 'CLI' } }
Skipping node_modules folder! Use the syncAllFiles option to sync files from this folder.
Searching for devices...
startLookingForDevices; platform is Android
Options for ios-device-discovery { platform: 'Android',
shouldReturnImmediateResult: false,
emulator: false }
spawn: C:\Android\android-sdk\platform-tools\adb "start-server"
Result when throw error is false:
{ stdout: '', stderr: '', exitCode: 0 }
exitCode: 3221226356 }
{ characteristics: 'nosdcard nosdcard',
date: 'Thu Nov 22 02:07:05 CST 2018',
'date.utc': '1542823625',
description: 'kenzo-user 6.0.1 MMB29M 8.11.22 release-keys',
'device.ninur': '64687',
'display.hardware': '',
'display.id': 'MMB29M',
fingerprint: 'Xiaomi/kenzo/kenzo:6.0.1/MMB29M/8.11.22:user/release-keys',
flavor: 'kenzo-user',
'hardware.version': 'D2-2',
host: 'c3-miui-ota-bd74.bj',
id: 'MMB29M',
'network.type': '',
product: 'kenzo',
project: '',
'software.version': 'Android6.0.1_10',
tags: 'release-keys',
type: 'user',
user: 'builder',
all_codenames: 'REL',
base_os: '',
bsp: '0.8.1_170609',
codename: 'REL',
external: '',
incremental: '8.11.22',
internal: '',
preview_sdk: '0',
release: '6.0.1',
sdk: '23',
security_patch: '2018-07-01',
versiontype: '',
board: 'msm8952',
brand: 'Xiaomi',
'cpu.abi': 'arm64-v8a',
'cpu.abilist': 'arm64-v8a,armeabi-v7a,armeabi',
'cpu.abilist32': 'armeabi-v7a,armeabi',
'cpu.abilist64': 'arm64-v8a',
cuptsm: 'XIAOMI|ESE|02|01',
device: 'kenzo',
first_api_level: '22',
locale: 'en-GB',
'locale.language': 'en',
'locale.region': 'US',
manufacturer: 'Xiaomi',
mod_device: 'kenzo_global',
model: 'Redmi Note 3',
name: 'kenzo' }
{ characteristics: 'nosdcard nosdcard',
date: 'Thu Nov 22 02:07:05 CST 2018',
'date.utc': '1542823625',
description: 'kenzo-user 6.0.1 MMB29M 8.11.22 release-keys',
'device.ninur': '64687',
'display.hardware': '',
'display.id': 'MMB29M',
fingerprint: 'Xiaomi/kenzo/kenzo:6.0.1/MMB29M/8.11.22:user/release-keys',
flavor: 'kenzo-user',
'hardware.version': 'D2-2',
host: 'c3-miui-ota-bd74.bj',
id: 'MMB29M',
'network.type': '',
product: 'kenzo',
project: '',
'software.version': 'Android6.0.1_10',
tags: 'release-keys',
type: 'user',
user: 'builder',
all_codenames: 'REL',
base_os: '',
bsp: '0.8.1_170609',
codename: 'REL',
external: '',
incremental: '8.11.22',
internal: '',
preview_sdk: '0',
release: '6.0.1',
sdk: '23',
security_patch: '2018-07-01',
versiontype: '',
board: 'msm8952',
brand: 'Xiaomi',
'cpu.abi': 'arm64-v8a',
'cpu.abilist': 'arm64-v8a,armeabi-v7a,armeabi',
'cpu.abilist32': 'armeabi-v7a,armeabi',
'cpu.abilist64': 'arm64-v8a',
cuptsm: 'XIAOMI|ESE|02|01',
device: 'kenzo',
first_api_level: '22',
locale: 'en-GB',
'locale.language': 'en',
'locale.region': 'US',
manufacturer: 'Xiaomi',
mod_device: 'kenzo_global',
model: 'Redmi Note 3',
name: 'kenzo' }
spawn: C:\Android\android-sdk\platform-tools\adb "devices"
execFile: C:\Android\android-sdk\platform-tools\adb "-s" "6301b4cf" "shell" "getprop" "ro.product.manufacturer"
Error while checking for devices. { Error: Command failed: C:\Android\android-sdk\platform-tools\adb -s 6301b4cf shell getprop ro.product.manufacturer
at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
killed: false,
code: 3221226356,
signal: null,
cmd: 'C:\\Android\\android-sdk\\platform-tools\\adb -s 6301b4cf shell getprop ro.product.manufacturer' }
spawn: C:\Android\android-sdk\platform-tools\adb "devices"
spawn: C:\Android\android-sdk\tools\bin\avdmanager.bat "list" "avds"
Error while trying to get InstallDir property for \Software\Oracle\VirtualBox. More info: Error: QUERY command exited with code 1:
ERROR: The system was unable to find the specified registry key or value..
spawn: player 0
Configuration error for Genymotion { stdout: '', stderr: 'spawn player ENOENT', exitCode: 'ENOENT' }
execFile: C:\Android\android-sdk\platform-tools\adb "-s" "6301b4cf" "shell" "getprop" "ro.product.manufacturer"
Cannot find connected devices.
Emulator start failed with: Command failed: C:\Android\android-sdk\platform-tools\adb -s 6301b4cf shell getprop ro.product.manufacturer
To list currently connected devices and verify that the specified identifier exists, run 'tns device'.
To list available emulator images, run 'tns device <Platform> --available-devices'.
Error while initializing devicesService: Exception: Cannot find connected devices.
Emulator start failed with: Command failed: C:\Android\android-sdk\platform-tools\adb -s 6301b4cf shell getprop ro.product.manufacturer
To list currently connected devices and verify that the specified identifier exists, run 'tns device'.
To list available emulator images, run 'tns device <Platform> --available-devices'.
Error: Cannot find connected devices.
Emulator start failed with: Command failed: C:\Android\android-sdk\platform-tools\adb -s 6301b4cf shell getprop ro.product.manufacturer
To list currently connected devices and verify that the specified identifier exists, run 'tns device'.
To list available emulator images, run 'tns device <Platform> --available-devices'.
at Errors.fail (C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\common\errors.js:126:28)
at Errors.failWithoutHelp (C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\common\errors.js:136:21)
at DevicesService.<anonymous> (C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\common\mobile\mobile-core\devices-service.js:444:34)
at Generator.throw (<anonymous>)
at rejected (C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\common\mobile\mobile-core\devices-service.js:11:65)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)

Related

How to fix [ERROR] Could not resolve "path-browserify" in Astro Build 2.0?

I recently upgraded my Blog made with Astro 1.0 to the new Astro 2.0 using the next command:
npm install astro#latest
But when I try to run my project in development mode with npm run dev I found the next error:
[ERROR] Could not resolve "path-browserify"
node_modules/#astrojs/rss/dist/util.js:1:18:
1 │ import npath from "path-browserify";
╵ ~~~~~~~~~~~~~~~~~
You can mark the path "path-browserify" as external to exclude it from the bundle, which will
remove this error.
/Users/victoralvarado/Development/My Projects/vicbox-tech/node_modules/esbuild/lib/main.js:1604
let error = new Error(`${text}${summary}`);
^
Error: Build failed with 1 error:
node_modules/#astrojs/rss/dist/util.js:1:18: ERROR: Could not resolve "path-browserify"
at failureErrorWithLog (/Users/victoralvarado/Development/My Projects/vicbox-tech/node_modules/esbuild/lib/main.js:1604:15)
at /Users/victoralvarado/Development/My Projects/vicbox-tech/node_modules/esbuild/lib/main.js:1056:28
at runOnEndCallbacks (/Users/victoralvarado/Development/My Projects/vicbox-tech/node_modules/esbuild/lib/main.js:1476:61)
at buildResponseToResult (/Users/victoralvarado/Development/My Projects/vicbox-tech/node_modules/esbuild/lib/main.js:1054:7)
at /Users/victoralvarado/Development/My Projects/vicbox-tech/node_modules/esbuild/lib/main.js:1166:14
at responseCallbacks.<computed> (/Users/victoralvarado/Development/My Projects/vicbox-tech/node_modules/esbuild/lib/main.js:701:9)
at handleIncomingPacket (/Users/victoralvarado/Development/My Projects/vicbox-tech/node_modules/esbuild/lib/main.js:756:9)
at Socket.readFromStdout (/Users/victoralvarado/Development/My Projects/vicbox-tech/node_modules/esbuild/lib/main.js:677:7)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12) {
errors: [
{
detail: undefined,
id: '',
location: {
column: 18,
file: 'node_modules/#astrojs/rss/dist/util.js',
length: 17,
line: 1,
lineText: 'import npath from "path-browserify";',
namespace: '',
suggestion: ''
},
notes: [
{
location: null,
text: 'You can mark the path "path-browserify" as external to exclude it from the bundle, which will remove this error.'
}
],
pluginName: '',
text: 'Could not resolve "path-browserify"'
}
],
warnings: []
}
I don’t know exactly why and I tried many things to fix that without a positive result.
The last thing that I do was update the npm dependencies with a simple command npm update and the error was going. It was that way how to solve the error.
I ran the npm update command expecting some deprecated library or dependency to update and fix the error.

Electron js error - file not found

I have a electron app, so in my dashboard page i am getting an error look like this
Error: Unhandled "error" event.(File not found)
I am using tradingview widget.
var widget = new TradingView.widget({
// debug: true, // uncomment this line to see Library errors and warnings in the console
fullscreen: true,
symbol: 'AA',
interval: 'D',
container_id: "tv_chart_container",
// BEWARE: no trailing slash is expected in feed URL
datafeed: new Datafeeds.UDFCompatibleDatafeed("http://abc.loc/api"),
library_path: "../../assets/charting_library/",
locale: "en",
// Regression Trend-related functionality is not implemented yet, so it's hidden for a while
drawings_access: { type: 'black', tools: [ { name: "Regression Trend" } ] },
disabled_features: ["use_localstorage_for_settings"],
enabled_features: ["study_templates"],
charts_storage_url: 'http://saveload.tradingview.com',
charts_storage_api_version: "1.1",
client_id: 'tradingview.com',
user_id: 'public_user_id'
});
How can I get the file name which can not be found. Thanks!

Not able to run Protractor / Jasmine tests with Microsoft Edge

I'm working on a project to begin testing Node/Angular applications using Protractor and Jasmine. I have a POC working in most browsers but having a lot of trouble with MS Edge. Here's my environment:
OS: Windows 10 Pro (Version 1709, OS Build 16299.98)
Edge: 41.16299.15.0
EdgeHTML: 16.16299
MS Web Driver: 10.0.16299.15
Node: 6.12.0
Protractor: 5.2.1
Jasmine: 2.8.0
Selenium: 3.8.1
When I run the tests in Chrome, Firefox, and IE (11) the behavior is fine (tests run with expected results). However, with MS Edge the process fails before the test spec can even run.
Example code/output use the Protractor tutorial but I have the same issue when working with our application.
Working conf.js (for Chrome and Firefox)
exports.config = {
framework: 'jasmine',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['./spec/spec.js'],
multiCapabilities: [
{ 'browserName': 'chrome' },
{ 'browserName': 'firefox', 'marionette': true, 'firefox_binary': "C:\\Program Files\\Mozilla Firefox\\firefox.exe" }//,
]
}
Failing conf.js (for MS Edge)
exports.config = {
framework: 'jasmine',
seleniumAddress: 'http://localhost:17556',
specs: ['./spec/spec.js'],
capabilites: { browserName: 'MicrosoftEdge' }
}
spec.js
// spec.js
describe('Protractor Demo App', function() {
it('should have a title', function() {
browser.get('http://juliemr.github.io/protractor-demo/');
expect(browser.getTitle()).toEqual('Super Calculator');
});
});
When I run the test for MS Edge after starting the Microsoft Web Driver the following occurs:
$ protractor conf.js
[14:14:18] I/launcher - Running 1 instances of WebDriver
[14:14:18] I/hosted - Using the selenium server at http://localhost:17556
[14:14:20] E/launcher - Error code: 135
[14:14:20] E/launcher - Error message: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:17556
[14:14:20] E/launcher - Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:17556
at ClientRequest.<anonymous> (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\http\index.js:238:15)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at Socket.socketErrorListener (_http_client.js:310:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at emitErrorNT (net.js:1281:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
From: Task: WebDriver.createSession()
at Function.createSession (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:769:24)
at Function.createSession (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\chrome.js:761:15)
at createDriver (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\index.js:170:33)
at Builder.build (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\index.js:626:16)
at Hosted.getNewDriver (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\built\driverProviders\driverProvider.js:53:33)
at Runner.createBrowser (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\built\runner.js:195:43)
at q.then.then (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\built\runner.js:339:29)
at _fulfilled (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:796:13)
[14:14:20] E/launcher - Process exited with error code 135
The problem seems to be somewhere around that it says it is using the server on 'localhost' but then makes requests on '127.0.0.1' instead. In theory, they are the same. But in operation, only 'localhost' is responsive. If I try to access 127.0.0.1:17556 it doesn't respond.
This website could not be found
Error Code: INET_E_RESOURCE_NOT_FOUND
I've been looking around a long time (here, SQA, and, the Protactor discussions on GitHub) for info on this but have not found a resolution. Some discussion on GitHub indicates MS Edge testing with Protractor was working at one point. Has anyone been able to successfully run Protractor tests with this version of MS Edge and MS Webdriver?
One final bit of info: I have access to another Windows 10 machine that has an older version of Edge (10240). On that machine I don't have this problem (localhost vs 127.0.0.1), but, it is old enough to still have issues with async and I'm not able to use it for testing with Protractor.
Thanks!
UPDATE
The spec file has not changed but I have updated the config file (conf.js):
// conf.js
exports.config = {
directConnect: false,
framework: 'jasmine',
specs: ['./spec/spec.js'],
seleniumAddress: 'http://localhost:4444/wd/hub',
multiCapabilities: [
//{ 'browserName': 'chrome' },
//{ 'browserName': 'firefox', 'marionette': true, 'firefox_binary': "C:\\Program Files\\Mozilla Firefox\\firefox.exe" },
{ 'browserName': 'MicrosoftEdge' }
]
};
When enabled Chrome and Firefox are able to run the test.
Edge fails with the following (timeout waiting for driver server to start):
$ protractor conf.js
[13:13:53] I/launcher - Running 1 instances of WebDriver
[13:13:53] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[13:14:13] E/launcher - Timed out waiting for driver server to start.
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'QA-01', ip: '10.1.1.80', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '9.0.1'
Driver info: driver.version: unknown
[13:14:13] E/launcher - WebDriverError: Timed out waiting for driver server to start.
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'QA-01', ip: '10.1.1.80', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '9.0.1'
Driver info: driver.version: unknown
at WebDriverError (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:27:5)
at Object.checkLegacyResponse (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:546:15)
at parseHttpResponse (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:509:13)
at doSend.then.response (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:441:30)
at process._tickCallback (internal/process/next_tick.js:109:7)
From: Task: WebDriver.createSession()
at Function.createSession (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:769:24)
at createDriver (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\index.js:170:33)
at Builder.build (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\index.js:635:14)
at Hosted.getNewDriver (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\built\driverProviders\driverProvider.js:53:33)
at Runner.createBrowser (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\built\runner.js:195:43)
at q.then.then (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\built\runner.js:339:29)
at _fulfilled (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:796:13)
at C:\Users\USER.NAME\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:556:49
[13:14:13] E/launcher - Process exited with error code 199
As before - the same setup on an older version of Windows 10, Edge (10240), and, the Edge Driver do try to run the tests (albeit with the async execution issue).
This setup is probably better than what I used before but the overall outcome is the same. Protractor tests (on this machine) aren't running in MS Edge (16299).
Any insight or advice is much appreciated.
Thanks!
From what I can gather you need to tell protractor where to find the Edge driver. I found a few blog posts that mention adding seleniumArgs to the config.
seleniumArgs: ['-Dwebdriver.edge.driver=your/path/to/MicrosoftWebDriver.exe']
After additional time and working with yet another Windows 10 machine I have successfully gotten this simple test to run.
I can only conclude that there was something on that particular machine preventing proper execution of the test. I wasn't able to figure out what that was, but, the "does it work?" question is answered. It does (which is what one would expect).
conf.js:
// conf.js
exports.config = {
directConnect: false,
framework: 'jasmine',
specs: ['./spec/spec.js'],
seleniumAddress: 'http://localhost:4444/wd/hub',
multiCapabilities: [
{ 'browserName': 'chrome' },
{ 'browserName': 'firefox', 'marionette': true },
{ 'browserName': 'MicrosoftEdge' }
]
};
spec.js:
// spec.js
describe('Protractor Demo App', function() {
it('should have a title', function() {
browser.get('http://juliemr.github.io/protractor-demo/');
expect(browser.getTitle()).toEqual('Super Calculator');
});
});
Results:
[10:07:15] I/launcher - 0 instance(s) of WebDriver still running
[10:07:15] I/launcher - chrome #01 passed
[10:07:15] I/launcher - MicrosoftEdge #21 passed
[10:07:15] I/launcher - firefox #11 passed

Time out exception is displaying while running "Protractor test script" in "internet explorer" browser

I am unable to run "protractor test script" in "Internet explorer" browser.
I run below command.
webdriver-manager update --ie --versions.standalone 3.4.0 --versions.ie 3.4.0
my configuration file code is as below.
exports.config = {
allScriptsTimeout: 15000,
seleniumAddress:'http://localhost:4444/wd/hub',
capabilities:
{
'browserName': 'internet explorer',
'platform' : 'ANY',
'version' : '11'
},
suites: {
heropage: ['e2e/hero/hero.e2e-spec.ts'],
dashboardpage : ['e2e/dashboard/dashboard.e2e-spec.ts']
},
baseUrl: 'http://localhost:4200/',
// directConnect : true,
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 50000,
includeStackTrace: true
},
onPrepare() {
require('ts-node').register({
project: 'e2e/tsconfig.e2e.json'
});
},
}
I change all the required setting for internet explorer browser in "internet options" by following http://elgalu.github.io/2014/run-protractor-against-internet-explorer-vm/
I am getting below error
Failed: JavaScript error in async script. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 26 milliseconds
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'BHUVISDESK-16', ip: '192.168.0.109', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0',
java.version: '1.8.0_144'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{se:ieOptions={browserAttachTimeout=0.0, ie.enableFullPageScreenshot=true, enablePersistentHover=true, i
e.forceCreateProcessApi=false, ie.forceShellWindowsApi=false, ignoreZoomSetting=false, ie.fileUploadDialogTimeout=3000.0,
ie.useLegacyFileUploadDialogHandling=false, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0.0, ie.
browserCommandLineSwitches=, requireWindowFocus=false, initialBrowserUrl=http://localhost:39545/, ignoreProtectedModeSetti
ngs=false, enableElementCacheCleanup=true}, browserName=internet explorer, pageLoadStrategy=normal, javascriptEnabled=true
, version=11, platform=WINDOWS, unexpectedAlertBehaviour=dismiss}]
Session ID: 01bf3915-d549-421b-a6f1-771e17c78cc7
Can any one help me what's my mistake in this process

how many instances for virtual machine started for protractor tests in sauce labs

We were evaluating Sauce labs for our application. We were trying to get protractor tests run on multiple browsers at same time in Sauce labs. Will there be a new instance of VM created to run tests on each browser? We have configured protractor for multicapablities.
When would the new instance of VM be created? and if possible how would we configure to run tests on single VM or multiple VM?
Thanks.
It is possible to have protractor start multiple capabilities at the same time as well as run multiple tests in parallel. ( i do it in a work project )
By default i believe that each capability will run in parallel, to have the tests run in parallel also you need to set the shardTestFiles: true option.
https://github.com/angular/protractor/blob/master/docs/referenceConf.js#L114-L117
note this will be limited to the max instances limit of your saucelabs account (normally 10)
you can see in the following code snippet that we have set our protractor to give precedence to IE8 as its is the slowest, then the other browsers will start a maximum of 3 test scripts in parallel with the rest queuing up
maxSessions: 10,
multiCapabilities: [
{
browserName: 'internet explorer',
version: '10',
shardTestFiles: true,
maxInstances: 3,
'screen-resolution': '1024x768',
build: process.env.CI_BUILD_NUMBER
},
{
browserName: 'internet explorer',
version: '8',
platform: 'Windows XP',
shardTestFiles: true,
maxInstances: 10,
'screen-resolution': '1024x768',
build: process.env.CI_BUILD_NUMBER
},
{
browserName: 'firefox',
platform: 'Windows 8',
shardTestFiles: true,
maxInstances: 3,
'screen-resolution': '1024x768',
build: process.env.CI_BUILD_NUMBER
},
{
browserName: 'safari',
version: '7',
platform: 'OS X 10.9',
shardTestFiles: true,
maxInstances: 3,
'screen-resolution': '1024x768',
build: process.env.CI_BUILD_NUMBER
},
{
browserName: 'chrome',
platform: 'Windows 8.1',
shardTestFiles: true,
maxInstances: 3,
'screen-resolution': '1024x768'
}
]

Resources