I'm using the following code to upgrade https connection websocket connection receiving 403 error.
https to ws upgrade
Configuration:
match:
safe_regex:
google_re2: {}
regex: "/api/1/(web|rest)/ws.*"
upgrade_configs:
- upgrade_type: websocket
Access logs shows as upgrade_failed with 403 code and debug logs shows the following
':authority', 'localhost'
':path', '/api/1/rest/ws'
':method', 'GET'
'sec-websocket-version', '13'
'sec-websocket-key', 'winoU3MVKB9q2s02lVj7ug=='
'connection', 'Upgrade'
'upgrade', 'websocket'
'sec-websocket-extensions', 'permessage-deflate; client_max_window_bits'
[2022-11-01 15:48:09.757][21026][debug][http] [external/envoy/source/common/http/filter_manager.cc:883] [C2183][S8415942046573715112] Sending local reply with details upgrade_failed
[2022-11-01 15:48:09.757][21026][debug][http] [external/envoy/source/common/http/conn_manager_impl.cc:1400] [C2183][S8415942046573715112] closing connection due to connection close header
[2022-11-01 15:48:09.757][21026][debug][http] [external/envoy/source/common/http/conn_manager_impl.cc:1455] [C2183][S8415942046573715112] encoding headers via codec (end_stream=true):
':status', '403'
'date', 'Tue, 01 Nov 2022 15:48:09 GMT'
'server', 'envoy'
'connection', 'close'
Any insights what might be the issue.
I have configured janus server for video call.
configured all setups and installed all dependencies as per the Docs
successfully established the connection but unable to stream the video. After starts the new session ICE failed error throws error logs as follows
JANUS WebSockets transport plugin initialized!
WebSockets thread started
Creating new session: 7153905178555544; 0x7fd244004c00
Creating new handle in session 7153905178555544: 7459090747208459; 0x7fd244004c00 0x7fd244005670
Creating new session: 8203604816882479; 0x7fd24400b8c0
Creating new handle in session 8203604816882479: 1196748959220562; 0x7fd24400b8c0 0x7fd244018910
Destroying session 8203604816882479; 0x7fd24400b8c0
Detaching handle from JANUS VideoRoom plugin; 0x7fd244018910 0x7fd24400b890 0x7fd244018910 0x7fd24401f760
[janus.plugin.videoroom-0x7fd24400b890] No WebRTC media anymore; 0x7fd244018910 0x7fd24401f760
[1196748959220562] Handle and related resources freed; 0x7fd244018910 0x7fd24400b8c0
[WSS-0x7fd244008340] Destroying WebSocket client
[7459090747208459] Creating ICE agent (ICE Lite mode, controlled)
[WARN] [7459090747208459] ICE failed for component 1 in stream 1, but let's give it some time... (trickle received, answer received, alert not set)
[ERR] [ice.c:janus_ice_check_failed:1692] [7459090747208459] ICE failed for component 1 in stream 1...
[janus.plugin.videoroom-0x7fd244001e60] No WebRTC media anymore; 0x7fd244005670 0x7fd244005fe0
[7459090747208459] WebRTC resources freed; 0x7fd244005670 0x7fd244004c00
[ERR] [transports/janus_http.c:janus_http_handler:1239] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1239] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1239] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1239] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1239] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1239] Invalid url /ws/v1/cluster/apps/new-applicatio
You can speicfy stun/turn servers for icing in /opt/janus/etc/janus/janus.jcfg.
Also you should open ports for udp like 40000-65535
I am trying to run a web-socket service via a WSO2 API Manager (as an API Gateway). I had a working proof-of-concept with the gateway running against a service on my laptop (gateway is on a server, but i ran the service in Eclipse to test it). Now I am trying to get it working against a service running on another server. If I call the URL that is configured as the endpoint in the API Definition in the gateway then it works. if i run via the gateway then it doesn't. The wso2carbon.log shows:
TID: [-1] [] [2019-07-02 16:00:55,260] ERROR {org.apache.synapse.core.axis2.Axis2Sender} - Unexpected error during sending message out {org.apache.synapse.core.axis2.Axis2Sender}
java.lang.IllegalArgumentException: port out of range:-1
at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143)
at java.net.InetSocketAddress.<init>(InetSocketAddress.java:224)
at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:97)
at org.wso2.carbon.websocket.transport.WebsocketConnectionFactory.cacheNewConnection(WebsocketConnectionFactory.java:169)
at org.wso2.carbon.websocket.transport.WebsocketConnectionFactory.getChannelHandler(WebsocketConnectionFactory.java:79)
at org.wso2.carbon.websocket.transport.WebsocketTransportSender.sendMessage(WebsocketTransportSender.java:106)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:592)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:83)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:548)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:382)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:121)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:1005)
at org.wso2.carbon.inbound.endpoint.protocol.websocket.InboundWebsocketSourceHandler.injectToSequence(InboundWebsocketSourceHandler.java:469)
at org.wso2.carbon.inbound.endpoint.protocol.websocket.InboundWebsocketSourceHandler.handleHandshake(InboundWebsocketSourceHandler.java:182)
at org.wso2.carbon.inbound.endpoint.protocol.websocket.InboundWebsocketSourceHandler.channelRead(InboundWebsocketSourceHandler.java:131)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at org.wso2.carbon.apimgt.gateway.handlers.WebsocketInboundHandler.channelRead(WebsocketInboundHandler.java:125)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:147)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:244)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:147)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:110)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:748)
TID: [-1] [] [2019-07-02 16:00:55,267] WARN {org.apache.synapse.core.axis2.Axis2SynapseEnvironment} - Executing fault handler due to exception encountered {org.apache.synapse.core.axis2.Axis2SynapseEnvironment}
TID: [-1] [] [2019-07-02 16:00:55,267] WARN {org.apache.synapse.endpoints.EndpointContext} - Endpoint : AnonymousEndpoint with address ws://redacted.example.com/notifications/v1 will be marked SUSPENDED as it failed {org.apache.synapse.endpoints.EndpointContext}
TID: [-1] [] [2019-07-02 16:00:55,267] WARN {org.apache.synapse.endpoints.EndpointContext} - Suspending endpoint : AnonymousEndpoint with address ws://redacted.example.com/notifications/v1 - last suspend duration was : 30000ms and current suspend duration is : 30000ms - Next retry after : Tue Jul 02 16:01:25 EEST 2019 {org.apache.synapse.endpoints.EndpointContext}
TID: [-1] [] [2019-07-02 16:00:55,267] INFO {org.apache.synapse.mediators.builtin.LogMediator} - STATUS = Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE = Unexpected error during sending message out {org.apache.synapse.mediators.builtin.LogMediator}
TID: [-1] [] [2019-07-02 16:00:55,345] INFO {org.apache.synapse.mediators.builtin.LogMediator} - STATUS = Executing default 'fault' sequence, ERROR_CODE = 303001, ERROR_MESSAGE = Currently , Address endpoint : [ Name : AnonymousEndpoint ] [ State : SUSPENDED ] {org.apache.synapse.mediators.builtin.LogMediator}
Running v 2.1 of WSO2 API Manager (yes, we are actively planning an upgrade but I need to get it working on the current version if possible). Unfortunately I am having problems repeating my initial PoC against my machine too. I think it's something in the gateway (although I am not aware of having changed anything). However, my IT department has changed which firewall we have on our local machines in the meantime so I can't rule that out...
When using wss endpoint, we were able to observe some errors and we were able to get rid of the errors with the following approach.
Please include the following parameter in the SecureWebSocketInboundEndpoint.xml file which resides in the <APIM_HOME>/repository/deployment/server/synapse-configs/default/inbound-endpoints directory.
<parameter name="wss.ssl.protocols">TLSv1.1,TLSv1.2</parameter>
Also, please remove the following parameters from the same SecureWebSocketInboundEndpoint.xml file if the following parameters(wss.ssl.trust.store.file and wss.ssl.trust.store.pass) exist in the file.
<parameter name="wss.ssl.trust.store.file">repository/resources/security/client-truststore.jks</parameter>
<parameter name="wss.ssl.trust.store.pass">wso2carbon</parameter>
Please use the following sample web socket client to try out and run the WSS client. Please change the variable carbonKeyStoreLocation to point to <API-M_HOME>/repository/resources/security/wso2carbon.jks. Note that port for the WSS API is 8099.
You can download the WSS client in the following WSO2 official documentation under the WSS Support section. (In the second step.)[1] Further please change the access token, web socket endpoint and the carbonKeyStoreLocation with your one to try out the scenario.
[1] https://docs.wso2.com/display/AM260/Create+a+WebSocket+API
When using ws endpoint, you do not need to configure the carbonKeyStoreLocation. Only you need to include the correct access token and correct ws endpoint. You can get the WS client in the same above documentation.[1]
I am trying to expose a WebSocket service via WSO2 API manager. I have a requirement that all inter-machine communication is secured, so I want to use encrypted WebSocket (wss://). I have a proof-of-concept web service that just spits out one message per second. This is not natively implementing wss:// but I have a reverse proxy (Apache) in front on the same machine which is OK.
The problem
This works:
I can do calls over wss:// to the gateway if I allow the gateway to use ws:// to call on to the actual API service.
I can do calls from the gateway machine to the actual API service machine over wss://
This doesn't:
But if I try to configure the gateway to call on over wss:// then I get a null pointer exception in the gateway.
This final one is the problem. I think it's some configuration in the gateway but can't see what. The wso2carbon.log shows:
TID: [-1] [] [2019-06-07 11:02:34,051] ERROR {org.apache.synapse.core.axis2.Axis2Sender} - Unexpected error during sending message out {org.apache.synapse.core.axis2.Axis2Sender}
java.lang.NullPointerException
at org.wso2.carbon.websocket.transport.WebsocketConnectionFactory.cacheNewConnection(WebsocketConnectionFactory.java:123)
at org.wso2.carbon.websocket.transport.WebsocketConnectionFactory.getChannelHandler(WebsocketConnectionFactory.java:79)
at org.wso2.carbon.websocket.transport.WebsocketTransportSender.sendMessage(WebsocketTransportSender.java:106)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:592)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:83)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:548)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:382)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:121)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:1005)
at org.wso2.carbon.inbound.endpoint.protocol.websocket.InboundWebsocketSourceHandler.injectToSequence(InboundWebsocketSourceHandler.java:469)
at org.wso2.carbon.inbound.endpoint.protocol.websocket.InboundWebsocketSourceHandler.handleHandshake(InboundWebsocketSourceHandler.java:182)
at org.wso2.carbon.inbound.endpoint.protocol.websocket.InboundWebsocketSourceHandler.channelRead(InboundWebsocketSourceHandler.java:131)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at org.wso2.carbon.apimgt.gateway.handlers.WebsocketInboundHandler.channelRead(WebsocketInboundHandler.java:125)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:147)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:244)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:147)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:110)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:748)
TID: [-1] [] [2019-06-07 11:02:34,057] WARN {org.apache.synapse.core.axis2.Axis2SynapseEnvironment} - Executing fault handler due to exception encountered {org.apache.synapse.core.axis2.Axis2SynapseEnvironment}
TID: [-1] [] [2019-06-07 11:02:34,058] WARN {org.apache.synapse.endpoints.EndpointContext} - Endpoint : AnonymousEndpoint with address wss://icarcdevapi01.internal.carus.com/notifications/notifications will be marked SUSPENDED as it failed {org.apache.synapse.endpoints.EndpointContext}
TID: [-1] [] [2019-06-07 11:02:34,058] WARN {org.apache.synapse.endpoints.EndpointContext} - Suspending endpoint : AnonymousEndpoint with address wss://icarcdevapi01.internal.carus.com/notifications/notifications - last suspend duration was : 30000ms and current suspend duration is : 30000ms - Next retry after : Fri Jun 07 11:03:04 EEST 2019 {org.apache.synapse.endpoints.EndpointContext}
TID: [-1] [] [2019-06-07 11:02:34,058] INFO {org.apache.synapse.mediators.builtin.LogMediator} - STATUS = Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE = Unexpected error during sending message out {org.apache.synapse.mediators.builtin.LogMediator}
TID: [-1] [] [2019-06-07 11:02:34,123] INFO {org.apache.synapse.mediators.builtin.LogMediator} - STATUS = Executing default 'fault' sequence, ERROR_CODE = 303001, ERROR_MESSAGE = Currently , Address endpoint : [ Name : AnonymousEndpoint ] [ State : SUSPENDED ] {org.apache.synapse.mediators.builtin.LogMediator}
Extra Details
I added the following to the repository/conf/axis2/axis2.xml next to the transportSender for ws:
<transportSender name="wss" class="org.wso2.carbon.websocket.transport.WebsocketTransportSender">
<parameter name="ws.outflow.dispatch.sequence" locked="false">outflowDispatchSeq</parameter>
<parameter name="ws.outflow.dispatch.fault.sequence" locked="false">outflowFaultSeq</parameter>
<parameter name="ws.trust.store" locked="false">
<ws.trust.store.location>repository/resources/security/client-truststore.jks</ws.trust.store.location>
<ws.trust.store.Password>wso2carbon</ws.trust.store.Password>
</parameter>
The reverse proxy on the gateway includes:
RewriteEngine On
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule /(.*) ws://127.0.0.1:9099/$1 [P,L]
which maps all websocket connections to port 9099. I assume since proxy->wso2 is over ws:// I don't need a different port.
If I configure an API in the WSO2 Publisher pointing to my service directly (ws://myservice.example.com:8001/foo) then it works. I can call over wss:// to the gateway but it calls over unencrypted ws:// on to the API. I also have a reverse proxy on the actual API service machine. If I run my test client on the API Gateway machine and call to wss://myservice.example.com/foo then it works so the service machine end is configured OK.
But, if I put that same URL (wss://myservice.example.com/foo) as the endpoint in the API definition in the WSO2 Publisher then the client just hangs and I get the null pointer above.
We are still on version 2.1 of the API Manager
Possible Reason:
NullPointerException is a bug in wso2/carbon-apimgt project and that is fixed by this PR
But i have seen in your logs
org.wso2.carbon.websocket.transport.WebsocketConnectionFactory.cacheNewConnection
It is interesting with API publishing while 'TokenCacheExpiry' config is enabled in the project. Fixed with this PR
Possible Solution:
In your case i have find a sheen example Can you try to change just your port settings
I am new to Appium and I am trying to run the appium.app with iOS option using stimulator.I have selected the app path and show stimulator log with platform version as 8.1.
I have also added appium.txt file with the following content in the appium installation directory.
[caps]
platformName = "ios"
deviceName = "iPhone 6"
platformVersion = "8.1"
app = “/Users/dhanasekarbabu/downloads/untitled/UICatalog.app"
Also please find the following log,
Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' lib/server/main.js --command-timeout "7200" --platform-version "8.1" --platform-name "iOS" --app "/Users/dhanasekarbabu/Downloads/untitled/UICatalog.app" --show-ios-log --default-device
info: Welcome to Appium v1.3.6 (REV 004f52f249d3513809e7d0734d9205d1fec19f8e)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: [debug] Non-default server args: {"app":"/Users/dhanasekarbabu/Downloads/untitled/UICatalog.app","platformName":"iOS","platformVersion":"8.1","defaultDevice":true,"showIOSLog":true,"defaultCommandTimeout":7200}
info: Console LogLevel: debug
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.6","revision":"004f52f249d3513809e7d0734d9205d1fec19f8e"}}}
info: <-- GET /wd/hub/status 200 13.582 ms - 104 {"status":0,"value":{"build":{"version":"1.3.6","revision":"004f52f249d3513809e7d0734d9205d1fec19f8e"}}}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.6","revision":"004f52f249d3513809e7d0734d9205d1fec19f8e"}}}
info: <-- GET /wd/hub/status 200 4.070 ms - 104 {"status":0,"value":{"build":{"version":"1.3.6","revision":"004f52f249d3513809e7d0734d9205d1fec19f8e"}}}
info: --> GET /wd/hub/sessions {}
info: [debug] Responding to client with success: {"status":0,"value":[]}
info: <-- GET /wd/hub/sessions 200 1.517 ms - 23 {"status":0,"value":[]}
info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","platformVersion":"8.1","newCommandTimeout":"999999","automationName":"Appium"}}
error: The following desired capabilities are required, but were not provided: deviceName
info: Client User-Agent string: Appium (unknown version) CFNetwork/720.2.4 Darwin/14.1.0 (x86_64)
info: [debug] Got configuration error, not starting session
info: [debug] Cleaning up appium session
info: [debug] Error: The following desired capabilities are required, but were not provided: deviceName
at Capabilities.checkValidity (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/capabilities.js:143:13)
at Appium.configure (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:238:35)
at null. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:118:10)
at Appium.start (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:129:5)
at Object.exports.createSession as handle
at next_layer (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:113:13)
at Route.dispatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:117:5)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:222:24
at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:288:12)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:216:19)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: The following desired capabilities are required, but were not provided: deviceName)","origValue":"The following desired capabilities are required, but were not provided: deviceName"},"sessionId":null}
info: <-- POST /wd/hub/session 500 16.616 ms - 286
error: Failed to start an Appium session, err was: Error: The following desired capabilities are required, but were not provided: deviceName
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.6","revision":"004f52f249d3513809e7d0734d9205d1fec19f8e"}}}
info: <-- GET /wd/hub/status 200 1.698 ms - 104 {"status":0,"value":{"build":{"version":"1.3.6","revision":"004f52f249d3513809e7d0734d9205d1fec19f8e"}}}
Also if i select force device and provided a UDID after selecting the UDID I'm getting the issue "Failed to start an Appium session, err was: Error: Log capture did not start in a reasonable amount of time".
I have changed the stuimulator devices and i am facing the same issue.
Also please find the following go for your reference.
Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' lib/server/main.js --command-timeout "7200" --platform-version "8.1" --platform-name "iOS" --app "/Users/dhanasekarbabu/Downloads/untitled/UICatalog.app" --udid "F07654AE-E9B5-4A5F-956A-D20091413DAB" --show-ios-log --device-name "iPhone 5 (F07654AE-E9B5-4A5F-956A-D20091413DAB)"
info: Welcome to Appium v1.3.6 (REV 004f52f249d3513809e7d0734d9205d1fec19f8e)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: [debug] Non-default server args: {"app":"/Users/dhanasekarbabu/Downloads/untitled/UICatalog.app","udid":"F07654AE-E9B5-4A5F-956A-D20091413DAB","deviceName":"iPhone 5 (F07654AE-E9B5-4A5F-956A-D20091413DAB)","platformName":"iOS","platformVersion":"8.1","showIOSLog":true,"defaultCommandTimeout":7200}
info: Console LogLevel: debug
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.6","revision":"004f52f249d3513809e7d0734d9205d1fec19f8e"}}}
info: <-- GET /wd/hub/status 200 12.528 ms - 104 {"status":0,"value":{"build":{"version":"1.3.6","revision":"004f52f249d3513809e7d0734d9205d1fec19f8e"}}}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.6","revision":"004f52f249d3513809e7d0734d9205d1fec19f8e"}}}
info: <-- GET /wd/hub/status 200 4.022 ms - 104 {"status":0,"value":{"build":{"version":"1.3.6","revision":"004f52f249d3513809e7d0734d9205d1fec19f8e"}}}
info: --> GET /wd/hub/sessions {}
info: [debug] Responding to client with success: {"status":0,"value":[]}
info: <-- GET /wd/hub/sessions 200 1.527 ms - 23 {"status":0,"value":[]}
info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","platformVersion":"8.1","newCommandTimeout":"999999","automationName":"Appium","deviceName":"iPhone 5 (F07654AE-E9B5-4A5F-956A-D20091413DAB)"}}
info: Client User-Agent string: Appium (unknown version) CFNetwork/720.2.4 Darwin/14.1.0 (x86_64)
info: [debug] Using local app from command line: /Users/dhanasekarbabu/Downloads/untitled/UICatalog.app
info: [debug] Creating new appium session 8a4d5f38-d574-4338-85e3-443e04a26ed8
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
info: [debug] Setting Xcode version
info: [debug] Setting iOS SDK Version
info: [debug] Getting sdk version from xcrun with a timeout
info: [debug] iOS SDK Version set to 8.2
info: [debug] Not checking whether simulator is available since we're on a real device
info: [debug] Detecting automation tracetemplate
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Parsed app Info.plist (as binary)
info: [debug] Parsed app Localizable.strings
info: [debug] Getting bundle ID from app
info: [debug] Parsed app Info.plist (as binary)
info: [debug] Creating instruments
info: On some xcode 6 platforms, instruments-without-delay does not work. If you experience this, you will need to re-run appium with the --native-instruments-lib flag
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/dhanasekarbabu/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
info: [debug] Dynamic bootstrap path: /Users/dhanasekarbabu/Library/Application Support/appium/bootstrap/bootstrap-2911698fabce8e2c.js
info: [debug] Reusing dynamic bootstrap: /Users/dhanasekarbabu/Library/Application Support/appium/bootstrap/bootstrap-2911698fabce8e2c.js
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.2","iOSSDKVersion":"8.2","deviceName":"iPhone 5 (F07654AE-E9B5-4A5F-956A-D20091413DAB)","platformVersion":"8.1"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 5 (F07654AE-E9B5-4A5F-956A-D20091413DAB) (8.1 Simulator)'
info: [debug] Not setting device type since we're on a real device
info: [debug] Checking whether we need to set app preferences
info: [debug] Not setting iOS and app preferences since we're on a real device
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killall iOS Simulator
info: [debug] Killing any other simulator daemons
info: [debug] On a real device; cannot clean device state
info: [debug] Not setting locale because we're using a real device
info: [debug] No iOS / app preferences to set
info: [debug] Starting iOS device log capture via deviceconsole
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.6","revision":"004f52f249d3513809e7d0734d9205d1fec19f8e"},"isShuttingDown":false},"sessionId":"8a4d5f38-d574-4338-85e3-443e04a26ed8"}
info: <-- GET /wd/hub/status 200 2.968 ms - 178 {"status":0,"value":{"build":{"version":"1.3.6","revision":"004f52f249d3513809e7d0734d9205d1fec19f8e"},"isShuttingDown":false},"sessionId":"8a4d5f38-d574-4338-85e3-443e04a26ed8"}
info: [debug] Cleaning up appium session
info: [debug] Error: Log capture did not start in a reasonable amount of time
at null._onTimeout (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-log.js:137:10)
at Timer.listOnTimeout (timers.js:110:15)
error: Log capture did not start in a reasonable amount of time
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Log capture did not start in a reasonable amount of time)","origValue":"Log capture did not start in a reasonable amount of time"},"sessionId":null}
info: <-- POST /wd/hub/session 500 10325.771 ms - 234
info: [debug] Not pre-launching simulator
info: [debug] Creating iDevice object with udid F07654AE-E9B5-4A5F-956A-D20091413DAB
info: [debug] Checking app install status using: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id F07654AE-E9B5-4A5F-956A-D20091413DAB --bundle com.example.apple-samplecode.UICatalog
error: Failed to start an Appium session, err was: Error: Log capture did not start in a reasonable amount of time
Please help me to solve this issue.
Thanks in Advance
Regards,
Rajesh D