Page 1 of 2

Error when loading data model since Sunday

Posted: Mon Jan 18, 2016 4:37 pm
by Julian Alberto De La Rosa Suncar

Since last sunday in my project, when i'm testing it in Chrome or Safari, i get this error when trying to fill some localStorage variables with a StorageModel instance. I get this

NoModelError: Can't found 'undefined' model

When digging down in the error it happens with 3 functions i've created to initialize localStorage. The functions are calling the models as Appery.io standard;



But the model exists (See attached images)


Code: Select all

        pfunction initPreliquidacionLocalHistoricoDB(){/p  p    /p  p    if((localStorage.preliquidacionesHistoricoLocalDB===null)||typeof localStorage.preliquidacionesHistoricoLocalDB==="undefined" ){/p  p        var histDB=Apperyio.getModel("PreliquidacionesStore");/p  p        localStorage.preliquidacionesHistoricoLocalDB=JSON.stringify(histDB);/p  p

/p p}/p p
/p p /p p}/p pfunction initPreliquidacionStorage(){/p p /p p var preliquidacionRecord = Apperyio.getModel("Preliquidacion_Model",{});/p p localStorage.preliquidacionRecord = JSON.stringify(preliquidacionRecord);/p p /p p}/p p
/p pfunction initPreliquidacionStorageDB(){/p p /p p var preliquidacionDB= Apperyio.getModel("PreliquidacionesStore");/p p localStorage.preliquidacionesStorageDB = JSON.stringify(preliquidacionDB);/p p /p p}/pImage

Image

Image

Image

Image


Error when loading data model since Sunday

Posted: Tue Jan 19, 2016 12:40 pm
by Julian De La Rosa

Nobody is going to help here?


Error when loading data model since Sunday

Posted: Tue Jan 19, 2016 1:06 pm
by Julian Alberto De La Rosa Suncar

Error when loading data model since Sunday

Posted: Tue Jan 19, 2016 3:32 pm
by Illya Stepanov

Hi Julian -

We are working on this, thank you for your detailed issue description.

We also working on all your multiple requests.


Error when loading data model since Sunday

Posted: Tue Jan 19, 2016 3:36 pm
by Julian Alberto De La Rosa Suncar

Chek Entity.js it seems the problem is with this since i can't neither create a new project that uses the Apperyio.getModel('modelName',{}) ; And breaks in line 104 of Entity Api

entity-api.js:104 Uncaught TypeNotFoundError: Can't found 'undefined' model

I've shared my app already. Need to give an answer to customer.

Thanks


Error when loading data model since Sunday

Posted: Tue Jan 19, 2016 3:40 pm
by Illya Stepanov

We have reported this and our development team is investigating this.


Error when loading data model since Sunday

Posted: Tue Jan 19, 2016 8:15 pm
by Julian Alberto De La Rosa Suncar

emThis reply was created from a merged topic originally titled Error when loading data model since Last Update./em

NoModelError: Can't found 'undefined' model

When digging down in the error it happens with 3 functions i've created to initialize localStorage. The functions are calling the models as Appery.io standard;

But the model exists (See attached images)

function initPreliquidacionLocalHistoricoDB(){

Code: Select all

if((localStorage.preliquidacionesHistoricoLocalDB===null)||typeof localStorage.preliquidacionesHistoricoLocalDB==="undefined" ){ 

    var histDB=Apperyio.getModel("PreliquidacionesStore"); 

    localStorage.preliquidacionesHistoricoLocalDB=JSON.stringify(histDB); 

}

}

function initPreliquidacionStorage(){

Code: Select all

var preliquidacionRecord = Apperyio.getModel("Preliquidacion_Model",{}); 

localStorage.preliquidacionRecord = JSON.stringify(preliquidacionRecord); 

}

function initPreliquidacionStorageDB(){

Code: Select all

var preliquidacionDB= Apperyio.getModel("PreliquidacionesStore"); 

localStorage.preliquidacionesStorageDB = JSON.stringify(preliquidacionDB); 

}


Error when loading data model since Sunday

Posted: Tue Jan 19, 2016 9:18 pm
by pakbull6772540

I am having the exact same problem in the exact same area. I think it has started this week, probably after the Sunday update.


Error when loading data model since Sunday

Posted: Tue Jan 19, 2016 9:40 pm
by pakbull6772540

In the entity-api.js, EntityFactory.prototype
function:

it seems to break when there is an array object property inside the Model. I can see it works fine for the string properties of my Model object, but then it tries to work thru the property that is an array of string, is where the "name" becomes "undefined" and throws the NoModelFound error.

Code: Select all

 __get_type: function( name ){ 
     return this._types[name].apply( this, Array.prototype.slice.call(arguments, 1) ); 
 }, 

 _get: function( name ){ 
     if ( typeof this._types[name] == "function" ) { 
         return this.__get_type.apply(this, arguments); 
     } else { 
         try { 
             this._add( name ); 
         } catch (e) { 
             if ( e instanceof NoModelError) { 
                 throw new TypeNotFoundError( e.message ); 
             } 
             throw e; 
         } 
         return this.__get_type.apply(this, arguments); 
     } 
 },

Error when loading data model since Sunday

Posted: Tue Jan 19, 2016 9:58 pm
by Julian De La Rosa

I opened a case and apperyio is working on it . The same happen here with that file