Invalid argument: permission.value
<p>Script keeps giving me this error message. "Invalid argument: permission.value"
This is the part of the code the error points out to:</p>

<pre><code>var buyer   = threads[i].getMessages()[0].getReplyTo();
var subject = "Thank you for your purchase";
var body    = "Please download the file using the link below.\n\n";

if (size &gt; 20) {
    file.addViewer(buyer); &lt;---- It specifically points to this line
</code></pre>

<p>Any idea of what might be wrong?</p>