FAQ
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 ? <garrison@zeta.org.au>

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

Search Discussions

  • Tomas Doran at Sep 22, 2010 at 9:20 am

    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?ida456

    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
  • Charlie Garrison at Sep 22, 2010 at 10:15 am
    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?ida456

    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 ? <garrison@zeta.org.au>

    O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
    ? http://www.ietf.org/rfc/rfc1855.txt
  • Tomas Doran at Sep 22, 2010 at 12:14 pm

    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
  • Larry Leszczynski at Sep 22, 2010 at 1:24 pm
    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
  • Charlie Garrison at Sep 22, 2010 at 1:53 pm
    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 ? <garrison@zeta.org.au>

    O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
    ? http://www.ietf.org/rfc/rfc1855.txt
  • Tomas Doran at Sep 22, 2010 at 3:33 pm

    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
  • Charlie Garrison at Sep 23, 2010 at 1:10 am
    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 ? <garrison@zeta.org.au>

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedSep 22, '10 at 3:00a
activeSep 23, '10 at 1:10a
posts8
users3
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2021 Grokbase