This is not a valid gadget package!! grr!

hey,

So i finished creating my gadget, i use winzip to zip it up to mygadget.gadget and then double click to install... However it just says:

This is not a valid gadget package

The gadget works if i move the folder to the windows gadget directory!

Does anyone know how to fix this problem

Regards




Answer this question

This is not a valid gadget package!! grr!

  • Jaime Stuardo

    winrar lets you make zips (and without compression), but thats what im using, and its not working ;)
  • Andrew Todd

    Hi nickwilliams,

    This could be the same problem i'm having

    I made a gadget -- submited it to gallery, and they accepted it, it worked fine, 100 people downloaded it.


    I then decided to update it a little, all i added was the following line in the code.js file:

    System.Gadget.background = "url(bgB.png)";


    I pack it back up, no changes to the gadget.xml or page.html (which basicly means its the same as the gadget that was accepted), and now there is a problem when it comes to using the .gadget file, it just gives the "This is not a valid gadget package" error.

    If you find out what the problem is -- please let me know!

    I think mine has somthing to do with the location of the "bgB.png"

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

    I have:

    en-US:
    *** gadget.xml
    *** stopwatch.html
    *** bgB.png
    ***

    JS:
    *** code.js

    The trouble is, testing for me is very hard, as it works fine on my machine, it must be in cache or somthing. Same problem you must be having when you unpack it in your gadget folder.


  • tiomeg

    What ZIP method are you using Try making the ZIP without compression.

  • tacpower

    i am using winZIP at the moment, any other ideas on other programs to use to make it

    I tried with 'store' as the compression level in winzip and it still didn't work! I dont think you can turn compression off in winzip!

    Regards



  • marric

    Is indeed interesting...

    I have;

    /images/

    ** Docked.PNG

    *** play.PNG

    *** stop.PNG

    /en-US/

    * /css/

    ** Radio.css

    * /js/

    ** Radio.js

    * gadget.xml

    * Radio.html

    * Settings.html

    and then in the root directory i have three things,

    drag.PNG, icon.PNG and logo.PNG

    now, i have tried making it so EVERYTHING is in the root directory, this does not work however! If anyone could shed any light on this weird occurance then it would be great! If i find out (in responce to the previous post) i will let you know!



  • Sweeps78

    I use 7-Zip, but I don't think that's the problem. Head over to AeroXP and post your Gadget up on the Development and Programming forum, I'll take a look for you both.

  • Mark 2334

    gadget.xml

    < xml version="1.0" encoding="utf-8" >

    <gadget>

    <name>The Bay Radio Player</name>

    <namespace>The Bay Radio</namespace>

    <version>1.0</version>

    <author name="Nicholas Williams">

    <info url="www.thebuild.org" text="Build.org" />

    <logo src="logo.png" />

    </author>

    <copyright>2006</copyright>

    <description>Bay Radio Player</description>

    <icons>

    <icon height="48" width="48" src="icon.png" />

    </icons>

    <hosts>

    <host name="sidebar">

    <base type="HTML" apiVersion="1.0.0" src="Radio.html" />

    <permissions>full</permissions>

    <platform minPlatformVersion="1.0"/>

    <defaultImage src="drag.png" />

    </host>

    </hosts>

    </gadget>

    Radio.html

    <html>

    <head>

    <title>The Bay Radio: Radio Player</title>

    <link href="css/Radio.css" rel="stylesheet" type="text/css" />

    <script language="javascript" src="js/Radio.js" type="text/javascript"></script>

    <script for="mediaPlayer" event="playstatechange(newstate)">playStateChange(newstate);</script>

    </head>

    <body>

    <div>

    <g:background id="background" src="images/Docked.png" style="position:absolute; z-index:-999" /> <div id="gadgetText">

    <div id="playbackStatus">

    Bay Radio

    </div>

    <div id="playbackControls">

    <g:image id="controlImage" style="position:absolute; " onclick="controlImageClick();" />

    </div>

    </div>

    </div>

    <OBJECT id="mediaPlayer" width="0" height="0"

    style="position:absolute; left:0;top:0;"

    CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"

    type="application/x-oleobject">

    <PARAM NAME="SendPlayStateChangeEvents" VALUE="True">

    <PARAM NAME="AutoStart" VALUE="False">

    <PARAM name="uiMode" value="invisible">

    </OBJECT>

    </body>

    </html>

    Thanks in advance



  • &amp;#246;znur

    nope, tried that and still get the same error!! :o

  • Jocker23

    There ISNT though!! Every *file in every* directory is atleast 1kb or more!! :S

  • elvis8900

    I've had that error before. =)

    1. Check the XML. Is it named gadget.xml
    2. Check the code inside the XML. There should be a line that says <base type="HTML" apiVersion="1.0.0" src="(your HTML file).html" /> Is the (your HTML file) part the actual name of your HTML file

    After doing that, I discovered mine was #2. Try this and tell me the results.


  • PSDCHD

    Check your ZIP file and make sure the files (like gadget.xml) are in the top level of the ZIP. If you drag the .gadget folder into the ZIP, you end up with nested folders - a ZIP, holding a folder, holding the files. The sidebar won't recognize this.
  • jvasher

    You'll see this if there's a blank directory in the Gadget package.

  • drew_p

    Hi there,

    thanks for the responce. I have however made sure both were correct (as stated) and this is true. I have a gadget.xml and the line linking to the .html file!

    It is weird how it WORKS but does not work with the installer!

    ::((



  • TG_KG

    Hmmm, that is weird.

    Could you send the code from your XML and HTML


  • This is not a valid gadget package!! grr!