You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Kamal Ezzaki <ka...@gmail.com> on 2019/03/29 09:49:39 UTC

Error Extension could not be loaded: Extension is missing guac-manifest.json

hello
i have this error
Extension "branding.jar" could not be loaded: Extension branding.jar is
missing guac-manifest.json

i m trying to add an extension for changinf logo and title
can someone help
this is my branding.jar structure


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Garanti
sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Re: Error Extension could not be loaded: Extension is missing guac-manifest.json

Posted by Kamal Ezzaki <ka...@gmail.com>.
it's okey now i find that the error is that jar created by the commande
"jar cf" is not known by zip .
so i found this commande and it's working now
cd guacamole-branding
jar cMf ../branding.jar *

Thank you

Re: Error Extension could not be loaded: Extension is missing guac-manifest.json

Posted by Kamal Ezzaki <ka...@gmail.com>.
Thank you very much Mike

Re: Error Extension could not be loaded: Extension is missing guac-manifest.json

Posted by Mike Jumper <mj...@apache.org>.
On Fri, Mar 29, 2019 at 3:45 AM Kamal Ezzaki <ka...@gmail.com> wrote:

> this is my jar structure
> .
> ├── guac-manifest.json
> ├── images
> │   └── logo-placeholder.png
> └── translations
>     └── en.json
>
>
Make sure this actually *is* your jar's structure, not the structure of a
subdirectory within the .jar. You can list the contents of the .jar with:

unzip -l branding.jar

jar cf branding.jar branding     #zip -r not working for me
>

Neither will this. You are creating a .jar containing a subdirectory called
"branding". The .jar should contain guac-manifest.json at the root, not
within a subdirectory, and all files referenced within guac-manifest.json
should be referenced relative to the root, not relative to a subdirectory.

If things aren't working, I recommend checking your results rather than
blindly making changes. Here is what "jar cf branding.jar branding" would
do:

[mjumper@dev-mjumper ~]$ mkdir branding
[mjumper@dev-mjumper ~]$ touch branding/foo
[mjumper@dev-mjumper ~]$ touch branding/bar
[mjumper@dev-mjumper ~]$ jar cf branding.jar branding
[mjumper@dev-mjumper ~]$ unzip -l branding.jar
Archive:  branding.jar
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  03-29-2019 07:04   META-INF/
       69  03-29-2019 07:04   META-INF/MANIFEST.MF
        0  03-29-2019 07:04   branding/
        0  03-29-2019 07:03   branding/foo
        0  03-29-2019 07:04   branding/bar
---------                     -------
       69                     5 files
[mjumper@dev-mjumper ~]$

Note how the files in question are still in a subdirectory, not the root.
You do not want this. The guac-manifest.json absolutely must be at the
root, and all paths within guac-manifest.json must be relative to the root.

mv branding.jar /usr/share/tomcat/.guacamole/extensions/
> mv css /share/tomcat/.guacamole/extensions/
>

Why are you putting the "css" directory in GUACAMOLE_HOME/extensions/? It
should be part of your extension, as declared in your guac-manifest.json.
Guacamole loads extensions from the extensions directory, not arbitrary
directories containing CSS.


> service guacd restart
>

You do not need to restart guacd. Only tomcat.

- Mike

Re: Error Extension could not be loaded: Extension is missing guac-manifest.json

Posted by Kamal Ezzaki <ka...@gmail.com>.
this is my jar structure
.
├── guac-manifest.json
├── images
│   └── logo-placeholder.png
└── translations
    └── en.json

jar cf branding.jar branding     #zip -r not working for me
mv branding.jar /usr/share/tomcat/.guacamole/extensions/
mv css /share/tomcat/.guacamole/extensions/

service guacd restart
service tomcat restart

tail -f /var/log/messages   # log file
 ERROR o.a.g.extension.ExtensionModule - Extension "branding.jar" could not
be loaded: Extension is not a valid zip file: branding.jar


#guac-manifest.json
{
        "guacamoleVersion" : "1.0.0",
        "name" : "Tempname",
        "namespace" : "tempnamespace",
        "translations" : [
"translations/en.json"
],

"css" : [
                "css/login-override.css"
         ],

"resources" : {
                "images/logo-placeholder.png" : "image/png"
         }
}


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Garanti
sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Re: Error Extension could not be loaded: Extension is missing guac-manifest.json

Posted by Will Payne <wi...@mugwump.net>.
On 2019-03-29 10:14, Kamal Ezzaki wrote:
> where i should put the other file is it in the guacamole folder or the
> extension forlder ?

Which "other file"?


Maybe have a re-read of the notes that Nick mentioned recently :


Le mar. 26 mars 2019 à 16:02, Nick Couchman <vn...@apache.org> a écrit
:

> On Tue, Mar 26, 2019 at 10:48 AM Kamal Ezzaki <ka...@gmail.com>
> wrote:
> 
>> Okey i get it now , so i need to regenerate the .war isn't ?
> 
> A JAR file, actually - since it's an extension, you generate an
> extension JAR, just like the other authentication extensions, and drop
> it into the GUACAMOLE_HOME/extensions directory.  Creating the JAR is
> pretty easy - create the directory structure, with the guac-manifest
> at the base, and the folders and files as specified in the manifest
> (e.g. resources/logo.png for the logo, if that's where the
> guac-manifest.json file specifies it).  Once you have everything as
> you want it, zip up the folder into a JAR file.  Do this inside the
> folder, so that guac-manifest.json is at the base of the zip.
> 
> So, you have a directory structure like this:
> 
> guacamole-branding
> ├── guacamole.manifest
> ├── resources
> │   └── logo.png
> └── translations
> └── en.json
> 
> You would then:
> $ cd guacamole-branding
> $ zip -r ../guacamole-branding.jar
> 
> Then drop "guacamole-branding.jar" into your GUACAMOLE_HOME/extensions
> folder and reload the application.  You might also have to clear
> browser cache to get things to display properly, especially if you
> rework the branding several times as you adjust things.
> 
> -Nick




W

Re: Error Extension could not be loaded: Extension is missing guac-manifest.json

Posted by Kamal Ezzaki <ka...@gmail.com>.
where i should put the other file is it in the guacamole folder or the
extension forlder ?

Le ven. 29 mars 2019 à 11:03, Will Payne <wi...@mugwump.net> a écrit :

> On 2019-03-29 09:49, Kamal Ezzaki wrote:
> > hello
> > i have this error
> >
> > Extension "branding.jar" could not be loaded: Extension branding.jar
> > is missing guac-manifest.json
>
> Your files are all in a directory 'branding' - they shouldn't be.
>
> When you create the .jar file, do it from inside the directory.
>
> W
>


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Garanti
sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Re: Error Extension could not be loaded: Extension is missing guac-manifest.json

Posted by Will Payne <wi...@mugwump.net>.
On 2019-03-29 09:49, Kamal Ezzaki wrote:
> hello
> i have this error
> 
> Extension "branding.jar" could not be loaded: Extension branding.jar
> is missing guac-manifest.json

Your files are all in a directory 'branding' - they shouldn't be.

When you create the .jar file, do it from inside the directory.

W