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

elementexplorer.js crashes for any input #1822

Closed
Yukonjess101 opened this issue Feb 17, 2015 · 14 comments
Closed

elementexplorer.js crashes for any input #1822

Yukonjess101 opened this issue Feb 17, 2015 · 14 comments

Comments

@Yukonjess101
Copy link

I just updated to 1.7 and noticed anytime I attempt to input anything into the element explorer, the session closes:

error

I'm running this on:
Win 8.1 X64
Node: v0.10.33
NPM: 1.4.28

This seems to happen regardless on how I run the element explorer, either by calling the flag "protractor --elementExplorer" or by going to the npm folder and launching it via node.

Has anyone else seen this after the 1.7 update?

I'm going to roll back to 1.6.1, I know it is working normally there.

Thanks!

@juliemr
Copy link
Member

juliemr commented Feb 17, 2015

Possibly a windows issue? Can anyone else confirm?

@subhash85
Copy link

yes i have also faced the same issue on my windows box after updating to 1.7

@gopandago
Copy link

Yes I'm getting the same issue as well. Reverted back to Ptor 1.6.1 works

@hankduan
Copy link
Contributor

I have a theory on why this is failing, but I have no windows machine to test this one (it's a little hard to debug when I can't try anything =P )

Anyway, here's my theory:
Currently protractor uses repl, and breakpoints, to run commands. (https://github.com/angular/protractor/blob/master/lib/debugger/clients/explorer.js#L28). I think the target might not be resolving properly on windows.

Can anyone try to replace target: 'selenium-webdriver/executors.js', with target: '.*executors\.js', and give it a try?

@gopandago
Copy link

That works after changing target: '.*executors\.js' in explorer.js and wddebugger.js. However there's a noticeable 30 seconds to a minute delay for elementExplorer to perform something (I've tested it on sendKeys() and exiting elementExplorer). Invoking elementExplorer from Node or Protractor seems to have similar issue. Does anyone else have the same issue or is it just me?

@hankduan
Copy link
Contributor

Thanks @sipanda84 I've submitted a PR here #1850 to address this. Waiting for someone to confirm the latency issue (@sipanda84, the latency isn't there when you use 1.6.1 right?)

@gopandago
Copy link

I just switched back to 1.6.1 and confirmed no latency.
Please note when I run elementExplorer on 1.6.1, I usually do webdriver-manager start first to initiate selenium server and on separate cmd prompt I do node elementexplorer.js http://xxxxx. With Ptor 1.7.1 doing node elementexplorer.js http://xxxxx seems to automatically initiate the selenium server so I didn't have to do webdriver-manager start again. Not sure if the way I did it causes the latency issue.

@hankduan
Copy link
Contributor

It shouldn't, but fyi:
node elementexplorer.js http://xxxxx (before)
is equivalent to
protractor --elementExplorer --baseUrl http://xxxxx --seleniumAddress http://localhost:4444/wd/hub (now)

@thinkjones
Copy link

I noticed severe latency issues when updating, plus hangs a lot. 1.6.1 was great. Same for directConnect mode. Plus I get lots of these type errors "TypeError: Converting circular structure to JSON", with statements that previously worked.

@hankduan
Copy link
Contributor

hankduan commented Mar 3, 2015

Alright, there are two issues at hand here. One is "Converting circular structure to JSON". That's when there are circular references in the response. It's an easy fix and I will address that soon.

The second (and more problematic imo) is the latency. I just spent the whole day trying to figure out what is wrong with that, and have just figured it out. See nodejs/node-v0.x-archive#9319. So, let's wait and see what joyent says about that issue.

Meanwhile, sorry about the issues. You can downgrade to 1.6.1 for now, or I believe if you just copy the element explorer shell from 1.6.1 to 1.7.0, it should work as well.

by the way: @thinkjones can you let me know what environment you are running this under? So far I think the latency issue is Windows and Ubuntu (as my Mac which I develop with suffers no such issue, and that why I haven't noticed this until now).

@thinkjones
Copy link

@hankduan Thanks for the awesomely quick response! Mac here too. Will downgrade and wait.

@hankduan
Copy link
Contributor

hankduan commented Mar 4, 2015

Ok this issue is too overloaded. I'm going to break it up.

Issue 1) Cannot start element explorer on windows
Already addressed in #1850

Issue 2) "Converting circular structure to JSON"
I created a PR to address this and should be fixed soon: #1889

Issue 3) latency issue
I'm going to track it in this issue: #1890

Please comment in the corresponding issue/PR. Thanks!

@juliemr
Copy link
Member

juliemr commented Mar 17, 2015

I believe this has all been addressed now. I'm going to close - if we're still seeing issues after the next release, let's open a fresh issue.

@juliemr juliemr closed this as completed Mar 17, 2015
@chrisjlee
Copy link

I'm still having this particular issue. When a command returns json it decides to crash.

protractor version 2.4.0
npm --version 2.5.0
node -v v0.12.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants