Wide character error in RT::Squish

We upgraded our RT server’s OS and some Perl modules (without changing RT version from 5.0.9). Now we’re getting a Wide character error when RT::Squish calculates the MD5 hash for the combined Javascript (error below). Certainly some of the Javascript files have UTF-8 characters (e.g. selectize.js) but that wouldn’t have changed.

I haven’t been able to pinpoint what’s going wrong, but I can workaround it by:

  • setting DevelMode to 1; or
  • changing line 85 of RT/Squish.pm to $self->Key( md5_hex Encode::encode_utf8 $content );

Environment: RT 5.0.9 from ports on FreeBSD 14.4-RELEASE

Error message/stack trace:

May  5 20:40:44 rt RT[3974]: [3974] Wide character in subroutine entry at /usr/local/lib/perl5/site_perl/RT/Squish.pm line 85.  Stack:   [/usr/local/lib/perl5/site_perl/RT/Squish.pm:85]   [/usr/local/lib/perl5/site_perl/RT/Interface/Web.pm:113]   [/usr/local/share/rt50/html/Elements/HeaderJavascript:72]   [/usr/local/share/rt50/html/Elements/Header:95]   [/usr/local/share/rt50/html/Elements/Login:49]   [/usr/local/share/rt50/html/NoAuth/Login.html:56]   [/usr/local/lib/perl5/site_perl/RT/Interface/Web.pm:701]   [/usr/local/lib/perl5/site_perl/RT/Interface/Web.pm:410]   [/usr/local/share/rt50/html/autohandler:53]

Perl module versions:

# rt-test-dependencies
perl:
    5.10.1 ................................................. ok (5.42.2)

users / groups:
    rt group (www) ......................................... ok (gid 80)
    bin user (root) ........................................ ok (uid 0)
    libs user (root) ....................................... ok (uid 0)
    libs group (wheel) ..................................... ok (gid 0)
    web user (www) ......................................... ok (uid 80)
    web group (www) ........................................ ok (gid 80)

CORE dependencies:
    Apache::Session >= 1.53 ................................ ok (1.94)
    Business::Hours ........................................ ok
    CGI >= 4.00 ............................................ ok (4.71)
    CGI::Cookie >= 1.20 .................................... ok (4.59)
    CGI::Emulate::PSGI ..................................... ok
    CGI::PSGI >= 0.12 ...................................... ok (0.15)
    CSS::Inliner >= 4027 ................................... ok (4027)
    CSS::Minifier::XS ...................................... ok
    CSS::Squish >= 0.06 .................................... ok (0.10)
    Class::Accessor::Fast .................................. ok
    Clone .................................................. ok
    Convert::Color ......................................... ok
    Crypt::Eksblowfish ..................................... ok
    DBI >= 1.37 ............................................ ok (1.647)
    DBIx::SearchBuilder >= 1.80 ............................ ok (1.80)
    Data::GUID ............................................. ok
    Data::ICal ............................................. ok
    Data::Page ............................................. ok
    Date::Extract >= 0.07 .................................. ok (0.07)
    Date::Manip ............................................ ok
    DateTime >= 0.44 ....................................... ok (1.66)
    DateTime::Format::Natural >= 0.67 ...................... ok (1.25)
    DateTime::Locale >= 0.40, != 1.00, != 1.01 ............. ok (1.45)
    Devel::GlobalDestruction ............................... ok
    Devel::StackTrace >= 1.19, != 1.28, != 1.29 ............ ok (2.05)
    Digest::MD5 >= 2.27 .................................... ok (2.59)
    Digest::SHA ............................................ ok
    Digest::base ........................................... ok
    Email::Address >= 1.912 ................................ ok (1.913)
    Email::Address::List >= 0.06 ........................... ok (0.06)
    Encode >= 2.64 ......................................... ok (3.21)
    Encode::Detect::Detector ............................... ok
    Encode::HanExtra ....................................... ok
    Errno .................................................. ok
    File::Glob ............................................. ok
    File::ShareDir ......................................... ok
    File::Spec >= 0.8 ...................................... ok (3.94)
    File::Temp >= 0.19 ..................................... ok (0.2311)
    Getopt::Long >= 2.24 ................................... ok (2.58)
    HTML::Entities ......................................... ok
    HTML::FormatExternal ................................... ok
    HTML::FormatText::WithLinks >= 0.14 .................... ok (0.15)
    HTML::FormatText::WithLinks::AndTables >= 0.06 ......... ok (0.07)
    HTML::Gumbo ............................................ ok
    HTML::Mason >= 1.43 .................................... ok (1.60)
    HTML::Mason::PSGIHandler >= 0.52 ....................... ok (0.53)
    HTML::Quoted ........................................... ok
    HTML::RewriteAttributes >= 0.06 ........................ ok (0.06)
    HTML::Scrubber >= 0.08 ................................. ok (0.19)
    HTTP::Message >= 6.07 .................................. ok (7.01)
    HTTP::Request::Common .................................. ok
    IPC::Run3 .............................................. ok
    JSON ................................................... ok
    JavaScript::Minifier::XS ............................... ok
    LWP >= 6.02 ............................................ ok (6.82)
    LWP::Protocol::https ................................... ok
    LWP::Simple ............................................ ok
    LWP::UserAgent >= 6.02 ................................. ok (6.82)
    List::MoreUtils >= 0.420 ............................... ok (0.430)
    Locale::Maketext >= 1.06 ............................... ok (1.33)
    Locale::Maketext::Fuzzy >= 0.11 ........................ ok (0.11)
    Locale::Maketext::Lexicon >= 0.32 ...................... ok (1.00)
    Log::Dispatch >= 2.30 .................................. ok (2.71)
    MIME::Entity >= 5.504 .................................. ok (5.517)
    MIME::Types ............................................ ok
    Mail::Header >= 2.12 ................................... ok (2.22)
    Mail::Mailer >= 1.57 ................................... ok (2.22)
    Module::Path ........................................... ok
    Module::Refresh >= 0.03 ................................ ok (0.18)
    Module::Runtime ........................................ ok
    Module::Versions::Report >= 1.05 ....................... ok (1.06)
    Moose .................................................. ok
    MooseX::NonMoose ....................................... ok
    MooseX::Role::Parameterized ............................ ok
    Mozilla::CA ............................................ ok
    Net::CIDR .............................................. ok
    Net::IP ................................................ ok
    Parallel::ForkManager .................................. ok
    Path::Dispatcher >= 1.07 ............................... ok (1.08)
    Plack >= 1.0002 ........................................ ok (1.0053)
    Plack::Handler::Starlet ................................ ok
    Pod::Usage ............................................. ok
    Regexp::Common ......................................... ok
    Regexp::Common::net::CIDR .............................. ok
    Regexp::IPv6 ........................................... ok
    Role::Basic >= 0.12 .................................... ok (0.16)
    Scalar::Util ........................................... ok
    Scope::Upper ........................................... ok
    Storable >= 2.08 ....................................... ok (3.37)
    Sub::Exporter .......................................... ok
    Symbol::Global::Name >= 0.05 ........................... ok (0.05)
    Sys::Syslog >= 0.16 .................................... ok (0.36)
    Term::ReadKey .......................................... ok
    Term::ReadLine ......................................... ok
    Text::ParseWords ....................................... ok
    Text::Password::Pronounceable .......................... ok
    Text::Quoted >= 2.07 ................................... ok (2.10)
    Text::Template >= 1.44 ................................. ok (1.61)
    Text::WikiFormat >= 0.76 ............................... ok (0.81)
    Text::WordDiff ......................................... ok
    Text::Wrapper .......................................... ok
    Time::HiRes ............................................ ok
    Time::ParseDate ........................................ ok
    Tree::Simple >= 1.04 ................................... ok (1.34)
    URI >= 1.59 ............................................ ok (5.34)
    URI::QueryParam ........................................ ok
    Web::Machine >= 0.12 ................................... ok (0.17)
    XML::RSS >= 1.05 ....................................... ok (1.65)
    namespace::autoclean ................................... ok

FASTCGI dependencies:
    FCGI >= 0.74 ........................................... ok (0.82)

GD dependencies:
    GD ..................................................... ok
    GD::Graph >= 1.56 ...................................... ok (1.56)
    GD::Text ............................................... ok

GRAPHVIZ dependencies:
    GraphViz2 .............................................. ok
    IPC::Run >= 0.90 ....................................... ok (20260402.0)

MYSQL dependencies:
    DBD::mysql >= 2.1018, != 4.042 ......................... ok (5.008)

SMIME dependencies:
    Crypt::X509 ............................................ ok
    File::Which ............................................ ok
    String::ShellQuote ..................................... ok


---------------------------------------------------------------------------

All dependencies found.


Follow Jim’s recent advice here https://forum.bestpractical.com/t/bug-in-latest-plack-version-rt-fails-to-start-up/41628/2, the static loader for RT::Squish uses Plack.

1 Like

Thanks, zkelly. Plack was one of the packages that was upgraded shortly before this problem started, so that does look like a good fit. I’ll test it out.

May  5 18:57:54 rt pkg[28941]: p5-Plack upgraded: 1.0051 -> 1.0053