[JIRA] Created: (SEL-713) captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException

32 views
Skip to first unread message

Corey (JIRA)

unread,
Oct 3, 2009, 1:58:51 PM10/3/09
to selenium-deve...@googlegroups.com
captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
------------------------------------------------------------------------------

Key: SEL-713
URL: http://jira.openqa.org/browse/SEL-713
Project: Selenium
Issue Type: Bug
Components: BrowserBot-Mozilla
Affects Versions: 1.0.1
Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
Reporter: Corey


I am using captureNetworkTraffic() from the Python RC API. When I make the call to captureNetworkTraffic(), it fails most times. Sometimes it will sporadically work. this bug also happens intermittently on Windows with IEE or FF, but is not as reproducible as on my 2 Linux boxes (one is 32 bit Ubuntu 9.04, other is 64 bit Ubuntu 9.04). On Ubuntu it fails more than half the time I call it and is very reproducible.

stack trace from Selenium Server console:


13:47:47.059 INFO - Command request: captureNetworkTraffic[xml, ] on session b5997369260c4b62bc9eaab88af46f3d
13:47:47.073 WARN - POST /selenium-server/driver/ HTTP/1.1
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:782)
at java.util.ArrayList$Itr.next(ArrayList.java:754)
at org.openqa.selenium.server.commands.CaptureNetworkTrafficCommand.execute(CaptureNetworkTrafficCommand.java:97)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:434)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:364)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:125)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.openqa.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Corey (JIRA)

unread,
Oct 3, 2009, 2:00:40 PM10/3/09
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SEL-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_18706 ]

Corey commented on SEL-713:
---------------------------

this sounds like a Selenium Core issue, but I couldn't find a field to mark it as such... its now labeled as BrowserBot-Mozilla.

Stefan Birkner (JIRA)

unread,
Feb 10, 2010, 7:47:38 PM2/10/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SEL-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Birkner updated SEL-713:
-------------------------------

Attachment: SEL713.patch

Here's a patch. Now access to the entries list is synchronized. Additionally the code has been improved for better readability.

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>
> Key: SEL-713
> URL: http://jira.openqa.org/browse/SEL-713
> Project: Selenium
> Issue Type: Bug
> Components: BrowserBot-Mozilla
> Affects Versions: 1.0.1
> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Attachments: SEL713.patch

Gregor Wolf (JIRA)

unread,
Apr 29, 2010, 4:16:30 PM4/29/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SEL-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19619#action_19619 ]

Gregor Wolf commented on SEL-713:
---------------------------------

I'm running the selenium-server-standalone-2.0a4.jar on Windows XP controlling Firefox 3.6.3. I do get this error also sporadicly. Hope it can be fixed also in the 2.x release.

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>
> Key: SEL-713
> URL: http://jira.openqa.org/browse/SEL-713
> Project: Selenium
> Issue Type: Bug
> Components: BrowserBot-Mozilla
> Affects Versions: 1.0.1
> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey
> Attachments: SEL713.patch
--
You received this message because you are subscribed to the Google Groups "Selenium Developer Activity" group.
To post to this group, send email to selenium-deve...@googlegroups.com.
To unsubscribe from this group, send email to selenium-developer-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-developer-activity?hl=en.

Robert Slifka (JIRA)

unread,
Jul 20, 2010, 6:34:30 PM7/20/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SEL-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19716#action_19716 ]

Robert Slifka commented on SEL-713:
-----------------------------------

- Can we mark this back to selenium-rc or selenium-core? We see it with Safari, Chrome and Firefox.
- Also, it makes relying on this functionality for our tests rather difficult; would like to see it a MAJOR :)

Thanks!!


> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>
> Key: SEL-713
> URL: http://jira.openqa.org/browse/SEL-713
> Project: Selenium
> Issue Type: Bug
> Components: BrowserBot-Mozilla
> Affects Versions: 1.0.1
> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Attachments: SEL713.patch

Kevin Menard (JIRA)

unread,
Jul 20, 2010, 10:02:30 PM7/20/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SEL-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Menard reassigned SEL-713:
--------------------------------

