REST API Extension error

Hi All,

I installed the updated REST API Extension but it turns out RT has encountering an error ‘An internal RT error has occurred. Your administrator can find more details in RT’s log files.’ logging in.

I try to remove and install libcpanel-json-xs-perl but still no luck.

Appreciate your help.

Thank you.
Karen

There are a few posts where users have experienced this bug. It is related to JSON::XS and JSON::PP. In my case, both were installed and I uninstalled XS to correct my problem. I use the cpanm command to uninstall Perl modules. It is in the App::cpanminus package from CPAN.

Hi Carl,

I tried it too but still no luck.

I am encountering error too using apt install update.

Thanks.

Karen

Can you help me another way of uninstalling JSON::XS and JSON::PP? Cpanm -u is not working for me too.

Thanks.

I’ll try, Karen. First off, RT needs one of those JSON modules. Either one should work, but they both do the same thing, so you don’t need both. That was the problem in my case, so I chose to remove XS (a C compiled, faster version) and kept PP (a pure Perl version).

The trick in removing will be to find where the module is installed. Once you find it, you can remove XS.pm (or PP.pm). I would strongly recommend moving it to a backup directory so that you can easily put it back if things go bad. You can also experiment in removing one or the other. They are most likely both in the same directory.

If you are fortunate enough to be using Linux, try this command as root:

ls $(perl -e ‘print “$_/JSON/XS.pm\n” for @INC’) 2>/dev/null

Hopefully, this will show you a single XS.pm file. Move that somewhere else and see if that solves your problem.

On my system, you can see that I have the JSON/PP.pm, but not the JSON/XS.pm, file.

[root@loc ~]# ls $(perl -e ‘print “$/JSON/PP.pm\n" for @INC’) 2>/dev/null
/usr/local/share/perl5/JSON/PP.pm
[root@loc ~]# ls $(perl -e 'print "$
/JSON/XS.pm\n” for @INC’) 2>/dev/null
[root@loc ~]#

HTH.

I got this in my Perl Version but I can’t locate those JSON Modules using the command you suggest.

image

Thank you.
Karen

Hi Carl,

My RT is working already.

I found out that I have 3 JSON and used $perl -V to locate the path locations and I move them to other directories.

Thank you so much. :slight_smile:

God bless you
karen

I don’t have the perfect solution for this error but I have a good blog for REST API & I think you should try this.
Below is useful link which will help you to remove error.

Hope it helps!