[Catalyst] New install getting "Wide character in syswrite" error

2010-09-21 Thread Charlie Garrison

Good afternoon,

I setup an installation of our app for a new developer last 
night and keep getting the 'Caught
exception in engine "Wide character in syswrite at...' error 
when making POST requests. Reading through the archives I expect 
this is a Unicode encoding problem. But I can't figure out where 
I'm going wrong with the new setup. (Note, the app works fine on 
4 other workstations/servers, so I'm guessing it's a problem 
specific to this one setup.)


There was a test error when installing 
Catalyst::Plugin::Unicode::Encoding. I downgraded Encode to 
v2.39 and then Catalyst::Plugin::Unicode::Encoding installed cleanly.


The plugin list is:

__PACKAGE__->setup(qw/
ConfigLoader
AutoCRUD
Static::Simple
Params::Nested
I18N
Unicode::Encoding
Cache::HTTP

Session
Session::Store::DBIC
Session::State::Cookie
Session::State::URI

Authentication
Authorization::Roles
Authorization::ACL
RequireSSL
Cache
/);

What else can I try to resolve this problem?

Thanks,
Charlie

--
   Ꮚ Charlie Garrison ♊ 

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
〠  http://www.ietf.org/rfc/rfc1855.txt

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] New install getting "Wide character in syswrite" error

2010-09-22 Thread Tomas Doran


On 22 Sep 2010, at 04:00, Charlie Garrison wrote:


Good afternoon,

I setup an installation of our app for a new developer last night  
and keep getting the 'Caught
exception in engine "Wide character in syswrite at...' error when  
making POST requests. Reading through the archives I expect this is  
a Unicode encoding problem. But I can't figure out where I'm going  
wrong with the new setup. (Note, the app works fine on 4 other  
workstations/servers, so I'm guessing it's a problem specific to  
this one setup.)


How is this deployed? I mean, is this with the test server, or other?

There was a test error when installing  
Catalyst::Plugin::Unicode::Encoding. I downgraded Encode to v2.39  
and then Catalyst::Plugin::Unicode::Encoding installed cleanly.


Aha: https://rt.cpan.org/Ticket/Display.html?id=61456

Upgrading LWP fixes the tests issue..

Thanks for the notification!

Can you try version 1.0 of Unicode::Encoding to see if this fixes your  
issue?


Cheers
t0m


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] New install getting "Wide character in syswrite" error

2010-09-22 Thread Charlie Garrison

Good evening,

On 22/09/10 at 10:21 AM +0100, Tomas Doran 
 wrote:



How is this deployed? I mean, is this with the test server, or other?


Using myapp_server.pl; eg:

$ ./script/myapp_server.pl -k --port 3124

There was a test error when installing 
Catalyst::Plugin::Unicode::Encoding. I downgraded Encode to 
v2.39 and then Catalyst::Plugin::Unicode::Encoding installed cleanly.


Aha: https://rt.cpan.org/Ticket/Display.html?id=61456

Upgrading LWP fixes the tests issue..


Yep. Upgrading LWP, Encode and C::P::Unicode::Encoding to latest 
versions was successful.



Can you try version 1.0 of Unicode::Encoding to see if this fixes your issue?


I tried that before doing above upgrade. It didn't fix the problem.

I'm not getting the "Wide character in syswrite" error now, but 
the symptoms still persist. Also, once the problem starts the 
test server won't respond to any further requests; requires a 
restart. Canceling the current request results in following error:


Caught exception in engine "Wrong Content-Length value: 52"

Any other suggestions?

Thanks,
Charlie

--
   Ꮚ Charlie Garrison ♊ 

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
〠  http://www.ietf.org/rfc/rfc1855.txt

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] New install getting "Wide character in syswrite" error

2010-09-22 Thread Tomas Doran


On 22 Sep 2010, at 11:15, Charlie Garrison wrote:

Any other suggestions?



Using Devel::SimpleTrace or Carp::Always to get a backtrace of what is  
doing the bad syswrite would be helpful..


Cheers
t0m


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] New install getting "Wide character in syswrite" error

2010-09-22 Thread Larry Leszczynski
Hi Charlie -

> once the problem starts the test server won't respond to any further
> requests; requires a restart. Canceling the current request results in
> following error:
> 
> Caught exception in engine "Wrong Content-Length value: 52"

May be totally related but I have seen those symptoms when the body of a
POST request gets read earlier in the request than usual, and then looks
empty when it is supposed to be read (so the Content-Length is zero
instead of whatever it should be).  In my case I was calling
$c->req->param inside prepare_path, and it seemed like it was sucking in
the whole POST body, leaving it empty for when it needed to be accessed
later.


HTH,
Larry

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] New install getting "Wide character in syswrite" error

2010-09-22 Thread Charlie Garrison

Good evening,

On 22/09/10 at 7:24 AM -0600, Larry Leszczynski 
 wrote:



May be totally related but I have seen those symptoms when the body of a
POST request gets read earlier in the request than usual, and then looks
empty when it is supposed to be read (so the Content-Length is zero
instead of whatever it should be).  In my case I was calling
$c->req->param inside prepare_path, and it seemed like it was sucking in
the whole POST body, leaving it empty for when it needed to be accessed
later.


Thanks for that. I thought this issue seemed familiar. Fingers 
in too many pies and I just couldn't remember where I had seen 
it recently. It's an issue with Catalyst::Plugin::Session::State::URI.


I don't have access to the problem machine right now, but I'm 
sure this will fix it.


@@ -320,7 +320,7 @@
 if ( my $param = $c->_session_plugin_config->{param} )
 {   # use param style rewriting

-if ( my $sid = $c->request->param($param) ) {
+if ( my $sid = $c->request->query_parameters->{$param} 
) {

 $c->_sessionid_from_uri($sid);
 $c->_tried_loading_session_id(0);
 $c->log->debug(qq/Found sessionid "$sid" in query parameters/)


I think I already submitted a patch for this; yep, r13505.

t0m, any chance of a new release of C::P::Session::State::URI? 
In the meantime I'll apply the above patch to the new dev's machine.



Charlie

--
   Ꮚ Charlie Garrison ♊ 

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
〠  http://www.ietf.org/rfc/rfc1855.txt

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] New install getting "Wide character in syswrite" error

2010-09-22 Thread Tomas Doran


On 22 Sep 2010, at 14:53, Charlie Garrison wrote:

I think I already submitted a patch for this; yep, r13505.

t0m, any chance of a new release of C::P::Session::State::URI? In  
the meantime I'll apply the above patch to the new dev's machine.


This adds a test which fails. You appear to have forgotten to commit  
your additions to the test application?


But sure as soon as that's fixed up :)

Cheers
t0m


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] New install getting "Wide character in syswrite" error

2010-09-22 Thread Charlie Garrison
Good morning,

On 22/09/10 at 4:35 PM +0100, Tomas Doran  wrote:

>On 22 Sep 2010, at 14:53, Charlie Garrison wrote:
>>I think I already submitted a patch for this; yep, r13505.
>>
>>t0m, any chance of a new release of C::P::Session::State::URI? 
>>In the meantime I'll apply the above patch to the new dev's machine.
>
>This adds a test which fails. You appear to have forgotten to commit your 
>additions to the test 
>application?
>
>But sure as soon as that's fixed up :)

Hmm, I somehow managed to miss one of the test files when committing. I'll get 
that fixed up. 

Thanks,
Charlie

-- 
   Ꮚ Charlie Garrison ♊ 
   
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
〠  http://www.ietf.org/rfc/rfc1855.txt

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/