2 Replies Latest reply on May 31, 2017 10:22 AM by Lasse Thorenfeldt

    Intermittent failure of Presto WDC, giving 'ReferenceError: Can't find variable: _wdc' errror

    Lasse Thorenfeldt

      Hi there,


      Our internal installation of the open-source Presto instance comes packaged with a Web Data Connector for Tableau (documented on Github here). FWIW, it's built against version 1.1.0 of the WDC library.


      Our issue is that performance of this WDC is intermittent. Across 200+ tests of a small query, it succeeds and brings back the data 71% of the time, and fails 29% of the time. When it fails, the WDC window closes in Tableau, but the query never appears in Presto, and Tableau just shows the Tableau landing page and does nothing. Once you eventually close Tableau, it crashes with a "Tableau has stopped working" error message. When we inspect the logs, we see messages like the following:


      {"ts":"2017-05-25T13:46:49.190","pid":11452,"tid":"2d38","sev":"info","req":"-","sess":"-","site":"{3C69C105-B230-45C9-8C43-AA76BF1ECB43}","user":"-","k":"web-data-connector","v":"WDC is running on desktop, every request is assumed to be safe..."}
      {"ts":"2017-05-25T13:46:49.190","pid":11452,"tid":"2d38","sev":"info","req":"-","sess":"-","site":"{3C69C105-B230-45C9-8C43-AA76BF1ECB43}","user":"-","k":"web-data-connector","v":"Secondary whitelist check passed for the request..."}
      {"ts":"2017-05-25T13:46:49.191","pid":11452,"tid":"2d38","sev":"info","req":"-","sess":"-","site":"{3C69C105-B230-45C9-8C43-AA76BF1ECB43}","user":"-","k":"web-data-connector","v":"Web view loading finished. Result was not cached."}
      {"ts":"2017-05-25T13:46:49.191","pid":11452,"tid":"2d38","sev":"info","req":"-","sess":"-","site":"{3C69C105-B230-45C9-8C43-AA76BF1ECB43}","user":"-","k":"web-data-connector","v":"undefined:1 -- ReferenceError: Can't find variable: _wdc"}


      Specifically, what stands out from the logs relative to a successful WDC query is:

      {"ts":"2017-05-25T13:46:49.191","pid":11452,"tid":"2d38","sev":"info","req":"-","sess":"-","site":"{3C69C105-B230-45C9-8C43-AA76BF1ECB43}","user":"-","k":"web-data-connector","v":"undefined:1 -- ReferenceError: Can't find variable: _wdc"}


      We have tested this WDC from multiple machines across OS versions (Mac OSX, Windows Server 2012, Windows Server 2012 R2), and multiple Tableau versions (10.0.2 and 10.1.6), with varying different browsers installed (Chrome 55.0.2883.75 m (64-bit), Chrome 58.0.3029.110 (64-bit), and IE 11.0.9600.18639). So far we have not find any tell-tale patterns that indicate whether a query using the WDC is going to be successful from a particular machine.


      Does anyone here have any ideas on things to try to address the "ReferenceError: Can't find variable: _wdc" error we are seeing?


      Happy to provide more details here if they would be helpful to anyone for debugging.