Katalon Studio fails to start application in Windows object spy - selenium

I use Katalon Studio 7.0.4 and Windows Application Driver v1.2 RC and allowed port 4723 on firewall. I used PuTTY for testing. Connection is successful, application is shown in spy tool, but got errors when try to use some methods(e.g.:click, getText). I see following errors in logs.
On server side:
==========================================
GET /session/3A8AB5F8-E6B3-4FB1-9C14-E48B8F4F5C4D/screenshot HTTP/1.1
Accept-Encoding: gzip
Cache-Control: no-cache
Connection: Keep-Alive
Host: myip:4723
User-Agent: selenium/3.141.59 (java windows)
HTTP/1.1 500 Internal Error
Content-Length: 133
Content-Type: application/json
{"status":13,"value":{"error":"unknown error","message":"An unknown error occurred in the remote end while processing the command."}}
==========================================
GET /session/3A8AB5F8-E6B3-4FB1-9C14-E48B8F4F5C4D/window_handle HTTP/1.1
Accept-Encoding: gzip
Cache-Control: no-cache
Connection: Keep-Alive
Host: myip:4723
User-Agent: selenium/3.141.59 (java windows)
HTTP/1.1 200 OK
Content-Length: 84
Content-Type: application/json
{"sessionId":"3A8AB5F8-E6B3-4FB1-9C14-E48B8F4F5C4D","status":0,"value":"0x000A09F4"}
On client side:
org.openqa.selenium.WebDriverException: An unknown error occurred in
the remote end while processing the command. (WARNING: The server did
not provide any stacktrace information) Command duration or timeout: 0
milliseconds Build info: version: ‘3.141.59’, revision: ‘e82be7d358’,
time: ‘2018-11-14T08:25:53’ System info: host: ‘LAPTOP’, ip:
‘192.168.56.1’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version:
‘10.0’, java.version: ‘1.8.0_181’ Driver info:
io.appium.java_client.windows.WindowsDriver Capabilities {app:
C:\Users\user101\Downloads…, javascriptEnabled: true, platform:
WINDOWS, platformName: WINDOWS} Session ID:
3A8AB5F8-E6B3-4FB1-9C14-E48B8F4F5C4D at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at
org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
at
org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
at
org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
at
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at
io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at
io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:46)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) at
io.appium.java_client.windows.WindowsDriver.execute(WindowsDriver.java:1)
at
org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs(RemoteWebDriver.java:295)
at
com.kms.katalon.composer.windows.spy.WindowsInspectorController.captureScreenshot(WindowsInspectorController.java:82)
at
com.kms.katalon.composer.windows.dialog.WindowsRecorderDialog$3.captureImage(WindowsRecorderDialog.java:653)
at
com.kms.katalon.composer.windows.dialog.WindowsRecorderDialog$3.run(WindowsRecorderDialog.java:620)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
In Katalon Studio:

Related

Windows application automation using QAF

