Julian Alberto De La Rosa Suncar
Posts: 0
Joined: Mon Jan 27, 2014 4:08 pm

Error when loading data model since Sunday

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

Julian De La Rosa
Posts: 0
Joined: Sat Apr 19, 2014 12:28 am

Error when loading data model since Sunday

Nobody is going to help here?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Error when loading data model since Sunday

Hi Julian -

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

We also working on all your multiple requests.

Julian Alberto De La Rosa Suncar
Posts: 0
Joined: Mon Jan 27, 2014 4:08 pm

Error when loading data model since Sunday

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Error when loading data model since Sunday

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

Julian Alberto De La Rosa Suncar
Posts: 0
Joined: Mon Jan 27, 2014 4:08 pm

Error when loading data model since Sunday

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); 

}

pakbull6772540
Posts: 0
Joined: Sun Mar 30, 2014 4:08 pm

Error when loading data model since Sunday

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

pakbull6772540
Posts: 0
Joined: Sun Mar 30, 2014 4:08 pm

Error when loading data model since Sunday

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); 
     } 
 },
Julian De La Rosa
Posts: 0
Joined: Sat Apr 19, 2014 12:28 am

Error when loading data model since Sunday

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

Return to “Issues”