When launching Appium on Android I get following error: - java

Exception in thread "main" 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: Cannot start the 'com.iserve.UChatPay' >application. Visit >https://github.com/appium/appium/blob/master/docs/en/writing-running->appium/android/activity-startup.md for troubleshooting. Original error: >'com.iserve.UChatPay.chat.activity.SplashScreenChat' or >'com.iserve.UChatPay.com.iserve.UChatPay.chat.activity.SplashScreenChat' never >started. Visit https://github.com/appium/appium/blob/master/docs/en/writing->running-appium/android/activity-startup.md for troubleshooting
My Code :
Please check image for code
}

The error seem to indicate a wrong launch activity . Have you try abd shell to check the activity when it launch?

Make sure only one instance of appium server is running on your machine.
Close all the appium server before starting new session.

Related

Original error: io.appium.uiautomator2.common.exceptions.UiAutomator2Exception

Getting unknown server-side error while running the script.
The script would terminate while scrolling else it would work fine.
Log error:
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: io.appium.uiautomator2.common.exceptions.UiAutomator2Exception: java.lang.IllegalStateException: UiAutomation not connected!
at io.appium.uiautomator2.utils.UiExpressionParser.invokeMethod(UiExpressionParser.java:251)
at io.appium.uiautomator2.utils.UiScrollableParser.consumeMethodCall(UiScrollableParser.java:124)
at io.appium.uiautomator2.utils.UiScrollableParser.parse(UiScrollableParser.java:60)
at io.appium.uiautomator2.utils.UiAutomatorParser.consumeStatement(UiAutomatorParser.java:93)
at io.appium.uiautomator2.utils.UiAutomatorParser.parse(UiAutomatorParser.java:49)
at io.appium.uiautomator2.utils.LocationHelpers.toSelectors(LocationHelpers.java:95)
at io.appium.uiautomator2.utils.LocationHelpers.toSelector(LocationHelpers.java:88)
at io.appium.uiautomator2.handler.FindElement.findElement(FindElement.java:144)
at io.appium.uiautomator2.handler.FindElement.safeHandle(FindElement.java:75)
at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:37)
at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:250)
at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:241)
at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
* **Element info:
{Using=-android uiautomator, value=new UiScrollable(new UiSelector()).scrollIntoView(new UiSelector().text(" val "));}
Appium Log:
restarting adb before the test run with adb kill-server; adb start-server.
because sometimes the appium server having issue with adb so by restarting you can avoid this problem not every time when this error comes you can again start executing if not solved then please restart adb and then start executing script that will work..
Happy to help...
In case you have any doubts comment down below..

File Upload not Working in Jenkins when script run as service (Selenium/Java)

The application in which i work needs file upload. The code works fine when the code is run from Eclipse. When I run the same code in Jenkins (Windows Service). I get, org.openqa.selenium.WebDriverException: invalid argument: File not found error message
The reason we had to use Jenkins as a service is because, of Network Group Policy and there is no way we can ask Jenkins to run from Command Prompt.
I am unable to fix the issue because, I am not sure whats going on the background as the browser is not visible
Here is the Code snipped to upload file and the error message when we run it from Jenkins.
Code :
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(".//*[#id='textfield']")));
WebElement filePath = driver.findElement(By.xpath(".//*[#id='textfield']"));
filePath.sendKeys("\\\\XXXXXFOLDER\\data\\SHARED\\PCDEV\\STAFF\\QA_Staff\\ITL
\\FileForXXXXX\\XXX_XXXX_XXXXAPPS.txt");
Thread.sleep(5000);
//Step 8 - Verify user can click the Add File button and display the file name in the text box on the Send Files page
driver.findElement(By.xpath(".//*
[#id='wrapper']/table[2]/tbody/tr[1]/td/table[1]/tbody/tr[4]/td[2]
/input[2]")).click();
Error Message:
org.openqa.selenium.WebDriverException: invalid argument:
File not found:
\\XXXXXFOLDER\data\SHARED\PCDEV\STAFF\QA_Staff\ITL\FileForXXXXX\XXX_XXXX_XXXXAPPS.txt
After WebDriver creation, just add the below line of code in your script.
driver.setFileDetector(new LocalFileDetector());
It helps to upload the expected file from the local environment to the remote environment.
I got same issue, I tried with AutoIT and robot enter also, not worked for me also, but by using sendKeys working fine, give xpath or id of input tag, may be it works
driver.findElement(By.xpath("//input[#type='file']")).sendKeys(filePath);

Unable to run zookeeper server

I have recently installed kafka_2.11-0.10.2.0, but to run this we have to first run the zookeeper server.
But whenever I run command
bin/zookeeper-server-start.sh config/zookeeper.properties
it throws an error i.e.
Error: Could not find or load main class kafka.kafka_2.11-0.10.2.0.bin....logs.zookeeper-gc.log
Any kind of help will be appreciated

Error while starting GoldFish server: Ubuntu 13.10

I consulted here and here but could not get my problem solved.
When I type this on terminal /opt/glassfish4/glassfish/bin/asadmin start, I get the following result:
Remote server does not listen for requests on [localhost:4848]. Is the server up?
Unable to get remote commands.
Closest matching local command(s):
restart-domain
restart-local-instance
start-database
start-domain
start-local-instance
Command start failed.
Similarly, when I type this /opt/glassfish4/glassfish/bin/asadmin --port 5656 start-domain, I get
java.io.IOException: Couldn't get lock for /opt/glassfish4/glassfish/domains/domain1/logs/server.log
at java.util.logging.FileHandler.openFiles(FileHandler.java:389)
at java.util.logging.FileHandler.<init>(FileHandler.java:287)
at com.sun.enterprise.admin.launcher.GFLauncherLogger.addLogFileHandler(GFLauncherLogger.java:98)
at com.sun.enterprise.admin.launcher.GFLauncher.setup(GFLauncher.java:191)
at com.sun.enterprise.admin.servermgmt.cli.StartDomainCommand.createLauncher(StartDomainCommand.java:220)
at com.sun.enterprise.admin.servermgmt.cli.StartDomainCommand.executeCommand(StartDomainCommand.java:117)
at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:321)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:360)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:298)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:56)
Waiting for domain1 to start .Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:
Launching GlassFish on Felix platform
Exception in thread "main" java.lang.RuntimeException: the domain directory is not writable.
at com.sun.enterprise.glassfish.bootstrap.MainHelper.verifyDomainRoot(MainHelper.java:244)
at com.sun.enterprise.glassfish.bootstrap.MainHelper.findInstanceRoot(MainHelper.java:347)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:78)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Command start-domain failed.
I sense there is something problem in path /opt/glassfish4/glassfish/bin/asadmin. I am working on my first JSF web application and cannot run glassfish server. I am using Netbeans and ubuntu 13.10.
Can anyone show me the way?
Thank you!
The error messages
java.io.IOException: Couldn't get lock for
/opt/glassfish4/glassfish/domains/domain1/logs/server.log
and
Exception in thread "main" java.lang.RuntimeException: the domain
directory is not writable.
indicate that the user account you use to start the server doesn't have write permissions in your Glassfish domain folder.
To solve the problem either change the permissions or start the asadmin command with a user who has sufficient permissions.
If this doesn't solve the problem, there may be another process which has a lock on your server.log file, but I guess you would have noticed that. To make sure you can run
lsof /opt/glassfish4/glassfish/domains/domain1/logs/server.log
to see if any process is using the file.
See also:
Failed to start glassfish server because Couldn't get lock for /opt/glassfishv3/glassfish/domains/domain1/logs/server.log

Can't run play app on os x lion

I created an alias like this alias play=/Users/bobdylan/Documents/play/play
After creating a new app and trying to run it with play run I keep getting this:
Debugger failed to attach: handshake failed - received >GET / HTTP/1.1< - excepted >JDWP-Handshake<
Debugger failed to attach: handshake failed - received >GET / HTTP/1.1< - excepted >JDWP-Handshake<
Any idea what could be wrong?
That shouldn't prevent your application from starting, only the debugger from being acceessible. It should also show an exception stacktrace which may help us to point the issue (if it's showing in your case please attach it).
To solve the issue, can you check:
Ports you are using for Play (maybe you have some other server blocking those ports)
The hostname of your computer (you may have localhost pointing somewhere in your host file or some configuration that makes Play fail)
JPDA_PORT is set in the play script so you could either edit the play script in the install or you could export it before running play
export JPDA_PORT=8888
In the play script change
if test "$1" = "debug"; then
JPDA_PORT="9009"
shift
fi

Categories

Resources