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
I've had that error before. =)
- Check the XML. Is it named gadget.xml?
- 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.
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!
::((
Hmmm, that is weird.
Could you send the code from your XML and HTML?
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
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.
nope, tried that and still get the same error!! :o
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.
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!
You'll see this if there's a blank directory in the Gadget package.
There ISNT though!! Every *file in every* directory is atleast 1kb or more!! :S
What ZIP method are you using? Try making the ZIP without compression.
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
winrar lets you make zips (and without compression), but thats what im using, and its not working ;)