[Cocos2dx-js v3.7.1] Shape with static body not added to the space

Hi guys! hope youll answer me… :smile:
I am making a game like flappy bird…
my obstacles are static body and every interval i am making a pair of obstacle.
and my player is a normal physics sprite with mass

My problem is that when i tried to add an obstacle into the space, some how the shape is not added to it. I know have set it right… In fact In web browser it is working fine here is the screen shot of my finished game, but it is only working on browsers, when i try to build it in native platform the problem occurs…

Why is it that it is working properly on the web platform but having problems in a native platform? :frowning:
I thought you guys said that we should use javascript as our programming language… but how come there is low support on javascript :frowning:

And there is also another issue, I am spawning each pair of obstacle at the right side of the screen where the user cant see it, but some how it its spawning at the center of the screen when i build it to an native platform like android and win32.