Assignee: Kevin Menard

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>
> Key: SEL-713
> URL: http://jira.openqa.org/browse/SEL-713
> Project: Selenium
> Issue Type: Bug
> Components: BrowserBot-Mozilla
> Affects Versions: 1.0.1
> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Attachments: SEL713.patch

Kevin Menard (JIRA)

unread,
Jul 20, 2010, 10:15:30 PM7/20/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Menard moved SEL-713 to SRC-836:
--------------------------------------

Affects Version/s: (was: 1.0.1)
1.0.3
Component/s: (was: BrowserBot-Mozilla)
Server
Key: SRC-836 (was: SEL-713)
Project: Selenium Remote Control (was: Selenium)

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3


> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Attachments: SEL713.patch
>
>

Robert Slifka (JIRA)

unread,
Jul 20, 2010, 10:28:30 PM7/20/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19718#action_19718 ]

Robert Slifka commented on SRC-836:
-----------------------------------

Hi Kevin,

I did as you suggested and dropped the 2.0.5 on top and we haven't seen this error since (knock on wood).

Thanks man!

Rob


> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Attachments: SEL713.patch
>
>

Kevin Menard (JIRA)

unread,
Jul 20, 2010, 10:28:30 PM7/20/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19717#action_19717 ]

Kevin Menard commented on SRC-836:
----------------------------------

Stefan,

The codebase has changed, so your patch no longer applies cleanly. I appreciate you attaching one, but in the future please keep general code cleanups and actual bug fixes as separate patches. It's hard to figure out which changes are necessary and which are not.

If you're able to provide an updated patch against trunk, that'd be quite helpful. Otherwise, I'll try to extract the necessary portions sometime this week.

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Attachments: SEL713.patch
>
>

Robert Slifka (JIRA)

unread,
Jul 22, 2010, 2:09:31 PM7/22/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19722#action_19722 ]

Robert Slifka commented on SRC-836:
-----------------------------------

Any word on whether this has already been fixed in 1.0.4 by some other means?

We're using a custom-spun jar that lets us use firefoxproxy on OS/X (the 2.0.5a jar does not work for us).


> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Attachments: SEL713.patch
>
>

J. Longman (JIRA)

unread,
Aug 10, 2010, 2:50:30 PM8/10/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19744#action_19744 ]

J. Longman commented on SRC-836:
--------------------------------

This is a *Critical* for me - using 1.0.3 I get ConcurrentModificationExceptions, with 2.0a5 I get no content in the XML document (nor JSON). I'm using this with selenium-webprofiler.

I would love to be able to get 1.0.4-SNAPSHOT if it has the fix, or even 1.0.3 source and apply the above patch, but I have no idea where that is, even looking at svn. There's no mention in svn of 1.0.3 afaik.

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Attachments: SEL713.patch
>
>

Stefan Birkner (JIRA)

unread,
Aug 12, 2010, 4:02:30 PM8/12/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Birkner updated SRC-836:
-------------------------------

Attachment: SRC-836.patch

This patch may be applied to the trunk.

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Attachments: SEL713.patch, SRC-836.patch

Stefan Birkner (JIRA)

unread,
Aug 12, 2010, 6:06:31 PM8/12/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19750#action_19750 ]

Stefan Birkner commented on SRC-836:
------------------------------------

Patch SRC-836.patch is meant.

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Attachments: SEL713.patch, SRC-836.patch
>
>

Kevin Menard (JIRA)

unread,
Aug 24, 2010, 9:51:31 AM8/24/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19765#action_19765 ]

Kevin Menard commented on SRC-836:
----------------------------------

I synchronized access on all iteration. This should do the trick. Let me know if you still see the problem.

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Fix For: 1.0.4
>
> Attachments: SEL713.patch, SRC-836.patch

Kevin Menard (JIRA)

unread,
Aug 24, 2010, 9:51:30 AM8/24/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Menard resolved SRC-836.
------------------------------

Resolution: Fixed
Fix Version/s: 1.0.4

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Fix For: 1.0.4
>
> Attachments: SEL713.patch, SRC-836.patch
>
>

Robert Slifka (JIRA)

