local server ManagedStore failing to download all items in manifest

2 views
Skip to first unread message

webvida

unread,
Jul 1, 2008, 2:38:06 AM7/1/08
to Gears Users
hi there,

i am using a managed store for a web app i have made. it works
perfectly on my localhost server on my pc, but when i put it online it
failed to download all files in the manifest, everything seems to be
working ok, butit just stalls after downloading a random amount of
files.

Anyone know what can cause this? is there like a timeout or something
when it stalls after downloading for x amount of time?

Thanks for any help you can give me.

Ben Lisbakken

unread,
Jul 1, 2008, 11:12:27 AM7/1/08
to gears...@googlegroups.com
Webvida --

Are any of the files downloading as 0 byte files?  You can check in your Gears cache directory (http://code.google.com/apis/gears/gears_faq.html#whereAreFiles).  I haven't experienced this problem myself, but another user has reported that sometimes the files download as 0 byte files and I'm wondering if you're having the same problem -- though it kind of sounds like you have a different problem.

Is there any reason why you would be timing out on files?  Aka any server or connectivity issues?

-Ben

Adam Docherty

unread,
Jul 2, 2008, 11:54:00 AM7/2/08
to gears...@googlegroups.com
Ben,

Thank you very much for your response.

I have since resolved the issue and unfortunately i didn't catch what
the problem was, it was not the 0 byte problem - ie it was only
downloading like x amount of file and then stopping, only ever a small
amount like 0 - 4 or 5 at most out of like 20 or so.

below is as best that i can describe what fixed the issue for me.

the actual "page" i am capturing is output from a web application i am
developing, one that needs to work offline if the connection fails. It
uses Extjs to control the view and periodically update a flex swf with
images / data. This update is done with teh extjs taskmanger which is
bascially hits a function every x amount of time that polls the server
to check if there is an update - if there is it triggers the gears local
server to update from a dynamically generated manifest. This is the
update function that i am using - it works now by the way:

var updateClentSide = function(refURL, tplId, panelId){



var date = new Date();
var timeStamp = date.dateFormat('U');

var STORE_NAME="scrviewTest"
var
MANIFEST_FILENAME='svn_corePHP/KFC/www/index.php?lander=digitalMenus.googleGears.getManifest&storeId='+Ext.Request.storeId+'&screenId='+Ext.Request.screenId+'&tplId='+tplId+'&vId='+timeStamp+'&panelId='+panelId;


// instantiate google gears

if (typeof(GEARS_localServer) == "object") {

var store =
GEARS_localServer.createManagedStore(STORE_NAME);
store.manifestUrl =
'index.php?lander=digitalMenus.googleGears.getManifest&storeId='+Ext.Request.storeId+'&screenId='+Ext.Request.screenId+'&tplId='+tplId+'&vId='+timeStamp+'&panelId='+panelId;

store.onerror = function(e){
alert(e);
}
// check for changes and capture files
store.checkForUpdate();

var refStore = GEARS_localServer.createStore('urlTest');
refStore.capture(refURL, null);
}
}
}

i can remember that i moved the main instanitaion of the gears local
server, ie:

try {
GEARS_localServer =
google.gears.factory.create("beta.localserver","1.0");
} catch(e) {
// user denied access to google gears
}

outside of this function and to load when the actual page loads and not
when the update occurs, ie it was in that function above (this may have
been the issue), although i messed around with some other things as
well, oh and the mainfest url was getting appneded with a postfix of "/"
as well for a time, which i also removed - i am not sure if this was
causing the problem, cause the mainfest was still loading and some other
things were still loading even when it was like this. I have heard that
asset location is defined relative to this manifest url.

Anyway it works, although i would have liked to have pinpointed the
problem..

Thanks again,

Adam

tao zhang

unread,
Jul 1, 2008, 8:52:25 PM7/1/08
to gears...@googlegroups.com
use this function ' lastErrorMessage'  to check  it out , 

2008/7/1 webvida <web...@gmail.com>:

webvida

unread,
Jul 1, 2008, 9:04:07 PM7/1/08
to Gears Users
Tao,

I was checking this - I use the sqlite manager for ff3 and it lets me
see all this type of stuff, I htink i just had things in the wrong
place.

Thanks

On Jul 1, 9:52 pm, "tao zhang" <dlh.zhang...@gmail.com> wrote:
> use this function ' *lastErrorMessage*'  to check  it out ,
>
> 2008/7/1 webvida <webv...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages