ajax - Inconsistent data corruption in a store loaded through a proxy reader -


we're experiencing inconsistent data corruption in store loaded through proxy reader.

it's browser dependant.

works fine in chrome , safari on desktop time.

on our 2 testing iphones intermittently breaks depending on data store has loaded, larger data volume seems cause more breaks. can't see errors or patterns in json data breaks.

symptoms:

  • data loads, of data belonging last few items missing
  • a read listener attached store doesn't fire when data loss occurs, fire on desktop browser experience not data loss

the piece of data seems lost start_time.

we've been trying debug 1 while , stumped.

thank ideas might have why occurring.

our regmodel

 ext.regmodel('booking', {                fields: ['id', 'start', 'end', 'title', 'service', 'service_id', 'client_note', 'stylist_note', 'utc_start','day_date', 'start_time', 'end_time', "home_ph", "mobile_ph", 'work_ph', 'work_ext', 'email', 'utc_end']                }); 

our store

   var store = new ext.data.jsonstore({          model : 'booking',          sorters: 'utc_start',          autoload: false,          proxy: {             type: 'ajax',             url: '../includes/get_appointments.php',             extraparams: {                 req_start: '1295251200',                 req_end: '1295856000'                 },             reader: {                 type: 'json',                 root: 'events'             }          },          listeners: {                 load:function(store, records, success) {                              bookings.setloading(false);                            // check see length of records, start there                     (var = 0; < records.length; i++){                         utc_start = records[i].get('utc_start');                         utc_end = records[i].get('utc_end');                          // create day of week                         // y,m,d                         // time                           var this_start_date = new date((utc_start * 1000));                         var this_end_date = new date((utc_end * 1000));                                                 var day_of_week = days_of_week[this_start_date.getday()];                         var date_of_month = this_start_date.getdate();                         var month_of_year = month_names[this_start_date.getmonth()];                         var full_year = this_start_date.getfullyear();                                                     var start_military_hours = this_start_date.gethours();                         var this_start_minutes = this_start_date.getminutes();                          var end_military_hours = this_end_date.gethours();                         var this_end_minutes = this_end_date.getminutes();                          if(this_start_minutes == "0")                         {                             this_start_minutes = "00";                         }                         if(parseint(start_military_hours) < 12)                         {                             var start_time = start_military_hours + ":" + this_start_minutes + " am";                         }                         else if(parseint(start_military_hours) == 12)                         {                             var start_time = start_military_hours + ":" + this_start_minutes + " pm";                         }                         else                         {                             var start_time = (parseint(start_military_hours) - 12) + ":" + this_start_minutes + " pm";                         }                          if(this_end_minutes == "0")                         {                             this_end_minutes = "00";                         }                         if(parseint(end_military_hours) < 12)                         {                             var end_time = end_military_hours + ":" + this_end_minutes + " am";                         }                         else if(parseint(end_military_hours) == 12)                         {                             var end_time = end_military_hours + ":" + this_end_minutes + " pm";                         }                         else                         {                             var end_time = (parseint(end_military_hours) - 12) + ":" + this_end_minutes + " pm";                         }                          var day_date = day_of_week + ", " + full_year + " " + month_of_year + " " + date_of_month;                          if(records[i].get('service_id') == 0)                         {                             records[i].set('title', 'booked off');                             records[i].set('service', '');                         }                           records[i].set('day_date', day_date);                         records[i].set('start_time', start_time);                         records[i].set('end_time', end_time);                                                      }                          if(store.proxy.reader.rawdata.next_page_num == undefined)                         {                             store.start = store.proxy.reader.rawdata.prev_page_num;                         }                         else                         {                             store.currentpage = store.proxy.reader.rawdata.next_page_num;                         }                     }, read:function(store,records,success){                     ext.msg.alert('data read');                 }           },                 getgroupstring : function(record) {             return record.get('day_date'); // optional char array removed          }       }); 

our json

{"events":[{"id":"3739","start":"2011-01-18t10:00:00-08:00","end":"2011-01-18t11:45:00-08:00","title":"jen cannor","service":"haircut & highlights","service_id":"67","client_note":"","stylist_note":"looking forward seeing jen when comes in next.","utc_start":"1295373600","email":"jen.c@cannorfarms.net","home_ph":"232-433-2222","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1295379900"},{"id":"3740","start":"2011-01-18t12:00:00-08:00","end":"2011-01-18t13:30:00-08:00","title":"michelle steves","service":"root colour","service_id":"69","client_note":"","stylist_note":"","utc_start":"1295380800","email":"michelle5b64@telus.net","home_ph":"604-555-5555","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1295386200"},{"id":"3741","start":"2011-01-18t13:30:00-08:00","end":"2011-01-18t14:00:00-08:00","title":"amanda brenner","service":"wash & blow dry","service_id":"70","client_note":"","stylist_note":"","utc_start":"1295386200","email":"amandab@coastfitness.com","home_ph":"555-235-2366","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1295388000"},{"id":"3742","start":"2011-01-18t14:00:00-08:00","end":"2011-01-18t15:45:00-08:00","title":"janice potters","service":"haircut & colour","service_id":"66","client_note":"","stylist_note":"","utc_start":"1295388000","email":"","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1295394300"},{"id":"3743","start":"2011-01-18t15:45:00-08:00","end":"2011-01-18t16:45:00-08:00","title":"angus middleton","service":"men's haircut","service_id":"61","client_note":"","stylist_note":"","utc_start":"1295394300","email":"angusman@hotmaile.com","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1295397900"},{"id":"3025","start":"2011-01-19t08:00:00-08:00","end":"2011-01-19t09:45:00-08:00","title":"jen cannor","service":"haircut & highlights","service_id":"67","client_note":"","stylist_note":"","utc_start":"1295452800","email":"jen.c@cannorfarms.net","home_ph":"232-433-2222","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1295459100"},{"id":"3026","start":"2011-01-19t10:00:00-08:00","end":"2011-01-19t11:45:00-08:00","title":"karen walker","service":"haircut & colour","service_id":"66","client_note":"","stylist_note":"","utc_start":"1295460000","email":"karenwalker@officesurplusdirect.net","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1295466300"},{"id":"3027","start":"2011-01-19t11:45:00-08:00","end":"2011-01-19t12:45:00-08:00","title":"amanda brenner","service":"women's haircut","service_id":"65","client_note":"","stylist_note":"","utc_start":"1295466300","email":"amandab@coastfitness.com","home_ph":"555-235-2366","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1295469900"},{"id":"3028","start":"2011-01-19t13:00:00-08:00","end":"2011-01-19t14:30:00-08:00","title":"mary thacker","service":"root colour","service_id":"69","client_note":"","stylist_note":"","utc_start":"1295470800","email":"","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1295476200"},{"id":"3029","start":"2011-01-19t14:30:00-08:00","end":"2011-01-19t15:00:00-08:00","title":"malcolm anderson","service":"men's haircut","service_id":"61","client_note":"","stylist_note":"","utc_start":"1295476200","email":"malcolm@testserveraddy.com","home_ph":"240-444-4444","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1295478000"},{"id":"4856","start":"2011-03-09t09:00:00-08:00","end":"2011-03-09t10:00:00-08:00","title":"simon chalk","service":"men's haircut","service_id":"61","client_note":"","stylist_note":"","utc_start":"1299690000","email":"","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299693600"},{"id":"4858","start":"2011-03-09t10:00:00-08:00","end":"2011-03-09t10:15:00-08:00","title":"brian lytton","service":"men's haircut","service_id":"61","client_note":"","stylist_note":"","utc_start":"1299693600","email":"","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299694500"},{"id":"4859","start":"2011-03-09t10:15:00-08:00","end":"2011-03-09t10:30:00-08:00","title":"brad wicker","service":"men's haircut","service_id":"61","client_note":"","stylist_note":"","utc_start":"1299694500","email":"","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299695400"},{"id":"4860","start":"2011-03-09t10:30:00-08:00","end":"2011-03-09t10:45:00-08:00","title":"brad wicker","service":"men's haircut","service_id":"61","client_note":"","stylist_note":"","utc_start":"1299695400","email":"","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299696300"},{"id":"4861","start":"2011-03-09t10:45:00-08:00","end":"2011-03-09t11:00:00-08:00","title":"brian lytton","service":"men's haircut","service_id":"61","client_note":"","stylist_note":"","utc_start":"1299696300","email":"","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299697200"},{"id":"4862","start":"2011-03-09t11:00:00-08:00","end":"2011-03-09t11:15:00-08:00","title":"brian lytton","service":"men's haircut","service_id":"61","client_note":"","stylist_note":"","utc_start":"1299697200","email":"","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299698100"},{"id":"4863","start":"2011-03-09t11:15:00-08:00","end":"2011-03-09t11:30:00-08:00","title":"simon chalk","service":"men's haircut","service_id":"61","client_note":"","stylist_note":"","utc_start":"1299698100","email":"","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299699000"},{"id":"4864","start":"2011-03-09t11:30:00-08:00","end":"2011-03-09t11:45:00-08:00","title":"chester welling","service":"men's haircut","service_id":"61","client_note":"","stylist_note":"","utc_start":"1299699000","email":"chester@eastern.pharma.net","home_ph":"604-555-5555","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299699900"},{"id":"4865","start":"2011-03-09t11:45:00-08:00","end":"2011-03-09t12:00:00-08:00","title":"brad wicker","service":"men's haircut","service_id":"61","client_note":"","stylist_note":"","utc_start":"1299699900","email":"","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299700800"},{"id":"4866","start":"2011-03-09t12:00:00-08:00","end":"2011-03-09t13:00:00-08:00","title":"janice potters","service":"women's haircut","service_id":"65","client_note":"","stylist_note":"","utc_start":"1299700800","email":"","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299704400"},{"id":"4867","start":"2011-03-09t13:00:00-08:00","end":"2011-03-09t13:15:00-08:00","title":"jacqui chan","service":"women's haircut","service_id":"65","client_note":"","stylist_note":"","utc_start":"1299704400","email":"jc@rebelfrontier.net","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299705300"},{"id":"4876","start":"2011-03-09t13:15:00-08:00","end":"2011-03-09t13:30:00-08:00","title":"mary thacker","service":"women's haircut","service_id":"65","client_note":"","stylist_note":"","utc_start":"1299705300","email":"","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299706200"},{"id":"4868","start":"2011-03-10t10:15:00-08:00","end":"2011-03-10t11:15:00-08:00","title":"trisha roberts","service":"women's haircut","service_id":"65","client_note":"","stylist_note":"","utc_start":"1299780900","email":"trb483408@gmail.com","home_ph":"604-555-5555","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299784500"},{"id":"4870","start":"2011-03-10t11:30:00-08:00","end":"2011-03-10t12:30:00-08:00","title":"jenson bryant","service":"women's haircut","service_id":"65","client_note":"","stylist_note":"","utc_start":"1299785400","email":"","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299789000"},{"id":"4872","start":"2011-03-10t12:45:00-08:00","end":"2011-03-10t13:00:00-08:00","title":"jenson bryant","service":"women's haircut","service_id":"65","client_note":"","stylist_note":"","utc_start":"1299789900","email":"","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299790800"},{"id":"4873","start":"2011-03-10t13:00:00-08:00","end":"2011-03-10t13:15:00-08:00","title":"jenson bryant","service":"women's haircut","service_id":"65","client_note":"","stylist_note":"","utc_start":"1299790800","email":"","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299791700"},{"id":"4874","start":"2011-03-10t13:15:00-08:00","end":"2011-03-10t14:15:00-08:00","title":"simon chalk","service":"men's haircut","service_id":"61","client_note":"","stylist_note":"","utc_start":"1299791700","email":"","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299795300"},{"id":"4875","start":"2011-03-11t10:15:00-08:00","end":"2011-03-11t11:15:00-08:00","title":"karen walker","service":"women's haircut","service_id":"65","client_note":"","stylist_note":"","utc_start":"1299867300","email":"karenwalker@officesurplusdirect.net","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299870900"},{"id":"4877","start":"2011-03-11t12:00:00-08:00","end":"2011-03-11t12:15:00-08:00","title":"amanda brenner","service":"women's haircut","service_id":"65","client_note":"","stylist_note":"","utc_start":"1299873600","email":"amandab@coastfitness.com","home_ph":"555-235-2366","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299874500"},{"id":"4878","start":"2011-03-11t12:30:00-08:00","end":"2011-03-11t13:30:00-08:00","title":"arnold fieldman","service":"men's haircut","service_id":"61","client_note":"","stylist_note":"","utc_start":"1299875400","email":"","home_ph":"","mobile_ph":"","work_ph":"","work_ext":"","utc_end":"1299879000"}], "next_page_num":"7"} 

this not sencha touch specific issue: there limits on size of ajax response mobile safari can handle: see too large ajax response mobile safari?

update: apparently not mobile safari problem, cellular network problem. networks helpfully "paginate" ajax call -- thinking it's regular web page download. can check see if still case on wifi network?


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -