Uncaught exception: unknown (can't convert to string)
<p>I am writing code for the Firefox browser addon and I am trying to update the value of cookies using chrome API.
While calling the chrome.cookies.set method, it returns the following error on the console.</p>

<p><strong>Error: uncaught exception: unknown (can't convert to string)</strong></p>

<pre><code>var finalCookieObj = { 
    domain: ".qa.soul.com", 
    name: "aaa", 
    value: "as", 
    path: "/", 
    httpOnly: false, 
    url: "qa.soul.com/", 
    expirationDate: 1459788960 
};

chrome.cookies.set(finalCookieObj, function(cookie) {
    console.log('added cookie');
});
</code></pre>

<p>API reference: <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/cookies/set" rel="nofollow">https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/cookies/set</a> </p>