The successCallback is called in the engine thread. You have to switch to the main thread for any UI specific operations like removing the scanner from the view hierarchy etc. The easiest way of doing this is by using setTimeout:
picker.setSuccessCallback(function(e) {
picker.stopScanning();
setTimeout(function() {
// Code that manipulates the UI.
}, 1);
});