Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appium XPath infinite escaping #215

Closed
bootstraponline opened this issue Feb 27, 2013 · 4 comments
Closed

Appium XPath infinite escaping #215

bootstraponline opened this issue Feb 27, 2013 · 4 comments

Comments

@bootstraponline
Copy link
Member

Using XPath with implicit wait set causes Appium to crash.

> $driver.manage.timeouts.implicit_wait = 30
> secure 'Password'
post
session/4f908934-a2e7-4551-b2ee-0e83faf73b75/element
{"using":"xpath","value":"secure[@value='Password']"}
EOFError: end of file reached
from /lib/ruby/1.9.1/net/protocol.rb:141:in 'read_nonblock'

info: [INSTSERVER] Instruments exited with code 0
error: uncaughtException

stack=[TypeError: Cannot read property 'status' of null, at IOS.findUIElementOrElements.doFind as cbForCurrentCmd, at IOS.start.onExit as exitHandler, at ChildProcess.Instruments.launch (/Users/appium/Desktop/appium/appium/instruments/instruments.js:146:14), at ChildProcess.EventEmitter.emit (events.js:99:17), at Process._handle.onexit (child_process.js:678:10)]

@bootstraponline
Copy link
Member Author

Wow.

info: Pushed command to appium work queue: au.getElementByXpath('secure[@value=\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'Password\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\']')
info: [INSTSERVER] Socket Completely closed
info: [INST] 2013-02-27 17:16:50 +0000 Default: Error talking with instruments client, here's stderr:
info: [INST] 2013-02-27 17:16:50 +0000 None: Script threw an uncaught JavaScript error: Error getting next command, shutting down :-( on line 45 of bootstrap.js
2013-02-27 17:16:50 +0000 Default:
undefined:1
\\\\\\\\\\\\\\\\\\\
^
SyntaxError: Unexpected end of input
at Object.parse (native)
at Socket.connect (/usr/local/lib/node_modules/appium/instruments/client.js:16:17)
at Socket.EventEmitter.emit (events.js:96:17)
at Pipe.onread (net.js:397:14)

@bootstraponline
Copy link
Member Author

Appium keeps adding slashes in a loop until it crashes.

debug: Appium request received with params: {"using":"xpath","value":"secure[@value='Password']"}
info: [INSTSERVER] Sending command to instruments: au.getElementByXpath('secure[@value=\'Password\']')
info: [INSTSERVER] Closing our half of the connection
info: Pushed command to appium work queue: au.getElementByXpath('secure[@value=\'Password\']')
info: [INSTSERVER] Socket Completely closed
info: [INST] 2013-02-27 17:26:35 +0000 Default: Got new command from instruments: au.getElementByXpath('secure[@value=\'Password\']')
info: [INSTSERVER] Socket Connected
info: [INSTSERVER] Socket data received (50 bytes)
info: [INSTSERVER] Socket closed by other side
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Got result from instruments: {"status":7,"value":null}
info: [INSTSERVER] Sending command to instruments: au.getElementByXpath('secure[@value=\\\'Password\\\']')
info: [INSTSERVER] Closing our half of the connection
info: Pushed command to appium work queue: au.getElementByXpath('secure[@value=\\\'Password\\\']')
info: [INSTSERVER] Socket Completely closed
info: [INST] 2013-02-27 17:26:36 +0000 Default: Got new command from instruments: au.getElementByXpath('secure[@value=\\\'Password\\\']')
info: [INSTSERVER] Socket Connected
info: [INSTSERVER] Socket data received (50 bytes)
info: [INSTSERVER] Socket closed by other side
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Got result from instruments: {"status":7,"value":null}
info: [INSTSERVER] Sending command to instruments: au.getElementByXpath('secure[@value=\\\\\\\'Password\\\\\\\']')
info: [INSTSERVER] Closing our half of the connection
info: Pushed command to appium work queue: au.getElementByXpath('secure[@value=\\\\\\\'Password\\\\\\\']')
info: [INSTSERVER] Socket Completely closed
info: [INST] 2013-02-27 17:26:37 +0000 Default: Got new command from instruments: au.getElementByXpath('secure[@value=\\\\\\\'Password\\\\\\\']')
info: [INSTSERVER] Socket Connected
info: [INSTSERVER] Socket data received (50 bytes)
info: [INSTSERVER] Socket closed by other side
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Got result from instruments: {"status":7,"value":null}
info: [INSTSERVER] Sending command to instruments: au.getElementByXpath('secure[@value=\\\\\\\\\\\\\\\'Password\\\\\\\\\\\\\\\']')
info: [INSTSERVER] Closing our half of the connection
info: Pushed command to appium work queue: au.getElementByXpath('secure[@value=\\\\\\\\\\\\\\\'Password\\\\\\\\\\\\\\\']')
info: [INSTSERVER] Socket Completely closed

@bootstraponline
Copy link
Member Author

The problem is in ios.js. It'll keep escaping characters when using implicit wait even though they've already been escaped.

@jlipps jlipps closed this as completed in 668569c Feb 27, 2013
jlipps added a commit that referenced this issue Feb 27, 2013
sebv pushed a commit to sebv/appium that referenced this issue May 11, 2014
@lock
Copy link

lock bot commented May 4, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators May 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants