Update to RT 4.2.1 -> JSON error after login

Hello,

I updated my RT test server to 4.2.1 (from 4.2.0) and after

  • stopping apache
  • clearing caches
  • starting apache

I see the login page, but when I login RT signals an internal error.

In the Log:

[13817] [Fri Nov 22 08:17:15 2013] [error]: encountered object ‘1’, but neither allow_blessed, convert_blessed nor allow_tags settings are enabled (or TO_JSON/FREEZE method missing) at /usr/local/share/perl/5.10.1/JSON.pm line 154.

Stack:
[/usr/local/share/perl/5.10.1/JSON.pm:154]
[/var/www/vhosts/server.drdpc.de/rt-test/sbin/…/lib/RT/Interface/Web.pm:196]
[/var/www/vhosts/server.drdpc.de/rt-test/sbin/…/lib/RT/Interface/Web.pm:3890]
[/var/www/vhosts/server.drdpc.de/rt-test/share/html/Elements/JavascriptConfig:79]
[/var/www/vhosts/server.drdpc.de/rt-test/share/html/Elements/HeaderJavascript:48]
[/var/www/vhosts/server.drdpc.de/rt-test/share/html/Elements/Header:79]
[/var/www/vhosts/server.drdpc.de/rt-test/share/html/index.html:4]
[/var/www/vhosts/server.drdpc.de/rt-test/sbin/…/lib/RT/Interface/Web.pm:680]
[/var/www/vhosts/server.drdpc.de/rt-test/sbin/…/lib/RT/Interface/Web.pm:368]
[/var/www/vhosts/server.drdpc.de/rt-test/share/html/autohandler:53] (/var/www/vhosts/server.drdpc.de/rt-test/sbin/…/lib/RT/Interface/Web/Handler.pm:211)

apache-conf is mod_perl2 with a preloaded rt-server parent process for the virtual host
Extensions installed and loaded:

Set( @Plugins,(qw(RT::Extension::MergeUsers RT::Extension::ResetPassword)) );
Set( @MailPlugins, ‘Auth::MailFrom’, ‘Auth::Crypt’ );

I already tried:

  • using another browser (emptying and disabling caches in browser)
  • update Perl-module JSON to latest version
  • update Mason to latest version

My produtive RT (4.2.0) is still running even after apache restart with the same perl instance.
I dare not cleaning caches though.

Help is really appreciated.

Dirk

Hello,

with some testing I found a workaround for which I don’t know, if it is a bug fix.
I found, if I patch html/Elements/JavascriptConfig the following way, my server lets me in without error.
strange enough my productive server has the same file which is working fine there.

I would appreciate, if anybody can explain me what is happening.

Dirk

In the Log:

[13817] [Fri Nov 22 08:17:15 2013] [error]: encountered object ‘1’,
but neither allow_blessed, convert_blessed nor allow_tags settings
are enabled (or TO_JSON/FREEZE method missing) at /usr/local/share/perl/5.10.1/JSON.pm line 154.

Show the output of:
perl -MJSON -MModule::Versions::Report -e1

  • Alex

Hi Alex,

$ perl -MJSON -MModule::Versions::Report -e1

Perl v5.10.1 under linux
Modules in memory:
attributes v0.09;
base v2.18;
Carp v1.32;
common::sense v3.72;
constant v1.27;
Exporter v5.68;
Exporter::Heavy v5.68;
JSON v2.90;
JSON::Backend::XS::Supportable;
JSON::PP::Boolean;
JSON::XS v3.01;
JSON::XS::Boolean;
Module::Versions::Report v1.06;
overload v1.07;
strict v1.04;
Types::Serialiser v0.03;
Types::Serialiser::Boolean;
vars v1.01;
warnings v1.06;
warnings::register v1.01;
XSLoader v0.16;
[at Fri Nov 22 17:20:39 2013 (local) / Fri Nov 22 16:20:39 2013 (GMT)]

DirkAm 22.11.2013 um 16:55 schrieb Alex Vandiver alexmv@bestpractical.com:

On Fri, 2013-11-22 at 09:28 +0100, Dr. Dirk Pape wrote:

In the Log:

[13817] [Fri Nov 22 08:17:15 2013] [error]: encountered object ‘1’,
but neither allow_blessed, convert_blessed nor allow_tags settings
are enabled (or TO_JSON/FREEZE method missing) at /usr/local/share/perl/5.10.1/JSON.pm line 154.

Show the output of:
perl -MJSON -MModule::Versions::Report -e1

  • Alex

Hi Alex,

$ perl -MJSON -MModule::Versions::Report -e1
[snip]

I can’t replicate your failure with the same versions. Does the
following error for you?

perl -MJSON -wle ‘print JSON::to_json({foo=>JSON::true})’

  • Alex

Hi Alex,

it is fine:

$ perl -MJSON -wle ‘print JSON::to_json({foo=>JSON::true})’
{“foo”:true}

This is very strange!
I updated my productive RT to 4.2.1 now and it does not show the issue even with the JavascriptConfig unpatched. It uses the same perl and PERLLIB.

So it must have to do something with the Site Configuration or with the apache Config.
I will look into this again in the next days and see if I can spot the difference.

Many thanks for helping anyway!

DirkAm 22.11.2013 um 19:50 schrieb Alex Vandiver alexmv@bestpractical.com:

On Fri, 2013-11-22 at 17:22 +0100, Dr. Dirk Pape wrote:

Hi Alex,

$ perl -MJSON -MModule::Versions::Report -e1
[snip]

I can’t replicate your failure with the same versions. Does the
following error for you?

perl -MJSON -wle ‘print JSON::to_json({foo=>JSON::true})’

  • Alex