title: Getting TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode
body: <p>I have such jQuery code:</p>
  
  <pre class="lang-js prettyprint-override"><code>$(document).ready(function() {
  
    $('.btn-create-post-card').on('click', function(event) {
      event.preventDefault();
      let form_data = new FormData(),
        file = $('.input_file_button');
      // if(!file.val()) {
      //     alert('Please select postcard you want to send')
      // }
      form_data.append("file", file.prop('files')[0]);
      $.ajax({
        url: "/sendEmail",
        dataType: 'multipart/form-data',
        cache: false,
        contentType: false,
        processData: false,
        data: form_data,
        type: 'post',
        success: function(data) {
          alert('OK');
        },
        error: function(error, status) {
          console.log('here');
          console.log(error);
          alert(error);
        }
      });
    });
  });
  </code></pre>
  
  
  
  <p>And I'm getting error:</p>
  
  <blockquote>
    <p>TypeError: 'caller', 'callee', and 'arguments' properties may not be
    accessed on strict mode functions or the arguments objects for calls
    to them <br>
    &nbsp;&nbsp;&nbsp;&nbsp;at Function.remoteFunction (:2:14)</p>
  </blockquote>
  
  <p>Console output is: <a href="https://i.stack.imgur.com/5muPP.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5muPP.png" alt="enter image description here"></a></p>
  
  <p>As you can see response is successful and I used jQuery AJAX calls a lot before and never had such issue.</p>
  
  <p><strong>Updated:</strong></p>
  
  <p>console output: </p>
  
  <pre><code>abort: ƒ (e)
      arguments: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      caller: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      length: 1
      name: "abort"
      prototype: {constructor: ƒ}
      __proto__: ƒ ()
      [[FunctionLocation]]: jquery.min.js:2
      [[Scopes]]: Scopes[3]
  always: ƒ ()
      arguments: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      caller: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      length: 0
      name: "always"
      prototype: {constructor: ƒ}
      __proto__: ƒ ()
      [[FunctionLocation]]: jquery.min.js:2
      [[Scopes]]: Scopes[3]
  catch: ƒ (e)
      arguments: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      caller: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      length: 1
      name: "catch"
      prototype: {constructor: ƒ}
      __proto__: ƒ ()
      [[FunctionLocation]]: jquery.min.js:2
      [[Scopes]]: Scopes[3]
  done: ƒ ()
      arguments: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      caller: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      length: 0
      name: "add"
      prototype: {constructor: ƒ}
      __proto__: ƒ ()
      [[FunctionLocation]]: jquery.min.js:2
      [[Scopes]]: Scopes[3]
  fail: ƒ ()
      arguments: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      caller: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      length: 0
      name: "add"
      prototype: {constructor: ƒ}
      __proto__: ƒ ()
      [[FunctionLocation]]: jquery.min.js:2
      [[Scopes]]: Scopes[3]
  getAllResponseHeaders: ƒ ()
      arguments: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      caller: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      length: 0
      name: "getAllResponseHeaders"
      prototype: {constructor: ƒ}
      __proto__: ƒ ()
      [[FunctionLocation]]: jquery.min.js:2
      [[Scopes]]: Scopes[3]
  getResponseHeader: ƒ (e)
      arguments: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      caller: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      length: 1
      name: "getResponseHeader"
      prototype: {constructor: ƒ}
      __proto__: ƒ ()
      [[FunctionLocation]]: jquery.min.js:2
      [[Scopes]]: Scopes[3]
  overrideMimeType: ƒ (e)
      arguments: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      caller: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      length: 1
      name: "overrideMimeType"
      prototype: {constructor: ƒ}
      __proto__: ƒ ()
      [[FunctionLocation]]: jquery.min.js:2
      [[Scopes]]: Scopes[3]
  pipe: ƒ ()
      arguments: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      caller: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      length: 0
      name: "pipe"
      prototype: {constructor: ƒ}
      __proto__: ƒ ()
      [[FunctionLocation]]: jquery.min.js:2
      [[Scopes]]: Scopes[3]
  progress: ƒ ()
      arguments: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      caller: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      length: 0
      name: "add"
      prototype: {constructor: ƒ}
      __proto__: ƒ ()
      [[FunctionLocation]]: jquery.min.js:2
      [[Scopes]]: Scopes[3]
  promise: ƒ (e)
      arguments: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      caller: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      length: 1
      name: "promise"
      prototype: {constructor: ƒ}
      __proto__: ƒ ()
      [[FunctionLocation]]: jquery.min.js:2
      [[Scopes]]: Scopes[3]
  readyState: 4
  responseText: ""can't upload file""
  setRequestHeader: ƒ (e,t)
      arguments: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      caller: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      length: 2
      name: "setRequestHeader"
      prototype: {constructor: ƒ}
      __proto__: ƒ ()
      [[FunctionLocation]]: jquery.min.js:2
      [[Scopes]]: Scopes[3]
  state: ƒ ()
      arguments: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      caller: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      length: 0
      name: "state"
      prototype: {constructor: ƒ}
      __proto__: ƒ ()
      [[FunctionLocation]]: jquery.min.js:2
      [[Scopes]]: Scopes[3]
  status: 200
  statusCode: ƒ (e)
      arguments: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      caller: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      length: 1
      name: "statusCode"
      prototype: {constructor: ƒ}
      __proto__: ƒ ()
      [[FunctionLocation]]: jquery.min.js:2
      [[Scopes]]: Scopes[3]
  statusText: "OK"
  then: ƒ (t,r,i)
      arguments: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      caller: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (&lt;anonymous&gt;:2:14)]
      length: 3
      name: "then"
      prototype: {constructor: ƒ}
      __proto__: ƒ ()
      [[FunctionLocation]]: jquery.min.js:2
      [[Scopes]]: Scopes[3]
  __proto__: Object
  </code></pre>