Renaming cordova_plugins.js caused a race condition. Fix it by editing cordova.js