custom icon problem (paper_lantern)
Dear support,
I am getting the following error while trying to install a custom icon for the paper_lantern theme.
Please Help :)
Also please guide me on how to uninstall this custom icon later when I want to remove/disable it.
[root@app /]# /usr/local/cpanel/scripts/install_plugin dockericons.tar.gz --theme paper_lantern
info [install_plugin] Installing to paper_lantern
warn [install_plugin] Error in installing plugin: Cpanel::Exception::JSONParseError/(XID mvbhc3) The system failed to parse the JSON stream data " {
"icon" : "docker.svg",
"group_id" : "files",
"order" : 10000,
"name" : "Docker Manager",
"type" : "link",
"id" : "plugin_a",
"uri" : "http://xxx.xxx.xxx.xxx:9999/",
"target" : "_blank",
}" from the file "/var/tmp/34674._USR_LOCAL_CPANEL_SCRIPTS_INSTALL_PLUGIN__.1pL4x0Mi.tmp/dockericons/install.json" because of an error: '"' expected, at character offset 232 (before "}") at /usr/local/cpanel/Cpanel/JSON.pm line 121.
at /usr/local/cpanel/Cpanel/Exception/CORE.pm line 330.
Cpanel::Exception::create("JSONParseError", HASH(0x2a70c68)) called at /usr/local/cpanel/Cpanel/Exception.pm line 46
Cpanel::Exception::__ANON__(__CPANEL_HIDDEN__, HASH(0x2a70c68)) called at /usr/local/cpanel/Cpanel/JSON.pm line 144
Cpanel::JSON::_throw_json_error("'\"' expected, at character offset 232 (before \"}\") at /usr/lo"..., "/var/tmp/34674._USR_LOCAL_CPANEL_SCRIPTS_INSTALL_PLUGIN__.1pL"..., SCALAR(0x1f496a0)) called at /usr/local/cpanel/Cpanel/JSON.pm line 122
Cpanel::JSON::Load(" {\x{d}\x{a} \"icon\" : \"docker.svg\",\x{d}\x{a} \"group_id\" : \"fi"..., "/var/tmp/34674._USR_LOCAL_CPANEL_SCRIPTS_INSTALL_PLUGIN__.1pL"...) called at /usr/local/cpanel/Cpanel/JSON.pm line 279
Cpanel::JSON::_LoadFile("/var/tmp/34674._USR_LOCAL_CPANEL_SCRIPTS_INSTALL_PLUGIN__.1pL"..., 0, 0, undef, 0) called at /usr/local/cpanel/Cpanel/JSON.pm line 220
Cpanel::JSON::LoadFile("/var/tmp/34674._USR_LOCAL_CPANEL_SCRIPTS_INSTALL_PLUGIN__.1pL"...) called at /usr/local/cpanel/Cpanel/Themes/Serializer/JSON.pm line 22
Cpanel::Themes::Serializer::JSON::_read(Cpanel::Themes::Serializer::JSON=HASH(0x176d490), "/var/tmp/34674._USR_LOCAL_CPANEL_SCRIPTS_INSTALL_PLUGIN__.1pL"...) called at /usr/local/cpanel/Cpanel/Themes/Serializer/Base.pm line 128
Cpanel::Themes::Serializer::Base::load(Cpanel::Themes::Serializer::JSON=HASH(0x176d490)) called at /usr/local/cpanel/Cpanel/Themes/Serializer/JSON.pm line 30
Cpanel::Themes::Serializer::JSON::build_data_tables(Cpanel::Themes::Serializer::JSON=HASH(0x176d490)) called at /usr/local/cpanel/Cpanel/Themes/Serializer/Base.pm line 95
Cpanel::Themes::Serializer::Base::links(Cpanel::Themes::Serializer::JSON=HASH(0x176d490)) called at /usr/local/cpanel/Cpanel/Plugin/Install.pm line 83
eval {...} called at /usr/local/cpanel/Cpanel/Plugin/Install.pm line 78
Cpanel::Plugin::Install::install_plugin("/var/tmp/34674._USR_LOCAL_CPANEL_SCRIPTS_INSTALL_PLUGIN__.1pL"..., "paper_lantern") called at /usr/local/cpanel/scripts/install_plugin line 100
PluginInstaller::run("dockericons.tar.gz", "--theme", "paper_lantern") called at /usr/local/cpanel/scripts/install_plugin line 9
info [install_plugin] Running sprite_generator
info [install_plugin] Queueing task to update API spec files
[root@app /]#
Also please guide me on how to uninstall this custom icon later when I want to remove/disable it.
-
Have you had a look at the docs for adding a cPanel plugin? Guide to cPanel Plugins - Software Development Kit - cPanel Documentation 0 -
Zip file removed, no need for that here. You might want to re-check your code. The system failed to parse the JSON stream data
There are several other threads on the forum with this error easily found via google, here's one: The system failed to parse the JSON stream data You should have a peek at those for hints to the issue your having.0 -
I searched the web but all problems are related to JSON when creating email/sub-domain/webmail But I have no problems on all that. I think there is a problem only in the install_plugin script on my cPanel Instillation. 0 -
This was my orginal code because it gave error I decided to just try with one icon and that too failed. [ { "order" : 1, "name" : "Docker", "type" : "group", "id" : "my_docker" }, { "icon" : "container.svg", "group_id" : "my_docker", "order" : 1, "name" : "Docker Manager", "type" : "link", "id" : "plugin_a", "uri" : "http://xxx.xxx.xxx.xxx:9999/", "target" : "_blank", "featuremanager" : 1, "feature" : "plugin_a", "description" : "Manage Docker Containers" }, { "icon" : "mapp.svg", "group_id" : "my_docker", "order" : 2, "name" : "Domain Mapping", "type" : "link", "id" : "plugin_b", "uri" : "http://xxx.xxx.xxx.xxx:9999/mapp.html", "target" : "_blank", "featuremanager" : 1, "feature" : "plugin_b", "description" : "Connect Domain to a Container" }, { "icon" : "docker.svg", "group_id" : "my_docker", "order" : 3, "name" : "Docker Hub", "type" : "link", "id" : "plugin_c", "uri" : "https://hub.docker.com/", "target" : "_blank", "featuremanager" : 1, "feature" : "plugin_c", "description" : "Share Container Images" } ]0 -
Hello, Could you open a support ticket using the link in my signature so we can take a closer look at how you are adding this plugin? Thank you. 0
Please sign in to leave a comment.
Comments
6 comments