I'm looking support for automate windows application like notepad using Qmetry automation framework with BDD steps. is there any link or solution to implement. I tried with Appium driver but didn't work.
Step1: open Notepad
Step2: enter "Some text"[enter link description here][1]
Success log:
Windows Application Driver listening for requests at: http://127.0.0.1:4723/
Press ENTER to exit.
==========================================
POST /session HTTP/1.1
Accept-Encoding: gzip,deflate
Connection: Keep-Alive
Content-Length: 258
Content-Type: application/json; charset=utf-8
Host: 127.0.0.1:4723
User-Agent: Apache-HttpClient/4.5.2 (Java/16.0.2)
{"capabilities":[{"desiredCapabilities":{"app":"C:\Windows\System32\notepad.exe","platformName":"Windows"}},{"requiredCapabilities":{}}],"desiredCapabilities":{"app":"C:\Windows\System32\notepad.exe","platformName":"Windows"},"requiredCapabilities":{}}
HTTP/1.1 200 OK
Content-Length: 141
Content-Type: application/json
==========================================
GET /session/3E4610D7-9EBB-4998-921B-94220578D3F1 HTTP/1.1
Accept-Encoding: gzip,deflate
Cache-Control: no-cache
Connection: Keep-Alive
Host: 127.0.0.1:4723
User-Agent: Apache-HttpClient/4.5.2 (Java/16.0.2)
HTTP/1.1 200 OK
Content-Length: 90
Content-Type: application/json
{"status":0,"value":{"app":"C:\Windows\System32\notepad.exe","platformName":"Windows"}}
Failure log:
Windows Application Driver listening for requests at: http://127.0.0.1:4723/
Press ENTER to exit.
==========================================
POST /wd/hub/session HTTP/1.1
Accept-Encoding: gzip
Connection: Keep-Alive
Content-Length: 641
Content-Type: application/json; charset=utf-8
Host: 127.0.0.1:4723
User-Agent: selenium/3.141.59 (java windows)
X-Idempotency-Key: 202d0858-641b-4263-88b9-4b5b1ed0ecc1
You didn't provided what you tried and what is the error you are getting.
In order to automate windows native application you need to use appium windows driver. Windows driver is appium implementation so you can use it like android or ios appium driver.
You can refer
How to run native app on appium
Driver specific documentation for set up and other driver specific requirements
Sample working configuration.
EDIT: Below sample works fine:
Properties for setting capabilities
remote.port=4723
driver.name= appiumDriver
appium.additional.capabilities={"app":"C:\\Windows\\System32\\notepad.exe","driverClass":"io.appium.java_client.windows.WindowsDriver"}
#appium.capabilities.driverClass=io.appium.java_client.windows.WindowsDriver
#appium.capabilities.app=C:\\Windows\\System32\\notepad.exe
It worked well as normal web driver test without issue:
import static com.qmetry.qaf.automation.step.CommonStep.sendKeys;
import static com.qmetry.qaf.automation.util.StringMatcher.exact;
import static com.qmetry.qaf.automation.ui.webdriver.ElementFactory.$;
...
#Test
public void testCanEditInNotpad(){
getDriver().verifyTitle(exact("Untitled - Notepad"));
getDriver().findElementByClassName("Edit").sendKeys("it worked!...")
$("className=Edit").sendKeys(" This also worked!...");
sendKeys(" Common Step worked as well!...", "className=Edit");
}

MSWebDriver fails to run in Karate

I am using Mac and installed Microsoft Edge but getting this error when I try to run the script. It works fine for Chrome, Firefox and Safari.
* configure driver = { type: mswebdriver, showDriverLog: true}
23:26:42.311 request:
1 > POST http://localhost:17556/session
1 > Accept-Encoding: gzip,deflate
1 > Connection: Keep-Alive
1 > Content-Length: 55
1 > Content-Type: application/json; charset=UTF-8
1 > Host: localhost:17556
1 > User-Agent: Apache-HttpClient/4.5.12 (Java/1.8.0_242)
{"capabilities":{"alwaysMatch":{"browserName":"edge"}}}
23:26:42.321 org.apache.http.conn.HttpHostConnectException: Connect to localhost:17556 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused), http call failed after 10 milliseconds for URL: http://localhost:17556/session
23:26:42.322 http request failed:
org.apache.http.conn.HttpHostConnectException: Connect to localhost:17556 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused)
23:26:42.323 driver config / start failed:
org.apache.http.conn.HttpHostConnectException: Connect to localhost:17556 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused), options: {type=mswebdriver, showDriverLog=true, target=null}
shopifysg.feature:10 - driver config / start failed:
org.apache.http.conn.HttpHostConnectException: Connect to localhost:17556 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused), options: {type=mswebdriver, showDriverLog=true, target=null}
Update the Karate-core version greater than 1.1.0 it works
This isn't there on 0.9.5 but it is in the develop branch. You should use msedgedriver, refer: https://github.com/intuit/karate/tree/develop/karate-core#driver-types
I think it is there in 0.9.6.RC1 - so can you try that first. If not, please help us by following the developer guide, so that we can release this sooner: https://github.com/intuit/karate/wiki/Developer-Guide

Selenium Grid: URL in RemoteWebDriver(url, caps)

