Skip Menu |

This queue is for tickets about the WWW-Mechanize-PhantomJS CPAN distribution.

Report information
The Basics
Id: 105400
Status: open
Priority: 0/
Queue: WWW-Mechanize-PhantomJS

People
Owner: Nobody in particular
Requestors: andy [...] andybev.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Failing test t/50-mech-error.t
Date: Mon, 22 Jun 2015 11:46:44 +0100
To: bug-WWW-Mechanize-PhantomJS [...] rt.cpan.org
From: Andrew Beverley <andy [...] andybev.com>
I may be doing something wrong here, as no tests are showing failed on CPAN testers, but I'd appreciate some help nonetheless. I get the following error when running the tests: # PhantomJS version '1.9.0', ghostdriver version '1.1.0' t/50-mech-error.t ............. 1/2 # Failed test 'the correct location gets flagged as error' # at foo line 4. # 'Error while executing command: executeScript: An unknown server-side error occurred while processing the command.: {"errorMessage":"Can't find variable: bar","request":{"headers":{"Accept":"application/json","Connection":"TE, close","Content-Length":"33","Content-Type":"application/json; charset=utf-8","Host":"localhost:8910","TE":"deflate,gzip;q=0.3","User-Agent":"libwww-perl/6.08"},"httpVersion":"1.1","method":"POST","post":"{\"script\":\"return bar\",\"args\":[]}","url":"/execute","urlParsed":{"anchor":"","query":"","file":"execute","directory":"/","path":"/execute","relative":"/execute","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/execute","queryKey":{},"chunks":["execute"]},"urlOriginal":"/session/e8f2f2f0-18c8-11e5-92f4-df6634fedf54/execute"}} at /usr/local/share/perl/5.20.2/Selenium/Remote/Driver.pm line 300. # at /usr/local/share/perl/5.20.2/Selenium/Remote/Driver.pm line 300. # ' # doesn't match '(?^:\bat foo line 2\b)' # Looks like you failed 1 test of 2. t/50-mech-error.t ............. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests I could have misread that, but it looks like the error format may have changed in Selnium::Remote::Driver? Thanks, Andy
Subject: Re: [rt.cpan.org #105400] Failing test t/50-mech-error.t
Date: Mon, 22 Jun 2015 21:40:13 +0200
To: bug-WWW-Mechanize-PhantomJS [...] rt.cpan.org
From: Max Maischein <corion [...] cpan.org>
Hello Andrew, thank you for using my module! Show quoted text
> I may be doing something wrong here, as no tests are showing failed on > CPAN testers, but I'd appreciate some help nonetheless. > > I get the following error when running the tests: > > # PhantomJS version '1.9.0', ghostdriver version '1.1.0' > t/50-mech-error.t ............. 1/2 > # Failed test 'the correct location gets flagged as error' > # at foo line 4. > # 'Error while executing command: executeScript: An unknown server-side error occurred while processing the command.: {"errorMessage":"Can't find variable: bar","request":{"headers":{"Accept":"application/json","Connection":"TE, close","Content-Length":"33","Content-Type":"application/json; charset=utf-8","Host":"localhost:8910","TE":"deflate,gzip;q=0.3","User-Agent":"libwww-perl/6.08"},"httpVersion":"1.1","method":"POST","post":"{\"script\":\"return bar\",\"args\":[]}","url":"/execute","urlParsed":{"anchor":"","query":"","file":"execute","directory":"/","path":"/execute","relative":"/execute","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/execute","queryKey":{},"chunks":["execute"]},"urlOriginal":"/session/e8f2f2f0-18c8-11e5-92f4-df6634fedf54/execute"}} at /usr/local/share/perl/5.20.2/Selenium/Remote/Driver.pm line 300. > # at /usr/local/share/perl/5.20.2/Selenium/Remote/Driver.pm line 300. > # ' > # doesn't match '(?^:\bat foo line 2\b)' > # Looks like you failed 1 test of 2. > t/50-mech-error.t ............. Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/2 subtests > > > I could have misread that, but it looks like the error format may have > changed in Selnium::Remote::Driver?
Hmm - yes, it seems that Selenium::Remote::Driver changed and does not report the error from the perspective of the caller at all anymore, and I don't understand how it changed to do that. It seems that even the error_handler attribute gets the error line within Selenium::Remote::Driver instead of an error location somewhere further up the call stack, so I suspect it's some weird change in S:R:D. I think the test failure is harmless, but I will disarm the test in the next release of the module, as I don't see an easy way to properly report an error at the correct location if S:R:D does not cooperate here. Thanks again for reporting the issue, -max
Subject: Re: [rt.cpan.org #105400] Failing test t/50-mech-error.t
Date: Mon, 22 Jun 2015 23:05:31 +0100
To: bug-WWW-Mechanize-PhantomJS [...] rt.cpan.org
From: Andrew Beverley <andy [...] andybev.com>
On Mon, 2015-06-22 at 15:40 -0400, Max Maischein via RT wrote: Show quoted text
> thank you for using my module!
No, thank *you* for producing the module! It's excellent. Show quoted text
> I think the test failure is harmless, but I will disarm the test in the > next release of the module,
That's great, thanks for the quick response. Andy