Simon Bauman
Posts: 0
Joined: Wed Oct 16, 2013 9:50 pm

Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];

Hi, I'm getting these strange error in the console and can't figure out what it is. Please help. (I have shared my project with support@appery.

Error:
var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];

Project:
http://appery.io/app/view/74c00321-68...

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];

Hi Simon,

In function 'pageStart' you read a variable 'event_details_array' from localStorage, and it's not initialized at the moment. Please rethink the app logic, where the variable should be initialized beforehand.

Simon Bauman
Posts: 0
Joined: Wed Oct 16, 2013 9:50 pm

Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];

I've stripped the project down to two actions

1) onload invoke get_events service
2) on success alert ('get_events service fired');

It's not alerting and I'm getting the same error.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];

Simon,

Where will you initialize 'event_details_array' variable?

Simon Bauman
Posts: 0
Joined: Wed Oct 16, 2013 9:50 pm

Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];

it's initialized in the on_success ...just below the alert that isn't firing. (note, it has been commented out along with the pageStart call.)

The only thing that should be happening is onload:get_events and on_success:alert. Can you see what would be causing this error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];

Simon Bauman
Posts: 0
Joined: Wed Oct 16, 2013 9:50 pm

Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];

Ok. Dead in the water until this is addressed though.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];

Looks like there is some problem with get_events on event_page. Please delete this service from Data tab and add it again. Don't forget to add events in mapping.

Simon Bauman
Posts: 0
Joined: Wed Oct 16, 2013 9:50 pm

Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];

Yeah, looks like a bug on the appery side. I can tell you that what I did just before it stopped working was I added a collapsible set, mapped it with the get_events service, then deleted the collapsible set on the design page.

My theory is that removing the collapsible set did not do the necessary 'clean up' in the back end (appery). I say this because I think that I've had this issue before and had to do what you're suggesting which is to remove the service completely and add it back. ...just something you may want to pass on to your dev team.

Thanks

Return to “Issues”