Skip Menu |

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

Report information
The Basics
Id: 65615
Status: resolved
Priority: 0/
Queue: WWW-Mechanize-FireFox

People
Owner: Nobody in particular
Requestors: WOLDRICH [...] cpan.org
Cc: magnus [...] trapd00r.se
AdminCc:

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



CC: magnus [...] trapd00r.se
Subject: maximum input buffer length exceeded
I am not sure this can be solved within this distribution; I guess it's a telnet limitation. When using the content_as_png method on 'long' pages with much content, it dies with the following message: maximum input buffer length exceeded: 1048576 bytes at /usr/share/perl5/site_perl/MozRepl/Client.pm line 186 It can be reproduced with this snippet: use strict; use WWW::Mechanize::Firefox; my $f = WWW::Mechanize::Firefox->new( launch => 'firefox', tab => 'current', agent_alias => 'Linux Mozilla', ); $f->get('http://reddit.com'); my $img = $f->content_as_png;
Subject: Re: [rt.cpan.org #65615] maximum input buffer length exceeded
Date: Thu, 10 Feb 2011 10:45:06 +0100 (CET)
To: bug-WWW-Mechanize-FireFox [...] rt.cpan.org
From: webmaster [...] corion.net
Hello, thanks for using the module and for reporting the error! Show quoted text
> I am not sure this can be solved within this distribution; I guess it's > a telnet limitation. > > When using the content_as_png method on 'long' pages with much content, > it dies with the following message: > > maximum input buffer length exceeded: 1048576 bytes at > /usr/share/perl5/site_perl/MozRepl/Client.pm line 186 > > It can be reproduced with this snippet:
Please use the `bufsize` parameter in the constructor, as documented in the documentation for the module. If that does not work, then there is a bug. bufsize - Net::Telnet buffer size, if the default of 1MB is not enough I'll see that I add a section to the ::Troubleshooting document so that this solution becomes more obvious. -max
RT-Send-CC: magnus [...] trapd00r.se
Show quoted text
> Please use the `bufsize` parameter in the constructor, as documented in > the documentation for the module. If that does not work, then there is a > bug.
Sorry for not reading the documentation properly. However, I've tried ranges from 2M all the way up to 100M, and the issue still remains.
Subject: Re: [rt.cpan.org #65615] maximum input buffer length exceeded
Date: Thu, 10 Feb 2011 19:52:44 +0100
To: bug-WWW-Mechanize-FireFox [...] rt.cpan.org
From: Max Maischein <corion [...] corion.net>
Hello Magnus, Show quoted text
> However, I've tried ranges from 2M all the way up to 100M, and the issue > still remains.
What version of MozRepl::RemoteObject and WWW::Mechanize::Firefox do you use? I can't reproduce the error with the program you gave using the latest versions: WWW::Mechanize::Firefox: 0.45 MozRepl::RemoteObject: 0.21 -max
Show quoted text
> What version of MozRepl::RemoteObject and WWW::Mechanize::Firefox do you > use?
Hello Max, I use the very same versions: WWW::Mechanize::Firefox: 0.45 MozRepl::RemoteObject: 0.21 However, I've noticed a strange pattern. Whatever I give as a value to bufsize, it _always_ dies with the same message (with different bytes): maximum input buffer length exceeded: 1024 bytes at /usr/share/perl5/site_perl/MozRepl/Client.pm line 186 It doesnt matter what URL I'm trying to get at. Take perl.org - this does not work at all: use strict; use WWW::Mechanize::Firefox; my $f = WWW::Mechanize::Firefox->new( launch => 'firefox', tab => 'current', agent_alias => 'Mozilla Firefox', bufsize => 2048, ); $f->get('http://perl.org'); my $img = $f->content_as_png; ... but if I remove the bufsize key it works as expected.
Subject: Re: [rt.cpan.org #65615] maximum input buffer length exceeded
Date: Fri, 18 Feb 2011 15:29:45 +0100
To: bug-WWW-Mechanize-FireFox [...] rt.cpan.org
From: Max Maischein <corion [...] corion.net>
Hello, this is very weird, because I cannot replicate what you find: Show quoted text
> However, I've noticed a strange pattern. > Whatever I give as a value to bufsize, it _always_ dies with the same > message (with different bytes):
This sounds to me as if your Perl is picking up a different module version (which had this bug). If I use the below script, I get the error that the buffer size of 1025 is too small, which is OK, as I pass that too small buffer size in. Really do check that the correct module versions get loaded. Are you sure that you are running the version of Perl that you think you are running? I've added the below code as another test file, just to make sure that the buffer size always gets picked up. -max #!perl -w use strict; use Test::More; use WWW::Mechanize::Firefox; my $mech = eval { WWW::Mechanize::Firefox->new( autodie => 0, bufsize => 1025, # a too small size, but still larger than the Net::Telnet default #log => ['debug'], )}; if (! $mech) { my $err = $@; plan skip_all => "Couldn't connect to MozRepl: $@"; exit } else { plan tests => 3; }; isa_ok $mech, 'WWW::Mechanize::Firefox'; my $response; my $result = eval { $response = $mech->get('http://perl.org/', no_cache => 1); # a large website 1 }; ok !$result, "We died on the call"; like $@, qr/1025/, "... and we got the correct bufsize error";