I am trying to run a test suite using selenium grid, and I was able to establish hub and one node. After this, when I am initializing the RemoteWebdiver(url, caps) call, it is throwing an exception:
org.openqa.selenium.WebDriverException: Error forwarding the new session Error forwarding the request Failed to connect to <IP>:<PORT>
Also when I ping to that "Node_IP", it shows 100% loss. But my grid console shows it is connected. I have added inbound and outbound rules for the port: 4444 through firewall. telnet command also fails for "Node_IP" and "PORT" which is "4444".
I can execute the tests in my local when I pass the URL as : http://localhost:4444/wd/hub
/**** Added Description *****/
hubConfig: java -jar selenium-server-standalone-3.13.0.jar -role hub -host "Host_IP"
nodeConfig: java -Dwebdriver.chrome.driver="chrome_driver_location_on_node" -jar selenium-server-standalone-3.13.0.jar -role node -hub http://"host_ip":4444/grid/register -browser
"browserName=chrome,platform=WINDOWS,version=67.0,maxInstances=5"
Same goes for FireFox and IE.
Code works fine as I am able to execute as a localhost.
The stacktrace is as:
FYI: "Node_PORT" is a random port. I have not assigned it. I also tried it by assigning a port but it didn't work too.
org.openqa.selenium.WebDriverException: Error forwarding the new session Error forwarding the request Failed to connect to /<Node_IP>:<Node_PORT>
Command duration or timeout: 51.98 seconds
Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:24:21.231Z'
System info: host: '<System_Info>', ip: <Hub_IP>, os.name: 'Windows Server 2008 R2', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_151'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:212)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:130)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:143)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.openqa.grid.common.exception.GridException: Error forwarding the new session Error forwarding the request Failed to connect to /<Node_IP>:<Node_PORT>
at org.openqa.grid.web.servlet.handler.RequestHandler.process(RequestHandler.java:118)
at org.openqa.grid.web.servlet.DriverServlet.process(DriverServlet.java:86)
at org.openqa.grid.web.servlet.DriverServlet.doPost(DriverServlet.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:860)
at org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:535)
at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.seleniumhq.jetty9.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
at org.seleniumhq.jetty9.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
at org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
at org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:473)
at org.seleniumhq.jetty9.server.session.SessionHandler.doScope(SessionHandler.java:1564)
at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
at org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.seleniumhq.jetty9.server.Server.handle(Server.java:530)
at org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:347)
at org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:256)
at org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.seleniumhq.jetty9.io.FillInterest.fillable(FillInterest.java:102)
at org.seleniumhq.jetty9.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
at org.seleniumhq.jetty9.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
at org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
at org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
at java.lang.Thread.run(Unknown Source)
I got the solution for my own query and it was a very simple one which I was aware of earlier but didn't gave any second thoughts for that.
Basically, I had to start the node with a specific port and I whitelisted that port number from the security groups.
Thanks again everyone who took an effort for answering. Hope this helps those who are stuck in a similar situation.

Unable to launch IE browser using Selenium Webdriver

I am trying invoke IE browser using Selenium Webdriver and have used the below code to invoke:
System.setProperty("webdriver.ie.driver", driverPath+"IEDriverServer.exe");
driver = new InternetExplorerDriver();
But while execution I am getting error as below:
Started InternetExplorerDriver server (64-bit)
3.4.0.0
Listening on port 3210
Only local connections are allowed
Dec 12, 2017 6:29:04 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
Dec 12, 2017 6:29:07 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Falling back to original OSS JSON Wire Protocol.
Dec 12, 2017 6:29:07 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Falling back to straight W3C remote end connection
Exception in thread "pool-1-thread-1" org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}], required capabilities = Capabilities [{}]
Build info: version: '2.42.2', revision: '6a6995d31c7c56c340d6f45a76976d43506cd6cc', time: '2014-06-03 10:52:47'
System info: host: 'PCXXXXXX', ip: 'XX.XXX.XXX.XX', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_141'
Driver info: driver.version: InternetExplorerDriver
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:91)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:227)
at org.openqa.selenium.ie.InternetExplorerDriver.run(InternetExplorerDriver.java:180)
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:172)
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:144)
at com.cognizant.framework.selenium.WebDriverFactory.getWebDriver(WebDriverFactory.java:76)
at supportlibraries.DriverScript.initializeWebDriver(DriverScript.java:301)
at supportlibraries.DriverScript.driveTestExecution(DriverScript.java:155)
at allocator.ParallelRunner.run(ParallelRunner.java:48)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Please let me know if there is some additional settings that I have missed. System IE browser version: 11
Open Internet Options, select 'Security' Tab. Check that 'EACH' zone (Internet, Local Intranet, Trusted Sites, Restricted Sites) has 'Enable Protected Mode' enabled. This will likely require an IE restart.
You might be missing "\" in the path
try
System.setProperty("webdriver.ie.driver", driverPath+"\IEDriverServer.exe");
driver = new InternetExplorerDriver();
Try with the below options
Change the Web driver opened IE browser zoom to 100%
Navigate to Internet Options -> Security and unselect Enable protect mode for all the zones

Connection issues from certain devices

Can't connect from device using custom authenticator and ChallengeHandler.
This is from Worklight 6.1.0.2 from an iPod Touch device. On the worklight server, we see this in the Stack Trace.
klight.console.controllers.UsersController from Application javax.ws.rs.core.Application
[10/8/14 15:20:04:170 CDT] 0000001c com.worklight.core.auth.impl.LoginContext E FWLSE0059E: Login into realm 'NullLoginModule' failed. Invalid gadget request format: /WorkExecution/iphone/my_custom_auth_request_urlnull. Unknown handler path: my_custom_auth_request_url. [project AnywhereWorkManagement]
com.worklight.gadgets.GadgetRuntimeException: Invalid gadget request format: /WorkExecution/iphone/my_custom_auth_request_urlnull. Unknown handler path: my_custom_auth_request_url
at com.worklight.gadgets.api.GadgetAP
Our challenge handler submits our Authentication information using this Javascript call:
challengeHandler.submitLoginForm(challengeHandler.getAuthURL(), loginOptions, l
Where getAuthURL returns the string "/my_custom_auth_request."
Strangely, other devices using the same application and worklight server are allowed to login successfully. Another weird datapoint is that if we popup the Worklight Settings panel on this iPod Touch device, and update the Worklight server information, the worklight login then seems to succeed.
Wireshark log from the failed connection:
POST /AnywhereWorkManagement/apps/services/api/WorkExecution/iphone/login HTTP/1.1
Host: mobilenext1.tivlab.austin.ibm.com
Accept-Language: en_US
User-Agent: Mozilla/5.0 (iPod touch; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Mobile/11D257 (367413328)/Worklight/6.1.0.02.20141006-1624
Content-Length: 71
x-wl-platform-version: 6.1.0.02.20141006-1624
X-Requested-With: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
x-wl-app-version: 7.5.1.1
Accept: text/javascript, text/html, application/xml, text/xml, */*
Connection: keep-alive
x-wl-native-version: 1475155033
x-wl-device-id: 36CDA8F2-F4E9-49D8-8CBB-A250FDC3B8FA
Cookie: WL_PERSISTENT_COOKIE=ac72a920-b614-423d-8347-e4b5c96a4a1b
Origin: file://
Accept-Encoding: gzip, deflate
realm=CustomAuthenticationRealm&isAjaxRequest=true&x=0.7606244247872382HTTP/1.1 503 Service Unavailable
X-Powered-By: Servlet/3.0
P3P: policyref="/w3c/p3p.xml", CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
Content-Language: en-US
Content-Length: 0
Connection: Close
Date: Fri, 10 Oct 2014 14:32:15 GMT
Then after updating the Custom URL to remove the trailing slash, and relogging in, here's the wireshark log from the successful login:
POST /AnywhereWorkManagement/apps/services/api/WorkExecution/iphone/query HTTP/1.1
Host: mobilenext1.tivlab.austin.ibm.com
Accept-Language: en_US
User-Agent: Mozilla/5.0 (iPod touch; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Mobile/11D257 (384405120)/Worklight/6.1.0.02.20141006-1624
Accept-Encoding: gzip, deflate
Content-Length: 210
x-wl-platform-version: 6.1.0.02.20141006-1624
X-Requested-With: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
x-wl-app-version: 7.5.1.1
Accept: text/javascript, text/html, application/xml, text/xml, */*
Connection: keep-alive
x-wl-native-version: 1475155033
x-wl-device-id: 36CDA8F2-F4E9-49D8-8CBB-A250FDC3B8FA
Cookie: WL_PERSISTENT_COOKIE=0983cfc8-8526-48c9-99cb-72659cb934b4; JSESSIONID=0000wSxsNgF79M62_UJTNmXKKYC:2e8ee48e-dec4-4c69-b8b4-ad37f839f1be
Origin: file://
WL-Instance-Id: okur33g93p35c9j7rvpk1r9g5j
adapter=OSLCGenericAdapter&procedure=getProperties&compressResponse&parameters=%5B%7B%22propertyNames%22%3A%5B%22si.auth.type%22%5D%7D%5D&__wl_deviceCtx=Ar1Cjm4_mo9jpBAA&isAjaxRequest=true&x=0.33572526928037405HTTP/1.1 200 OK
X-Powered-By: Servlet/3.0
P3P: policyref="/w3c/p3p.xml", CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
Content-Type: application/json; charset=UTF-8
Cache-Control: no-cache, no-store, must-revalidate
Expires: Sat, 26 Jul 1997 05:00:00 GMT
Content-Length: 93
Date: Fri, 10 Oct 2014 14:43:15 GMT
/*-secure-
{"isSuccessful":true,"responseID":"1516","properties":{"si.auth.type":"maximo"}}*/POST /AnywhereWorkManagement/apps/services/api/WorkExecution/iphone/my_custom_auth_request_url HTTP/1.1
Host: mobilenext1.tivlab.austin.ibm.com
Accept-Language: en_US
User-Agent: Mozilla/5.0 (iPod touch; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Mobile/11D257 (384405120)/Worklight/6.1.0.02.20141006-1624
X-Requested-With: XMLHttpRequest
Accept: text/javascript, text/html, application/xml, text/xml, */*
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
x-wl-app-version: 7.5.1.1
Connection: keep-alive
Cookie: WL_PERSISTENT_COOKIE=0983cfc8-8526-48c9-99cb-72659cb934b4; JSESSIONID=0000wSxsNgF79M62_UJTNmXKKYC:2e8ee48e-dec4-4c69-b8b4-ad37f839f1be
x-wl-device-id: 36CDA8F2-F4E9-49D8-8CBB-A250FDC3B8FA
Content-Length: 62
Origin: file://
Accept-Encoding: gzip, deflate
username=wilson&password=wilson&authType=maximo&langcode=en-USHTTP/1.1 200 OK
X-Powered-By: Servlet/3.0
P3P: policyref="/w3c/p3p.xml", CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
Content-Type: application/json; charset=UTF-8
Cache-Control: no-cache, must-revalidate
Content-Language: en-US
Transfer-Encoding: chunked
Date: Fri, 10 Oct 2014 14:43:15 GMT
19
{"authStatus":"complete"}
0
I found this in the server logs to correspond with that 503 error from worklight server (I can reproduce by POSTing the same login URL). However in our Worklight Console, there is only one version of each application listed for iphone.
[10/10/14 10:37:54:063 CDT] 00000485 com.worklight.gadgets.serving.GadgetAPIServlet E FWLSE0020E: Ajax request exception: The environment 'iphone' supports multiple versions, therefore you must request it with a version parameter. [project AnywhereWorkManagement]
[10/10/14 10:37:54:066 CDT] 00000485 com.worklight.gadgets.serving.GadgetAPIServlet E FWLSE0117E: Error code: 1, error description: INTERNAL_ERROR, error message: FWLSE0069E: An internal error occurred during gadget request [project AnywhereWorkManagement]The environment 'iphone' supports multiple versions, therefore you must request it with a version parameter., User Identity {wl_authenticityRealm=null, CustomAuthenticationRealm=null, wl_remoteDisableRealm=null, wl_antiXSRFRealm=null, wl_deviceAutoProvisioningRealm=null, wl_deviceNoProvisioningRealm=null, wl_anonymousUserRealm=null}. [project AnywhereWorkManagement]
Scott,
The workaround is to remove the trailing slash from the Server URL.
For a permanent fix I suggest that you will open a PMR so that the development team could investigate the issue closely.
When doing so, please provide a reproducible test case because the flow does work fine, but seems to not work in yours, so need to better understand where exactly it fails. Be sure to provide this question in the description.
It could be that you are altering the URL somewhere in your challenge handler?