Note that there are some explanatory texts on larger screens.

plurals
  1. POUncaught TypeError: Cannot use 'in' operator to search for 'SUPPORT_COOKIES' in null
    text
    copied!<p>I am using IBM Worklight Developer Edition 5.0.5 to try to create simple(HTML and Adapter) application, but facing unresolved problem.</p> <p>This could be a same problem which is not answered in old forum: <a href="http://www.ibm.com/developerworks/forums/thread.jspa?threadID=460738" rel="nofollow">http://www.ibm.com/developerworks/forums/thread.jspa?threadID=460738</a></p> <p><strong>[Environment]</strong> OS: Windows7 64bit(Japanese locale), Eclipse: 4.2.1, Worklight: Developer Edition 5.0.5</p> <p><strong>[Description]</strong> I created Worklight Project in my Eclipse, without any external libraries like jQuery mobile nor Dojo. I added HTTP Adapters and SQL Adapters into this Project. Both seems to work fine when I try 'Run As .. -> Invoke Worklight Procedure'. Both returned expected JSON. So I don't think there would be a problem in Adapters.</p> <p>But when I call those adapters from HTML file, I got <strong>"Uncaught TypeError: Cannot use 'in' operator to search for 'SUPPORT_COOKIES' in null"</strong> error in worklight.js(line:2380).</p> <p><strong>[My code]</strong></p> <blockquote> <p>var invocationData = { adapter : 'SQLAdapter', procedure : 'getCount', parameters : [] };</p> <p>WL.Logger.debug( "1: invocationData = " + invocationData );<br> WL.Client.invokeProcedure( invocationData, { onSuccess: loadFeedsSuccess, onFailure: loadFeedsFailure });</p> <p>WL.Logger.debug( "2: loadFeeds" );</p> <p>function loadFeedsSuccess( result ){ WL.Logger.debug( "3: success: result = " + result ); }</p> <p>function loadFeedsFailure( result ){ WL.Logger.debug( "4: failure: result = " + result ); }</p> </blockquote> <p><strong>[My debug console output]</strong></p> <blockquote> <p>1: invocationData = [object Object] worklight.js:1112</p> <p>Uncaught TypeError: Cannot use 'in' operator to search for 'SUPPORT_COOKIES' in null worklight.js:2380</p> <p>wlclient init started worklight.js:1112</p> <p>before: app init onSuccess worklight.js:1112</p> <p>after: app init onSuccess worklight.js:1112</p> <p>wlclient init success</p> </blockquote> <p>So it seems only first WL.Logger.debug() is called successfully, but WL.Client.invokeProcedure() seems to cause above <strong>Uncaught TypeError</strong>, and it just failed(not call success-case callback, nor failure-case callback).</p> <p>This is a SQL Adapter case, but when I tryed to use HTTP Adapter, the result was same(failed in WL.Client.invokeProcedure()). Again, both returns appropriate result when I try 'Run As .. -> Invoke Worklight Procedure'.</p> <p>My console says this failure happens in line 2380 of worklight.js:</p> <blockquote> <p>2379: isEnabled : function(field) { </p> <p>2380: return !!(field in profile &amp;&amp; profile[field]); </p> <p>2381: }</p> </blockquote> <p>So I have no idea what would be wrong with my code. Are there any idea/information for this problem? Thanks for advance.</p> <p><strong>Added</strong> Same error was happened in Mac OSX environment too.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload