If i comment the below mentioned statement in the snippet, I don't face this issue.
This is Sean with Urban Airship Technical Support.
Can you include the error you are receiving?
You could also try using the snippet code from the snippet.html file included in the SDK bundle found on the Settings > Platform page in your app's Urban Airship Dashboard. The code here differs slightly in that it comes with the correct configuration values for your app.
Urban Airship Technical Support