Code is running with USB ( in IDE) but not running with battery power.

Hi,

I am using Arduino uno with gsm shield.

my sketch code is running fine with USB (in IDE serial monitor ) but NOT running in standalone , when powered by battery. Please help.

What type of battery? How is it wired? To 5V or to Vin or to the barrel jack or ...