Question: I was trying to use mongoose getter to cast all user password before send out. It works perfectly.
However, on method "comparePassword", I need the passwordstring to compare sothen I can authenticate.

Is there a way to bypass the getter under certain conditions in mongoose? Thanks in advance! 

Code Example:

```
function castpassword (pw) {
  return 'keyboard cat';
}

var AccountSchema = new Schema({
  password: { type: String, get: castpassword }
});

AccountSchema.methods.comparePassword = function (candidatePassword, cb) {
    // random hash vs keyborad cat === not authenticated
    crypt.compare(candidatePassword, this.password, function (err, isMatch) {
        if (err) return cb(err);
        cb(null, isMatch);
    });
};
....

Account.findById( someId, function (err, found) {
  console.log(found.password); // 'keyboard cat'
});

```

Answer: 
I experienced the same "Symbols Tool Failed" issue yesterday. With the following more detailed error:

```
Archive upload failed due to the issues listed below.

Unable to validate your application.
The path '/var/folders/c6/wfv094t921j7q1bzhht5wtdnhvjv1/T/XcodeDistPipeline.blK/Packages/XXXXXX.ipa' does not contain a file.

```

[![Symbols Tool Failed](https://i.stack.imgur.com/VRiRC.png)](https://i.stack.imgur.com/VRiRC.png)

[![enter image description here](https://i.stack.imgur.com/9rsFf.png)](https://i.stack.imgur.com/9rsFf.png)

The cause of the problem was that a third party library (\*.a file) had accidentally been included in the "Copy Bundle Resources" "Build Phase". The give-away that this was the problem was that this \*.a library appeared in the list of "Binary and Entitlements" screen when submitting the upload:

[![Extra library in binary and entitlements](https://i.stack.imgur.com/s8Vrh.png)](https://i.stack.imgur.com/s8Vrh.png)

Ultimately the third party source code had been added to our workspace as a "Folder Reference" and someone had checked the 'target membership' for that folder. This resulted in the the third parties libary folder (which contained the \*.a) being included in the "Copy Bundle Resources". Simply unchecking the 'target membership' box for the folder fixed the issue.
Unchecking "Upload your app's symbols to receive symbolicated reports from Apple" option fixes the "Symbol tools failed" error when you Archive the app in Organiser window of Xcode.[![enter image description here](https://i.stack.imgur.com/S1I6j.png)](https://i.stack.imgur.com/S1I6j.png)