The Problem is with the uplines.push. I always get an empty uplines array so the last part of the code doesn\'t run. The promises resolve later and I get the correct data. M