<p dir="auto">i find my program can not clear cookies ,if i used 0.36.1 both mac and win.</p>
<p dir="auto">then i do a test.</p>
<p dir="auto">code is here:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;
const app = require('electron').app
const BrowserWindow = require('electron').BrowserWindow

app.on('window-all-closed', () =&gt; {
  app.quit()
})

app.on('ready', () =&gt; {

  let mainWindow = new BrowserWindow({
    &quot;width&quot;: 800,
    &quot;height&quot;: 800,
    &quot;center&quot;: true
  })

  let mainWindowContents = mainWindow.webContents

  let session = mainWindowContents.session

  mainWindowContents.loadURL(&quot;https://www.google.com.hk&quot;)

  mainWindowContents.on('did-stop-loading', () =&gt; {

    // get all cookies and remove them
    session.cookies.get({}, (error, cookies) =&gt; {
      let len = cookies.length
      console.log(len)
      cookies.forEach((cookie) =&gt; {
        let name = cookie.name
        session.cookies.remove({
          name: name
        }, function(error) {
          console.log(name)
        })
      })
    })

  })

})
"><pre class="notranslate"><code class="notranslate">"use strict"
const app = require('electron').app
const BrowserWindow = require('electron').BrowserWindow

app.on('window-all-closed', () =&gt; {
  app.quit()
})

app.on('ready', () =&gt; {

  let mainWindow = new BrowserWindow({
    "width": 800,
    "height": 800,
    "center": true
  })

  let mainWindowContents = mainWindow.webContents

  let session = mainWindowContents.session

  mainWindowContents.loadURL("https://www.google.com.hk")

  mainWindowContents.on('did-stop-loading', () =&gt; {

    // get all cookies and remove them
    session.cookies.get({}, (error, cookies) =&gt; {
      let len = cookies.length
      console.log(len)
      cookies.forEach((cookie) =&gt; {
        let name = cookie.name
        session.cookies.remove({
          name: name
        }, function(error) {
          console.log(name)
        })
      })
    })

  })

})

</code></pre></div>
<p dir="auto">in 0.36.1,it not working, and catch a error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: Error processing argument -1.
    at TypeError (native)
    at /Users/linchao/Documents/code/electron-test/main.js:31:23
    at Array.forEach (native)
    at Function.&lt;anonymous&gt; (/Users/linchao/Documents/code/electron-test/main.js:28:13)"><pre class="notranslate"><code class="notranslate">TypeError: Error processing argument -1.
    at TypeError (native)
    at /Users/linchao/Documents/code/electron-test/main.js:31:23
    at Array.forEach (native)
    at Function.&lt;anonymous&gt; (/Users/linchao/Documents/code/electron-test/main.js:28:13)
</code></pre></div>
<p dir="auto">but the test code working fine before 0.36.1,will console cookies num and display all removed cookies names.</p>
<p dir="auto">thanks.</p>
<p dir="auto">Hello,</p>
<p dir="auto">While executing our test codes. clearing cookies test case was failing in 0.36.1,  Attached the sample stack trace.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error: Could not call remote function `remove`. Check that the function signature is correct. Underlying error: Error processing argument -1.
Error: Could not call remote function `remove`. Check that the function signature is correct. Underlying error: Error processing argument -1.
    at callFunction (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/lib/rpc-server.js:186:13)
    at EventEmitter.&lt;anonymous&gt; (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/lib/rpc-server.js:281:14)
    at emitMany (events.js:108:13)
    at EventEmitter.emit (events.js:182:7)
    at EventEmitter.&lt;anonymous&gt; (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/api/lib/web-contents.js:101:27)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)
    at callFunction (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/lib/rpc-server.js:186:13)
    at EventEmitter.&lt;anonymous&gt; (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/lib/rpc-server.js:281:14)
    at emitMany (events.js:108:13)
    at EventEmitter.emit (events.js:182:7)
    at EventEmitter.&lt;anonymous&gt; (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/api/lib/web-contents.js:101:27)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)
    at metaToValue (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/renderer/api/lib/remote.js:108:15)
    at RemoteMemberFunction [as remove] (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/renderer/api/lib/remote.js:142:26)
    at Object.util.cookies._delete (&lt;anonymous&gt;:6:45)
"><pre class="notranslate"><code class="notranslate">Error: Could not call remote function `remove`. Check that the function signature is correct. Underlying error: Error processing argument -1.
Error: Could not call remote function `remove`. Check that the function signature is correct. Underlying error: Error processing argument -1.
    at callFunction (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/lib/rpc-server.js:186:13)
    at EventEmitter.&lt;anonymous&gt; (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/lib/rpc-server.js:281:14)
    at emitMany (events.js:108:13)
    at EventEmitter.emit (events.js:182:7)
    at EventEmitter.&lt;anonymous&gt; (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/api/lib/web-contents.js:101:27)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)
    at callFunction (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/lib/rpc-server.js:186:13)
    at EventEmitter.&lt;anonymous&gt; (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/lib/rpc-server.js:281:14)
    at emitMany (events.js:108:13)
    at EventEmitter.emit (events.js:182:7)
    at EventEmitter.&lt;anonymous&gt; (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/api/lib/web-contents.js:101:27)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)
    at metaToValue (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/renderer/api/lib/remote.js:108:15)
    at RemoteMemberFunction [as remove] (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/renderer/api/lib/remote.js:142:26)
    at Object.util.cookies._delete (&lt;anonymous&gt;:6:45)

</code></pre></div>
<p dir="auto">Env :</p>
<p dir="auto">Electron : 0.36.1<br>
Mac :  OS x El captain</p>
<p dir="auto">Works fine in : 0.36.0</p>