unread,
Aug 24, 2010, 11:32:31 AM8/24/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19766#action_19766 ]

Robert Slifka commented on SRC-836:
-----------------------------------

Hi Kevin,

Since you're in this code, there are two other bugs:

1) XML traffic capture does not escape ampersands in attributes. It mistakenly outputs:

<entry ... url="http://foo.com/bar?name=rob&last=cool"...>

Which when parsed looks like this:

entry[:url] = http://foo.com/bar?name=rob=cool

...because the '&' isn't escaped.

2) JSON traffic capture outputs invalid JSON. The keys should be inside of double-quotes, per the JSON spec.

[{statusCode:200}]

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Fix For: 1.0.4
>
> Attachments: SEL713.patch, SRC-836.patch
>
>

Robert Slifka (JIRA)

unread,
Aug 24, 2010, 11:34:30 AM8/24/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19767#action_19767 ]

Robert Slifka commented on SRC-836:
-----------------------------------

I will second J. Longman's comment - with the 2.x line, I also get no traffic captured with XML or JSON, so having all of these issues fixed in 1.x is becoming a show stopper for us :(

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Fix For: 1.0.4
>
> Attachments: SEL713.patch, SRC-836.patch
>
>

Robert Slifka (JIRA)

unread,
Aug 24, 2010, 11:36:30 AM8/24/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19768#action_19768 ]

Robert Slifka commented on SRC-836:
-----------------------------------

RE: JSON

To validate the output JSON, run it through jsonlint.com.

Currently being generated: [{statusCode: 200}] (invalid)

Should be generated: [{"statusCode": 200}]

Thanks Kevin!

Rob

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Fix For: 1.0.4
>
> Attachments: SEL713.patch, SRC-836.patch
>
>

Robert Slifka (JIRA)

unread,
Aug 24, 2010, 11:43:31 AM8/24/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19770#action_19770 ]

Robert Slifka commented on SRC-836:
-----------------------------------

Silly me, filed a new bug:

http://jira.openqa.org/browse/SRC-840


> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Fix For: 1.0.4
>
> Attachments: SEL713.patch, SRC-836.patch
>
>

Kevin Menard (JIRA)

unread,
Aug 24, 2010, 11:43:30 AM8/24/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19769#action_19769 ]

Kevin Menard commented on SRC-836:
----------------------------------

Hi Robert,

Did you check the JSON output from trunk? That should have been fixed over a month ago. It should have been available in 2.0a5 as well.

As for new issues, please open separate issues. It'll just make it a lot easier to track things. We've also been moving over to Google Code for issue tracking. If you could open the XML one over there, it'd be much appreciated:

http://code.google.com/p/selenium/issues/list

Thanks,
Kevin

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Fix For: 1.0.4
>
> Attachments: SEL713.patch, SRC-836.patch
>
>

Robert Slifka (JIRA)

unread,
Aug 24, 2010, 11:52:30 AM8/24/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19772#action_19772 ]

Robert Slifka commented on SRC-836:
-----------------------------------

Hi Kevin,

I haven't yet checked the 1.x trunk as I'm not sure where it lives =/

We're currently playing hot potato with our selenium-server-standalone.jar files. In some, *proxy browser modes won't work on OS / X, in some we get concurrent modification exception (sometimes) and in some we get no captureNetworkTraffic output as J. Longman points out.

