how to remove sails js default log messages - node.js

Please how to remove this default log messages that are displayed when "sails lift" that also written to my external log files :
info: Starting app...
debug: Deprecation warning: Support for `sails.config.sockets.onConnect` will be
removed in an upcoming release. See the v0.11 migration guide for more informat
ion and alternate options.
info:
info: .-..-.
info:
info: Sails <| .-..-.
info: v0.12.4 |\
info: /|.\
info: / || \
info: ,' |' \
info: .-'.-==|/_--'
info: `--'-------'
info: __---___--___---___--___---___--___
info: ____---___--___---___--___---___--___-__
info:
info: Server lifted in `E:\Orange\sailsJS_workspace\server`
info: To see your app, visit http://localhost:1337
info: To shut down Sails, press <CTRL> + C at any time.
debug: -------------------------------------------------------
debug: :: Wed Nov 02 2016 12:03:45 GMT+0200 (Egypt Standard Time)
debug: Environment : development
debug: Port : 1337
debug: -------------------------------------------------------

Just add:
noShip: true
To file: config/log.js
For other default log messages play with "level", it's documented in comments at beginning of file.

Set level: to silent in the log.js
Ex:
module.exports.log = {
custom: blahblahBlah,
inspect: false
level: 'info'
};

Related

Cannot create a new Browser using jxbrowser on linux

I have a small test program using jxbrowser working on a Mac. I am trying to run the test program on a Fedora install and I connot get an instance of a Browser object.
Here is the logging of the program. Does anyone have an idea of what can cause jxbrowser to fail creating the browser ?
-- Product name: JxBrowser
-- Licensed version: 6.x
-- Licensed to:
-- License type: Evaluation
-- Generation date: Feb 23, 2017
-- Expiration date: Mar 25, 2017
-- License info: Single-user license
-- Current date: Feb 28, 2017 JxBrowser license valid. 04:27:24 INFO: OS name: Linux 04:27:24 INFO: OS version:
4.8.6-300.fc25.x86_64 04:27:24 INFO: JRE version: 1.8.0_111 64-bit 04:27:24 INFO: JxBrowser version: 6.12 04:27:24 INFO: Temp: /tmp
16:27:24:208 INFO [main] (be.lyncos.ivista.tools.Test) - Before new
Browser 04:27:24 INFO: JxBrowser type: HEAVYWEIGHT 04:27:24 INFO:
Starting IPC... 04:27:24 INFO: Starting IPC Server... 04:27:24
INFO: Starting socket server 04:27:24 INFO: Starting socket server
at port 1101... 04:27:24 INFO: Starting IPC Process... 04:27:24
INFO: Starting Chromium process... 04:27:24 INFO: The
'/lib/x86_64-linux-gnu/libudev.so.0' library exists: FALSE 04:27:24
INFO: The '/tmp/jxbrowser-chromium-55.0.2883.87.6.12/libudev.so.0'
library exists: TRUE 04:27:24 INFO: The
'/lib/x86_64-linux-gnu/libgcrypt.so.11' library exists: FALSE
04:27:24 INFO: The
'/tmp/jxbrowser-chromium-55.0.2883.87.6.12/libgcrypt.so.11' library
exists: TRUE 04:27:24 INFO: The
'/lib/x86_64-linux-gnu/libcrypto.so.1.0.0' library exists: FALSE
04:27:24 INFO: The
'/tmp/jxbrowser-chromium-55.0.2883.87.6.12/libcrypto.so.1.0.0' library
exists: TRUE 04:27:24 INFO: Command line:
/tmp/jxbrowser-chromium-55.0.2883.87.6.12/jxbrowser-chromium
--port=1101 --pid=7360 --lang=en-us 04:27:24 INFO: [0228/172724:ERROR:browser_main_loop.cc(1426)] Unable to open X
display. 04:27:24 INFO: Shared Memory Name: JXB1-7360 04:27:24
INFO: IPC connection has been established. Connection ID:
140474291099776 04:27:24 INFO: READ: OnHelloMessage{type=OnHello,
uid=1, message='cid:0,type:Main', null 04:27:24 INFO: Channel has
been accepted: SocketChannel{cid=0, bid=-1, type=Main} 04:27:24
INFO: IPC is started. 04:27:24 INFO: WRITE:
CreateBrowserMessage{type=CreateBrowser, uid=1, channelId=0,
contextId=0, cacheDir='user-data-dir/Cache',
memoryDir='user-data-dir/Memory', dataDir='user-data-dir',
currentLocale='en-us', proxyType=-1, proxyRules='null',
proxyBypassRules='null', proxyAutoConfigURL='null',
defaultZoomLevel=0.0, isOffScreenMode=false, storageType=1,
SocketInfo{cid=0, bid=-1, channelType=Main} 04:27:25 INFO: Shutting
down event queue... 04:27:25 INFO: Shutting down event queue...
[DONE] 04:27:25 INFO: Shutting down event queue... 04:27:25 INFO:
Shutting down event queue... [DONE] 04:27:25 INFO: Channel has been
disconnected: SocketChannel{cid=0, bid=-1, type=Main} 04:27:25 INFO:
IPC connection has been closed. Connection ID: 140474291099776
04:27:25 INFO: Pending IPC connections: 0 04:27:25 INFO: Chromium
process exit code 139
com.teamdev.jxbrowser.chromium.internal.ipc.IPCException: Failed to get Browser browserChannel 0
at com.teamdev.jxbrowser.chromium.Browser.a(SourceFile:396)
at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:207)
at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:178)
at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:145)
at be.lyncos.ivista.tools.Test.testJxBrowser(Test.java:6942)
at be.lyncos.ivista.tools.Test.main(Test.java:382)
16:29:24:674 ERROR [main] (be.lyncos.ivista.tools.Test) - Failed to get Browser browserChannel 0
com.teamdev.jxbrowser.chromium.internal.ipc.IPCException: Failed to get Browser browserChannel 0
at com.teamdev.jxbrowser.chromium.Browser.a(SourceFile:396)
at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:207)
at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:178)
at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:145)
at be.lyncos.ivista.tools.Test.testJxBrowser(Test.java:6942)
at be.lyncos.ivista.tools.Test.main(Test.java:382)
04:29:24 INFO: Stopping Server...
04:29:24 INFO: Stopping Server... [DONE]
04:29:24 INFO: Waiting process exit...
Thank you for your help,
Regards,
Christophe
Please make sure that your Linux environment isn't a headless environment. JxBrowser doesn't support headless linux environments without running X Server: https://jxbrowser.support.teamdev.com/support/solutions/articles/9000013733-system-requirements

Appium Error UI Automator

WINDOWS 7
Appium :1.4.16.1
Emulator Android from Android Virtual Device Manager
APPIUM REST RESPONSE:
Thanks for letting me know. if you think of what could be the source cause.
CODE FROM ECLIPSE:
'import org.openqa.selenium.By;
import org.openqa.selenium.chrome.ChromeDriverService;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import io.appium.java_client.MobileElement;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.ios.IOSElement;
import io.appium.java_client.remote.MobileBrowserType;
import io.appium.java_client.remote.MobileCapabilityType;
import io.appium.java_client.remote.MobilePlatform;
import org.openqa.selenium.Platform;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.BrowserType;
import java.util.concurrent.TimeUnit;
//WebDriver driver;
public class AA_Android1
#Test
public void test1() throws MalformedURLException, InterruptedException{
DesiredCapabilities capabilities = new DesiredCapabilities();
File app = new File("C:/Users/dd/Downloads/com.google.android.gm.4.5.apk");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,"emulator- 5554");
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "BROWSER");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "6.0");
capabilities.setCapability("appPackage", "com.android.browser");
capabilities.setCapability("appActivity","com.android.browser.BrowserActivity");
capabilities.setCapability("browserName", MobileBrowserType.BROWSER);
WebDriver driver = new AndroidDriver<MobileElement>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities );//error?
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);'
APPIUM LOG:
'> Launching Appium server with command: C:\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --browser-name Chrome --session-override --platform-name Android --platform-version 23 --automation-name Appium --device-name "emulator-5554" --log-no-color
info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {"address":"127.0.0.1","sessionOverride":true,"logNoColors":true,"deviceName":"emulator-5554","platformName":"Android","platformVersion":"23","automationName":"Appium","browserName":"Chrome"}
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"capabilities":{"desiredCapabilities":{"appPackage":"com.android.browser","appActivity":"com.android.browser.BrowserActivity","platformVersion":"6.0","browserName":"Browser","platformName":"Android","deviceName":"emulator-5554"},"requiredCapabilities":{}},"desiredCapabilities":{"appPackage":"com.android.browser","appActivity":"com.android.browser.BrowserActivity","platformVersion":"6.0","browserName":"Browser","platformName":"Android","deviceName":"emulator-5554"},"requiredCapabilities":{}}
info: Client User-Agent string: Apache-HttpClient/4.5.2 (Java/1.8.0_121)
info: Set mode: Proxying straight through to Chromedriver
info: [debug] Looks like we want chrome on android
info: [debug] Creating new appium session 6f152533-ef46-4327-9543-c62fb07906ad
info: [debug] Checking whether adb is present
info: [debug] Using adb from C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Not checking whether app is present since we are assuming it's already on the device
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices...
info: [debug] executing cmd: C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device emulator-5554
info: [debug] Setting device id to emulator-5554
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 wait-for-device
info: [debug] executing cmd: C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell "echo 'ready'"
info: [debug] Starting logcat capture
info: [debug] Pushing unlock helper app to device...
info: [debug] executing cmd: C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 install "C:\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk"
info: [debug] executing cmd: C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell "dumpsys window"
info: [debug] Screen already unlocked, continuing.
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device...
info: [debug] executing cmd: C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 push "C:\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar" /data/local/tmp/
info: Starting App
info: [debug] Attempting to kill all 'uiautomator' processes
info: [debug] Getting all processes with 'uiautomator'
info: [debug] executing cmd: C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell "ps 'uiautomator'"
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Command failed: C:\Windows\system32\cmd.exe /s /c "C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell "ps 'uiautomator'""
info: [debug] Error: Command failed: C:\Windows\system32\cmd.exe /s /c "C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell "ps 'uiautomator'""
at ChildProcess.exithandler (child_process.js:751:12)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1016:16)
at Process.ChildProcess._handle.onexit (child_process.js:1088:5)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c \"C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell \"ps 'uiautomator'\"\"\n)","killed":false,"code":1,"signal":null,"cmd":"C:\Windows\system32\cmd.exe /s /c \"C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554c\"\"","origValue":"Command failed: C:\Windows\system32\cmd.exe /s /c \"C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell \"ps 'uiautomator'\"\"\n"},"sessionId":null}
info: <-- POST /wd/hub/session 500 10097.767 ms - 679
info: [debug] Logcat terminated with code 0, signal null'
We faced a similar issue when working with Appium 1.4.16 version, and we have searched a lot in different forums and appium related support forumns. came to know that it is an issue and they gave an alternative for users to continue to work till they fix this in next releases.
Basically we need to modify file adb.js present inside of appium folder:
C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\
Drafted those details clearly # http://www.testingtools.co/appium/error-command-failed-adb-exe-s-emulator-5554-shell-ps-uiautomator
hope it helps and you will be abl

Appium Grid hub sending wrong set of capabilities to nodes

I am trying to configure Appium Grid with below node configuration.
-Hub is receiving proper capabilities from testng but hub is sending wrong capabilities to my only two nodes. (node configs are as follows )
Please do suggest where am I going wrong.
Emulator Node config
Command running the node with : node appium.js --port 4723 --nodeconfig G:\Selenium2\Grid\AppiumEmulatorNode.json
{
"capabilities": [{
"browserName": "Emulator_5.1.0",
"version": "5.1.0",
"maxInstances": 1,
"platform": "ANDROID"
}],
"configuration": {
"cleanUpCycle": 2000,
"timeout": 30000,
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"url": "http://192.168.0.104:4723/wd/hub",
"host": 192.168.0.104,
"port": 4723,
"maxSession": 1,
"register": true,
"registerCycle": 5000,
"hubPort": 4444 ,
"hubHost": "192.168.0.104"
}
}
Real device Node config
Command running the node with : node appium.js --port 4724 --nodeconfig G:\Selenium2\Grid\AppiumRealDevice.json
{
"capabilities": [{
"browserName": "Sony Xperia SP",
"version": "5.1.1",
"maxInstances": 1,
"platform": "ANDROID"
}],
"configuration": {
"cleanUpCycle": 2000,
"timeout": 30000,
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"url": "http://192.168.0.104:4724/wd/hub",
"host": "192.168.0.104",
"port": 4724,
"maxSession": 1,
"register": true,
"registerCycle": 5000,
"hubPort": 4444 ,
"hubHost": "192.168.0.104"
}
}
Testng file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="TestsSuite" parallel="tests" thread-count="2" verbose="5">
<test name="Test1">
<parameter name="UdidOrDeviceName" value="YT910LQ91K"></parameter>
<parameter name="MobileVersion" value="5.2.0"></parameter>
<classes>
<class name="com.apps.AppiumTest.AppiumMessengerTest" />
</classes>
</test>
<test name="Test2">
<parameter name="UdidOrDeviceName" value="192.168.113.101:5555"></parameter>
<parameter name="MobileVersion" value="5.1.0"></parameter>
<classes>
<class name="com.apps.AppiumTest.AppiumMessengerTest" />
</classes>
</test>
</suite>
Grid hub Output
19:47:56.092 INFO - Registered a node http://192.168.0.104:4723
19:51:05.917 INFO - Registered a node http://192.168.0.104:4724
19:51:31.419 INFO - Got a request to create a new session: Capabilities [{appActivity=com.android.mms.ui.ConversationList, appPackage=com.android.mms, platformVersion=5.2.0, newCOmmandTimeout=1000, platformName=Android, deviceName=YT910LQ91K}]
19:51:31.433 INFO - Available nodes: [http://192.168.0.104:4723, http://192.168.0.104:4724]
19:51:31.438 INFO - Got a request to create a new session: Capabilities [{appActivity=com.android.mms.ui.ConversationList, appPackage=com.android.mms, platformVersion=5.1.0, newCOmmandTimeout=1000, platformName=Android, deviceName=192.168.113.101:5555}]
19:51:31.438 INFO - Trying to create a new session on node http://192.168.0.104:4723
19:51:31.460 INFO - Trying to create a new session on test slot {maxInstances=3, platformName=ANDROID, deviceName=192.168.113.101:5555, version=5.1.0}
19:51:31.476 INFO - Available nodes: [http://192.168.0.104:4724, http://192.168.0.104:4723]
19:51:31.486 INFO - Trying to create a new session on node http://192.168.0.104:4724
19:51:31.501 INFO - Trying to create a new session on test slot {browserName=Sony Xperia SP, maxInstances=1, version=5.1.1, platform=ANDROID}
Emulator Node output
This node receiving wrong set of data from Selenium Grid.It should receive emulator capabilities but it has received real device capabilities
C:\Program Files (x86)\Appium\node_modules\appium\bin>node appium.js --port 4723 --nodeconfig G:\Selenium2\Grid\AppiumEmulatorNode.json
info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: [debug] Non-default server args: {"nodeconfig":"G:\\Selenium2\\Grid\\AppiumEmulatorNode.json"}
info: Console LogLevel: debug
info: [debug] starting auto register thread for grid. Will try to register every 5000 ms.
info: [debug] Appium successfully registered with the grid on 192.168.0.104:4444
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}}}
info: <-- GET /wd/hub/status 200 28.871 ms - 105 {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}}}
info: <-- GET /wd/hub/status 200 11.314 ms - 105 {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}}}
info: --> POST /wd/hub/session {"desiredCapabilities":{"appActivity":"com.android.mms.ui.ConversationList","appPackage":"com.android.mms","platformVersion":"5.2.0","newCOmmandTimeout":1000,"platformName":"Android","deviceName":"YT910LQ91K"}}
info: Client User-Agent string: Apache-HttpClient/4.5.1 (Java/1.8.0_65)
Real Device Node output
This node receiving wrong set of data from Selenium Grid.It should receive Real device capabilities but it has received emulator capabilities
C:\Program Files (x86)\Appium\node_modules\appium\bin>node appium.js --port 4724 --nodeconfig G:\Selenium2\Grid\AppiumRealDevice.json
info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
info: Appium REST http interface listener started on 0.0.0.0:4724
info: [debug] Non-default server args: {"port":4724,"nodeconfig":"G:\\Selenium2\\Grid\\AppiumRealDevice.json"}
info: Console LogLevel: debug
info: [debug] starting auto register thread for grid. Will try to register every 5000 ms.
info: [debug] Appium successfully registered with the grid on 192.168.0.104:4444
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}}}
info: <-- GET /wd/hub/status 200 22.103 ms - 105 {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}}}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}}}
info: <-- GET /wd/hub/status 200 12.602 ms - 105 {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}}}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}}}
info: <-- GET /wd/hub/status 200 11.690 ms - 105 {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}}}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}}}
info: <-- GET /wd/hub/status 200 11.460 ms - 105 {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}}}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}}}
info: <-- GET /wd/hub/status 200 11.927 ms - 105 {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}}}
info: --> POST /wd/hub/session {"desiredCapabilities":{"appActivity":"com.android.mms.ui.ConversationList","appPackage":"com.android.mms","platformVersion":"5.1.0","newCOmmandTimeout":1000,"platformName":"Android","deviceName":"192.168.113.101:5555"}}
info: Client User-Agent string: Apache-HttpClient/4.5.1 (Java/1.8.0_65)
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : newCOmmandTimeout
info: [debug] Didn't get app but did get Android package, will attempt to launch it on the device
info: [debug] Creating new appium session 515cbed7-46c0-4fce-a2e0-652976c5a659
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_71
info: [debug] Checking whether adb is present
info: [debug] Using adb from C:\Users\Harsha\AppData\Local\Android\sdk\platform-tools\adb.exe
warn: No app capability, can't parse package/activity
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Not checking whether app is present since we are assuming it's already on the device
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices...
info: [debug] executing cmd: C:\Users\Harsha\AppData\Local\Android\sdk\platform-tools\adb.exe devices
info: [debug] 2 device(s) connected
info: Found device 192.168.113.101:5555
info: [debug] Setting device id to 192.168.113.101:5555
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: C:\Users\Harsha\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.113.101:5555 wait-for-device
info: [debug] executing cmd: C:\Users\Harsha\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.113.101:5555 shell "echo 'ready'"
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: C:\Users\Harsha\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.113.101:5555 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 22
info: Device API level is: 22
info: [debug] Extracting strings for language: default
info: [debug] Apk doesn't exist locally
info: [debug] Could not get strings, but it looks like we had an old strings file anyway, so ignoring
info: [debug] executing cmd: C:\Users\Harsha\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.113.101:5555 shell "rm -rf /data/local/tmp/strings.json"
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Skipping install since we launched with a package instead of an app path
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: C:\Users\Harsha\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.113.101:5555 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device...
info: [debug] executing cmd: C:\Users\Harsha\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.113.101:5555 push "C:\\Program Files (x86)\\Appium\\node_modules\\appium\\build\\android_bootstrap\\AppiumBootstrap.jar" /data/local/tmp/
info: [debug] Pushing settings apk to device...
info: [debug] executing cmd: C:\Users\Harsha\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.113.101:5555 install "C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk"
info: [debug] Pushing unlock helper app to device...
info: [debug] executing cmd: C:\Users\Harsha\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.113.101:5555 install "C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk"
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}},"sessionId":"515cbed7-46c0-4fce-a2e0-652976c5a659"}
info: <-- GET /wd/hub/status 200 69.204 ms - 156 {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}},"sessionId":"515cbed7-46c0-4fce-a2e0-652976c5a659"}
info: Starting App
info: [debug] Attempting to kill all 'uiautomator' processes
info: [debug] Getting all processes with 'uiautomator'
info: [debug] executing cmd: C:\Users\Harsha\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.113.101:5555 shell "ps 'uiautomator'"
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: C:\Users\Harsha\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.113.101:5555 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.android.mms -e disableAndroidWatchers false
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_RESULT: shortMsg=java.lang.IllegalStateException
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_RESULT: longMsg=UiAutomationService android.accessibilityservice.IAccessibilityServiceClient$Stub$Proxy#1034d97calready registered!
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_CODE: 0
info: [debug] UiAutomator exited
info: [debug] executing cmd: C:\Users\Harsha\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.113.101:5555 shell "echo 'ping'"
info: [debug] Attempting to uninstall app
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Cleaning up android objects
error: UiAutomator quit before it successfully launched
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: UiAutomator quit before it successfully launched
info: [debug] Error: UiAutomator quit before it successfully launched
at [object Object].<anonymous> (C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\android.js:205:23)
at [object Object].<anonymous> (C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\android-hybrid.js:249:5)
at Object.async.eachSeries (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\async\lib\async.js:142:20)
at [object Object].androidHybrid.stopChromedriverProxies (C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\android-hybrid.js:233:9)
at [object Object].<anonymous> (C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\android.js:200:10)
at [object Object].<anonymous> (C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\android.js:222:9)
at [object Object].androidCommon.uninstallApp (C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\android-common.js:478:5)
at [object Object].<anonymous> (C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\android.js:220:12)
at [object Object].<anonymous> (C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\android.js:229:11)
at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:901:7
at [object Object].<anonymous> (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:180:9)
at ChildProcess.exithandler (child_process.js:194:7)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:818:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: UiAutomator quit before it successfully launched)","origValue":"UiAutomator quit before it successfully launched"},"sessionId":null}
Here's how the Grid decides to which node should a test be routed to.
It uses something called as a Capability Matcher, to help it decide as to which among its nodes should a test be routed to. If you don't provide a custom capability matcher [ You can take a look at this blog of mine to understand how to plugin in your own custom variant ], it resorts to relying on the DefaultCapabilityMatcher for doing this matching job.
Since you haven't set any of the attributes that the default capability matcher understands [ see here for learning what are those ], it always matches the first node with a test. That is why you are seeing the mess up.
It only understands browserName, platform, version and applicationName and for browserName, platform you cannot pass in any arbitrary values but can only use predefined values. See BrowserType and Platform java classes.
So to solve your problem, you have two options.
Option 1 : You build your own capability matcher which suites your needs (you can refer to my blog post link that I have shared above) and work with it.
Option 2 : You resort to using the capability "applicationName" wherein you provide a unique value to this for each of your nodes and then rely on your test to add this extra capability at the test level.
That should resolve your problem.

Wrong visualization of Sails.js project deployed on Openshift

I deployed my Sails project on Openshift.
It works but I receive errors with websockets and I don't able to load pages built on ejs.
I found these links enough explanatory about grunt/openshift, but I am not able to solve the problem.
Deploying Sails.js On Openshift
Deploy Sails.js on Openshift ... app restarting over and over
My nodejs.log is:
DEBUG: Running node-supervisor with
DEBUG: program 'app.js'
DEBUG: --watch '/var/lib/openshift/537b5ae8500446c95900057f/app-root/data/.nodewatch'
DEBUG: --ignore 'undefined'
DEBUG: --extensions 'node|js|coffee'
DEBUG: --exec 'node'
DEBUG: Starting child process with 'node app.js'
DEBUG: Watching directory '/var/lib/openshift/537b5ae8500446c95900057f/app-root/data/.nodewatch' for changes.
Warning: connection.session() MemoryStore is not
designed for a production environment, as it will leak
memory, and will not scale past a single process.
^[[32minfo^[[39m:
^[[32minfo^[[39m:
^[[32minfo^[[39m: Sails.js <|
^[[32minfo^[[39m: v0.9.16 |\
^[[32minfo^[[39m: /|.\
^[[32minfo^[[39m: / || \
^[[32minfo^[[39m: ,' |' \
^[[32minfo^[[39m: .-'.-==|/_--'
^[[32minfo^[[39m: `--'-------'
^[[32minfo^[[39m: __---___--___---___--___---___--___
^[[32minfo^[[39m: ____---___--___---___--___---___--___-__
^[[32minfo^[[39m:
^[[32minfo^[[39m: Server lifted in `/var/lib/openshift/537b5ae8500446c95900057f/app-root/runtime/repo`
^[[32minfo^[[39m: To see your app, visit http://127.2.95.129:8080
^[[32minfo^[[39m: To shut down Sails, press <CTRL> + C at any time.
^[[34mdebug^[[39m: --------------------------------------------------------
^[[34mdebug^[[39m: :: Wed May 21 2014 14:26:01 GMT-0400 (EDT)
^[[34mdebug^[[39m:
^[[34mdebug^[[39m: Environment : production
^[[34mdebug^[[39m: Host : 127.2.95.129
^[[34mdebug^[[39m: Port : 8080
^[[34mdebug^[[39m: --------------------------------------------------------
^[[31merror^[[39m: Server doesn't seem to be starting.
^[[31merror^[[39m: Perhaps something else is already running on port 8080 with hostname 127.2.95.129?
^[[32minfo^[[39m: handshake authorized qR_aOT3qx40k6X34CF-2
^[[32minfo^[[39m: handshake authorized tnAUouwi-d32h82rCF-3
^[[33mwarn^[[39m: websocket connection invalid
^[[32minfo^[[39m: transport end (undefined)
^[[31merror^[[39m: Error rendering view at :: /var/lib/openshift/537b5ae8500446c95900057f/app-root/runtime/repo/views/viewshows/index
^[[31merror^[[39m: Using layout located at :: /var/lib/openshift/537b5ae8500446c95900057f/app-root/runtime/repo/views/layout
^[[31merror^[[39m: Error: Failed to lookup view "viewshows/index"
at Function.app.render (/var/lib/openshift/537b5ae8500446c95900057f/app-root/runtime/repo/node_modules/sails/node_modules/express/lib/application.js:495:17)
at ServerResponse.res.render (/var/lib/openshift/537b5ae8500446c95900057f/app-root/runtime/repo/node_modules/sails/node_modules/express/lib/response.js:798:7)
at ServerResponse._addResViewMethod.res.view (/var/lib/openshift/537b5ae8500446c95900057f/app-root/runtime/repo/node_modules/sails/lib/hooks/views/index.js:297:15)
at module.exports.index (/var/lib/openshift/537b5ae8500446c95900057f/app-root/runtime/repo/api/controllers/ViewShowsController.js:32:13)
at _bind.enhancedFn (/var/lib/openshift/537b5ae8500446c95900057f/app-root/runtime/repo/node_modules/sails/lib/router/bind.js:375:4)
at callbacks (/var/lib/openshift/537b5ae8500446c95900057f/app-root/runtime/repo/node_modules/sails/node_modules/express/lib/router/index.js:164:37)
Here my app.js:
require('sails').lift(require('optimist').argv);
Here my local.js:
module.exports = {
host: process.env.OPENSHIFT_NODEJS_IP || "127.0.0.1",
port: process.env.OPENSHIFT_NODEJS_PORT || 8080,
environment: process.env.NODE_ENV || 'development'
}
Calling 'env | grep OPENSHIFT_NODEJS_PORT' on openshift console I receive:
OPENSHIFT_NODEJS_PORT=8080
In my opinion the problem isn't the port. The server start and answer correctly.
But when I call a page built on ejs it answer me with a piece of json...
{"view":{"name":"viewshows/index","root":"/var/lib/openshift/537b5ae8500446c95900057f/app-root/runtime/repo/views","defaultEngine":"ejs","ext":".ejs"}}
...and print the error above in the server log.
Any suggestion?
Thanks
I'm fairly certain that openshift requires your application to listen to a specific port, specified by an environmental variable, not 8080
You're going to want to change your app.js to to use the hostname and port env variables in this openshift doc

rtmpdump check status by command line

I tried doing rtmpdump -r "rtmp-raw=rtmpe://watch.playfooty.tv/live playpath=nba1569 swfUrl=http://www.playfooty.tv/play/player/player.swf live=1 pageUrl=http://www.playfooty.tv/"
But the output it´s like offline always
RTMPDump v2.2e
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
DEBUG: Parsing...
WARNING: Unknown protocol!
DEBUG: Parsed host : watch.playfooty.tv
DEBUG: Parsed app : live playpath=nba1569 swfUrl=http:/
DEBUG: Protocol : RTMP
DEBUG: Hostname : watch.playfooty.tv
DEBUG: Port : 1935
DEBUG: Playpath : www.playfooty.tv/play/player/player.swf live=1 pageUrl=http://www.playfooty.tv/
DEBUG: tcUrl : rtmp://watch.playfooty.tv:1935/live playpath=nba1569 swfUrl=http:/
DEBUG: app : live playpath=nba1569 swfUrl=http:/
DEBUG: live : no
DEBUG: timeout : 30 sec
I tried a lot of links of a list and seems offline with this command, but When I play it in a software it worked.
Does anyone have an idea how to test if this kind of links are alive or die?
Thanks!
rtmpdump -i "rtmpe://watch.playfooty.tv/live playpath=nba1569 swfUrl=http://www.playfooty.tv/play/player/player.swf live=1 pageUrl=http://www.playfooty.tv/"
Admittedly the online documentation on RtmpDump is pretty poor, however it is
listed in the command line help
--url|-i url URL with options included
(e.g. rtmp://host[:port]/path swfUrl=url tcUrl=url)
http://lists.mplayerhq.hu/pipermail/rtmpdump/2012-July/002016.html

Resources