We are sorely in need of a 1.0.4 :(

Will you be at the meetup in Mountain View tonite?

Rob

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Fix For: 1.0.4
>
> Attachments: SEL713.patch, SRC-836.patch
>
>

Kevin Menard (JIRA)

unread,
Aug 24, 2010, 1:34:31 PM8/24/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19773#action_19773 ]

Kevin Menard commented on SRC-836:
----------------------------------

1.x trunk is the same as 2.x trunk. Just check it out and run "./go selenium-server-standalone" to get the JAR you need. If you could verify, that'd help. Otherwise I could cut a 1.0.4 release that still ships with the problem.

I will be at SFSE tonight.

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Fix For: 1.0.4
>
> Attachments: SEL713.patch, SRC-836.patch
>
>

Robert Slifka (JIRA)

unread,
Aug 26, 2010, 6:50:30 PM8/26/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19793#action_19793 ]

Robert Slifka commented on SRC-836:
-----------------------------------

Hi Kevin,

Just built and installed on OS X 10.6.4 with FF 3.6.8.

The ConcurrentModificationException went away. Unfortunately, it's no longer returning network traffic :)

Using all types (XML, PLAIN, JSON), we get no traffic back.

Rob

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Fix For: 1.0.4
>
> Attachments: SEL713.patch, SRC-836.patch
>
>

Robert Slifka (JIRA)

unread,
Aug 26, 2010, 6:52:30 PM8/26/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19794#action_19794 ]

Robert Slifka commented on SRC-836:
-----------------------------------

It seems as though my results corroborate J. Longman's.

- On 1.0.3, ConcurrentModificationException
- On 1.0.4, no traffic returned.
- On 2.0.5, no traffic returned.

I'm on IRC at the moment, if you'd like me to svn up and rebuild for interactive verification.

Rob

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Fix For: 1.0.4
>
> Attachments: SEL713.patch, SRC-836.patch
>
>

Robert Slifka (JIRA)

unread,
Aug 26, 2010, 7:58:31 PM8/26/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19795#action_19795 ]

Robert Slifka commented on SRC-836:
-----------------------------------

Hi Kevin,

We had a bit of a look and inserted a few logging statements to understand what's happening.

Inside of ProxyHandler:

- Network traffic is captured inside of ProxyHandler::proxyPlainTextRequest(...).
- proxyPlainTextRequest() is only called by ProxyHandler::handle(...).
- handle() is never called.

...which means there's no way traffic can be captured.

Hope this helps!

Rob


> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Fix For: 1.0.4
>
> Attachments: SEL713.patch, SRC-836.patch
>
>

Robert Slifka (JIRA)

unread,
Aug 26, 2010, 8:37:31 PM8/26/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19797#action_19797 ]

Robert Slifka commented on SRC-836:
-----------------------------------

Update!

- Traffic is captured with Google Chrome on OS/X
- Traffic is not captured with Firefox on OS/X (see my previous comment)

Unfortunately when using Google Chrome, we get an error from Selenium, which we don't get with Firefox (or Firefox via Sauce Labs).

Thu Aug 26 17:06:21 -0700 2010 selenium-client received failure from selenium server:
requested:
cmd=click
1=//a[@class='like_action']
sessionId=d8633f7b478840bfbd69a813c369bed6
received:
"ERROR: Command execution failure. Please search the forum at http://clearspace.openqa.org for error details from the log window. The error message is: Object #<a MouseEvent> has no method 'getPreventDefault'"
called from /Users/robertslifka/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/timeout.rb:62:in `timeout'
When I click on the share shade facebook like # features/step_definitions/str_steps.rb:64
ERROR: Command execution failure. Please search the forum at http://clearspace.openqa.org for error details from the log window. The error message is: Object #<a MouseEvent> has no method 'getPreventDefault' (Selenium::CommandError)

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>

> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3

> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey

> Assignee: Kevin Menard
> Fix For: 1.0.4
>
> Attachments: SEL713.patch, SRC-836.patch
>
>

Kevin Menard (JIRA)

unread,
Aug 26, 2010, 10:03:30 PM8/26/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19799#action_19799 ]

Kevin Menard commented on SRC-836:
----------------------------------

Can you check the proxy configuration from within Firefox the next time you debug? The browser shouldn't make any difference because the network data is captured at the proxy server level. In order for the data to be captured, however, the browser must use the Selenium server as the proxy. The Chrome launcher always sets up the proxy settings. The Firefox launcher should set up the proxy settings if the "captureNetworkTraffic" browser option is provided.

Robert Slifka (JIRA)

unread,
Aug 27, 2010, 1:29:31 AM8/27/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19800#action_19800 ]

Robert Slifka commented on SRC-836:
-----------------------------------

Hi Kevin,

Preferences > Advanced > Connection Settings:

Automatic proxy configuration URL:

file:/var/folders/rI/rI8bfk17E+OHA5AcSfjhiE+++TI/-Tmp-/customProfileDir42c85225226e461ebe4b81bdcdd79c51/proxy.pac

That file contains:

function FindProxyForURL(url, host) {
if (shExpMatch(host, 'local')) { return 'DIRECT'; }
if (shExpMatch(host, '*.local')) { return 'DIRECT'; }
if (shExpMatch(host, '169.254/16')) { return 'DIRECT'; }
if (shExpMatch(host, '*.169.254/16')) { return 'DIRECT'; }
if (shExpMatch(url, '*/selenium-server/*')) { return 'PROXY localhost:4444; DIRECT'; }
}

Note that I also get this warning on startup:

22:22:52.067 WARN - GET http://localhost:3001/selenium-server/core/scripts/user-extensions.js%5B42c85225226e461ebe4b81bdcdd79c51%5D HTTP/1.1
java.io.FileNotFoundException: (No such file or directory)

Robert Slifka (JIRA)

unread,
Aug 27, 2010, 2:47:31 AM8/27/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19802#action_19802 ]

Robert Slifka commented on SRC-836:
-----------------------------------

Hi Kevin,

I'm still working on wrapping my head around what's happening here.

If I modify DoNotUseProxyPac to output a file that looks like this:

{code}
function FindProxyForURL(url, host) {
return 'PROXY localhost:4444';
}
{code}

Then it works! I can capture traffic with Firefox on OS/X.

Rob

Robert Slifka (JIRA)

unread,
Aug 27, 2010, 3:27:31 AM8/27/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19803#action_19803 ]

Robert Slifka commented on SRC-836:
-----------------------------------

Hi Kevin,

I think this line:

{code}
if (shExpMatch(url, '/selenium-server/')) { return 'PROXY localhost:4444; DIRECT'; }
{code}

...isn't working, because when I generated a proxy.pac that looked like this:

{code}
function FindProxyForURL(url, host) {
if (shExpMatch(url, '/selenium-server/')) { return 'PROXY localhost:4444; DIRECT'; }
}
{code}

...it still didn't work. Either the matching logic failed or it fell back to DIRECT. It shouldn't have fallen back to DIRECT though, because the PROXY directive works in my one-line example above. My guess is that matcher is failing now?

HTH!

Robert Slifka (JIRA)

unread,
Aug 27, 2010, 12:27:30 PM8/27/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19807#action_19807 ]

Robert Slifka commented on SRC-836:
-----------------------------------

I filed a new issue at Google to track this proxy issue.

trunk (1.0.4?) proxy.pac generation with *firefoxproxy prevents request proxying
http://code.google.com/p/selenium/issues/detail?id=767

Please consider SRC-836 verified and closed.

Thanks!

Robert Slifka (JIRA)

unread,
Aug 27, 2010, 2:06:30 PM8/27/10
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19818#action_19818 ]

Robert Slifka commented on SRC-836:
-----------------------------------

Actually, the XML format is busted still. Bug in CaptureNetworkTrafficCommand:

sb.append("method=\"").append(json(entry.method)).append("\" ");

This generates:

method=""GET""

Should probably be "xml(entry.method)".

Gil Klein (JIRA)

unread,
Feb 16, 2011, 1:18:20 PM2/16/11
to selenium-deve...@googlegroups.com

[ http://jira.openqa.org/browse/SRC-836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gil Klein updated SRC-836:
--------------------------

Attachment: CaptureNetworkTrafficCommand.java.patch

Here is a patch for Selenium 2.0 that solves all of the escaping problem with XML output. It uses org.apache.commons.lang.StringEscapeUtils

> captureNetworkTraffic() in RC causes java.util.ConcurrentModificationException
> ------------------------------------------------------------------------------
>
> Key: SRC-836
> URL: http://jira.openqa.org/browse/SRC-836
> Project: Selenium Remote Control
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.3
> Environment: Ubuntu Linux 9.04 / FF 3.0, Selenium 1.01
> Reporter: Corey
> Assignee: Kevin Menard
> Fix For: 1.0.4
>

> Attachments: CaptureNetworkTrafficCommand.java.patch, SEL713.patch, SRC-836.patch

Reply all
Reply to author
Forward
0 new messages