Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Errors/timeouts when exportClientData?

    I love the new format mechanism for controlling presentation both in the browser and in Excel files! I'm using v9.1p_2014-05-23, but I have a problem. For some of my larger tables, the export takes a while (which is ok). However, after almost exactly 30 seconds (I timed it with a stopwatch) it emits this error in the console:

    Code:
    Uncaught TypeError: Cannot read property 'RPCManager' of undefined IDACall?isc_rpc=1&isc_v=v9.1p_2014-05-23&isc_tnum=2:1
    (anonymous function) IDACall?isc_rpc=1&isc_v=v9.1p_2014-05-23&isc_tnum=2:1
    I get no file, and the browser tab turns white (Google Chrome 35.0.1916.114). I timed this error at in Safari at about 105 seconds (not as exact). Here's the command that was executing:

    Code:
             grid.exportClientData({ exportAs: "ooxml",                                                                     
                                     exportDisplay: "download",                                                             
                                     exportFilename: table.filename                                                         
                                   });
    and the ListGrid was exporting about 1700 rows x (10 float columns + 1 summary column + 2 string columns). If I filter that data down to 800 rows, the procedure completes in about 15 seconds. Anyway... there appears to be come kind of browser specified timeout on long running JavaScript on the client. Do you have a way around this?

    If I turn off formatting, the procedure takes 15 seconds, but if I set exportRawValues:true for the fields, Chrome still times out at 30 seconds.

    This ListGrid is created from a clientOnly:true DataSource. I tried monitoring with showConsole, but then my machine just ran and ran w/o no failure or success.

    I made a standalone test for this, but it includes data, so it's too large for your attachment manager to accept it.

    I pasted the server output for the relevant interval below.


    Code:
    === 2014-05-23 17:18:42,163 [c-18] DEBUG IDACall - Header Name:Value pair: host:domain.com:8080
    === 2014-05-23 17:18:42,164 [c-18] DEBUG IDACall - Header Name:Value pair: connection:keep-alive
    === 2014-05-23 17:18:42,164 [c-18] DEBUG IDACall - Header Name:Value pair: content-length:3806916
    === 2014-05-23 17:18:42,164 [c-18] DEBUG IDACall - Header Name:Value pair: cache-control:max-age=0
    === 2014-05-23 17:18:42,164 [c-18] DEBUG IDACall - Header Name:Value pair: accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
    === 2014-05-23 17:18:42,164 [c-18] DEBUG IDACall - Header Name:Value pair: origin:http://domain.com:8080
    === 2014-05-23 17:18:42,164 [c-18] DEBUG IDACall - Header Name:Value pair: user-agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36
    === 2014-05-23 17:18:42,164 [c-18] DEBUG IDACall - Header Name:Value pair: content-type:application/x-www-form-urlencoded
    === 2014-05-23 17:18:42,164 [c-18] DEBUG IDACall - Header Name:Value pair: dnt:1
    === 2014-05-23 17:18:42,164 [c-18] DEBUG IDACall - Header Name:Value pair: referer:http://domain.com:8080/test.html
    === 2014-05-23 17:18:42,164 [c-18] DEBUG IDACall - Header Name:Value pair: accept-encoding:gzip,deflate,sdch
    === 2014-05-23 17:18:42,164 [c-18] DEBUG IDACall - Header Name:Value pair: accept-language:en-US,en;q=0.8
    === 2014-05-23 17:18:42,164 [c-18] DEBUG IDACall - Header Name:Value pair: cookie:JSESSIONID=9056D17035A3CB37500C632BD719883E; GLog=%7B%0D%20%20%20%20left%3A1040%2C%20%0D%20%20%20%20top%3A131%2C%20%0D%20%20%20%20width%3A888%2C%20%0D%20%20%20%20height%3A1218%2C%20%0D%20%20%20%20priorityDefaults%3A%7B%0D%20%20%20%20%20%20%20%20Log%3A3%0D%20%20%20%20%7D%2C%20%0D%20%20%20%20defaultPriority%3A3%2C%20%0D%20%20%20%20trackRPC%3Atrue%0D%7D
    === 2014-05-23 17:18:42,164 [c-18] DEBUG IDACall - session exists: 9056D17035A3CB37500C632BD719883E
    === 2014-05-23 17:18:42,164 [c-18] DEBUG IDACall - remote user: null
    === 2014-05-23 17:18:42,165 [c-18] INFO  RequestContext - URL: '/isomorphic/IDACall', User-Agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36': Safari with Accept-Encoding header
    === 2014-05-23 17:18:42,165 [c-18] WARN  RPCManager - Detected zero-length IDA transaction, asking client to retry.
    === 2014-05-23 17:18:42,165 [c-18] WARN  RPCManager - Outputting extra debug information:
    === 2014-05-23 17:18:42,165 [c-18] WARN  RPCManager - Cookies:
    Name: 'JSESSIONID', value: '9056D17035A3CB37500C632BD719883E', domain: 'null', path: 'null', maxAge: '-1', isSecure: 'false'
    Name: 'GLog', value: '%7B%0D%20%20%20%20left%3A1040%2C%20%0D%20%20%20%20top%3A131%2C%20%0D%20%20%20%20width%3A888%2C%20%0D%20%20%20%20height%3A1218%2C%20%0D%20%20%20%20priorityDefaults%3A%7B%0D%20%20%20%20%20%20%20%20Log%3A3%0D%20%20%20%20%7D%2C%20%0D%20%20%20%20defaultPriority%3A3%2C%20%0D%20%20%20%20trackRPC%3Atrue%0D%7D', domain: 'null', path: 'null', maxAge: '-1', isSecure: 'false'
    === 2014-05-23 17:18:42,165 [c-18] WARN  RPCManager - Client HTTP Headers:
    host: domain.com:8080
    connection: keep-alive
    content-length: 3806916
    cache-control: max-age=0
    accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
    origin: http://domain.com:8080
    user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36
    content-type: application/x-www-form-urlencoded
    dnt: 1
    referer: http://domain.com:8080/test.html
    accept-encoding: gzip,deflate,sdch
    accept-language: en-US,en;q=0.8
    cookie: JSESSIONID=9056D17035A3CB37500C632BD719883E; GLog=%7B%0D%20%20%20%20left%3A1040%2C%20%0D%20%20%20%20top%3A131%2C%20%0D%20%20%20%20width%3A888%2C%20%0D%20%20%20%20height%3A1218%2C%20%0D%20%20%20%20priorityDefaults%3A%7B%0D%20%20%20%20%20%20%20%20Log%3A3%0D%20%20%20%20%7D%2C%20%0D%20%20%20%20defaultPriority%3A3%2C%20%0D%20%20%20%20trackRPC%3Atrue%0D%7D
    === 2014-05-23 17:18:42,165 [c-18] WARN  RPCManager - HTTP Query params: {
        isc_rpc:"1",
        isc_v:"v9.1p_2014-05-23",
        isc_tnum:"1"
    }

    #2
    Use the instructions in the FAQ to try to gather more information about that stack trace. Better yet, open the Developer Tools for whatever browser, configure it to stop on error, and get the actual code of the function to paste here.

    Once you've done that, if that doesn't make the problem obvious, we can figure out a way to transfer your large data file needed for the test case.

    Comment


      #3
      Ok, here are some more details. First, my data did not have a primaryKey (I got tons of warnings about this in the log). The lack of a primaryKey seems to be a major performance issue:

      Code:
      10:45:46.892:MUP9:INFO:export:isc_ListGrid_0:starting export chunking process - 1401212746892
      10:45:47.216:MUP9:INFO:export:isc_ListGrid_0:processed 50 rows - starting next chunk - 0.324
      10:45:49.469:TMR7:INFO:export:isc_ListGrid_0:processed 100 rows - starting next chunk - 2.253
      10:46:06.716:TMR8:INFO:export:isc_ListGrid_0:processed 150 rows - starting next chunk - 17.247
      10:47:18.120:TMR0:INFO:export:isc_ListGrid_0:processed 200 rows - starting next chunk - 71.404
      10:49:29.547:TMR1:INFO:export:isc_ListGrid_0:processed 250 rows - starting next chunk - 131.427
      10:52:06.633:TMR2:INFO:export:isc_ListGrid_0:processed 300 rows - starting next chunk - 157.086
      10:53:39.894:TMR3:INFO:export:isc_ListGrid_0:processed 350 rows - starting next chunk - 93.261
      10:54:54.859:TMR9:INFO:export:isc_ListGrid_0:processed 400 rows - starting next chunk - 74.964
      Note, since there are ~1700 rows, I got tired of waiting and closed the tab. At least the error didn't appear 30 seconds after the start, suggesting that this might be a Smartclient timer afterall. When I regenerated the data with a primaryKey, I got this:
      Code:
      11:16:10.706:MUP3:INFO:export:isc_ListGrid_0:starting export chunking process - 1401214570706
      11:16:10.883:MUP3:INFO:export:isc_ListGrid_0:processed 50 rows - starting next chunk - 0.177
      11:16:10.886:MUP3:DEBUG:EventHandler:Event 'click' bubbled to top
      11:16:11.095:TMR5:INFO:export:isc_ListGrid_0:processed 100 rows - starting next chunk - 0.212
      11:16:11.315:TMR8:INFO:export:isc_ListGrid_0:processed 150 rows - starting next chunk - 0.22
      11:16:11.565:TMR9:INFO:export:isc_ListGrid_0:processed 200 rows - starting next chunk - 0.249
      11:16:11.576:BLR0:DEBUG:nativeFocus:onblur fired on: [Button ID:isc_Button_0]
      11:16:11.804:TMR1:INFO:export:isc_ListGrid_0:processed 250 rows - starting next chunk - 0.24
      11:16:12.078:TMR2:INFO:export:isc_ListGrid_0:processed 300 rows - starting next chunk - 0.274
      11:16:12.342:TMR3:INFO:export:isc_ListGrid_0:processed 350 rows - starting next chunk - 0.264
      11:16:12.659:TMR4:INFO:export:isc_ListGrid_0:processed 400 rows - starting next chunk - 0.317
      11:16:13.042:TMR5:INFO:export:isc_ListGrid_0:processed 450 rows - starting next chunk - 0.383
      11:16:13.516:TMR6:INFO:export:isc_ListGrid_0:processed 500 rows - starting next chunk - 0.474
      11:16:13.990:TMR7:INFO:export:isc_ListGrid_0:processed 550 rows - starting next chunk - 0.474
      ...
      which is much faster (so there appears to be a performance issue associated with primaryKey)... it still finished all 1700 rows in about 16 seconds, then it pauses, and then before I can see what happens in the log (it gets cleared too quickly) -- a redirect is sent to the browser, the same error occurs (this time about 50 seconds after the export began), and the ISC Console says "the browser window that opened this log window has navigated to a new page or been closed".

      A few other things... the error is arising from this line:
      Code:
      <HTML><BODY><SCRIPT>parent.isc.RPCManager.retryOperation(window.name);</SCRIPT></BODY></HTML>
      but I can't figure out how to put a breakpoint there, if that's what you were suggesting.

      I'm ready to email my test case to someone...

      Comment


        #4
        That line is written out by the server if it receives an HTTPServletRequest that *should* have contained data sent from the browser but was in fact blank. So this suggests that before the SmartClient framework receives your request, some other layer (possibly a security or authentication system) jumps in and redirects to another URL.

        You'll need to figure out what's doing that; a test case isn't going to replicate that behavior because it's not coming from SmartClient.

        Comment


          #5
          I'm not using any authentication or security. But just in case I had changed some relevant setting, I installed Tomcat 7.0.54 from scratch and the problem persists. I also tried it on localhost, and the problem exists there too.

          Also, as a reminder, this problem does *not* occur if I try to export a smaller (but equivalent) dataset. I attached a version of my test case with all but the first 2 data entries deleted (the attached version works, the full version which is too large to attach does not work).

          I tried Firefox 29 w/ Firebug, and it gives me a bit more info. The error now:
          Code:
          TypeError: parent.isc is undefined
          and it gives me a stacktrace:
          Code:
          fireBugTrace()ISC_Core.js (line 19894)
          traceId = "FBugTrace221"
          getStackTrace()ISC_Core.js (line 19654)
          args = undefined
          ignoreLevels = 1
          maxLevels = undefined
          skipFBugTrace = undefined
          extensionTrace = undefined
          draw()ISC_Core.js (line 44347)
          showing = undefined
          init()ISC_Core.js (line 43827)
          A = [unsupported: no toString() function in type object] {}
          B = undefined
          C = undefined
          D = undefined
          E = undefined
          F = undefined
          G = undefined
          H = undefined
          I = undefined
          J = undefined
          K = undefined
          L = undefined
          M = undefined
          completeCreation()ISC_Core.js (line 6970)
          A = [unsupported: no toString() function in type object] {}
          B = undefined
          C = undefined
          D = undefined
          E = undefined
          F = undefined
          G = undefined
          H = undefined
          I = undefined
          J = undefined
          K = undefined
          L = undefined
          M = undefined
          create()ISC_Core.js (line 4502)
          A = [unsupported: no toString() function in type object] {}
          B = undefined
          C = undefined
          D = undefined
          E = undefined
          F = undefined
          G = undefined
          H = undefined
          I = undefined
          J = undefined
          K = undefined
          L = undefined
          M = undefined
          sendData()ISC_Core.js (line 28001)
          isResend = undefined
          sendForm()ISC_Core.js (line 27951)
          formHTML = "Submitting to:<B>http:/...'1401218844440'></FORM>"
          formName = "AUTO_FORM_0"
          fieldList = [unsupported: no toString() function in type object] {}
          sendHiddenFrame(request=Object { URL="domain.c...p_2014-05-23&isc_tnum=1", fields={...}, target="1401218844440", more...})ISC_Da...ding.js (line 53734)
          _sendQueue(callback=undefined, prompt=null, URL="domain.c...p_2014-05-23&isc_tnum=1", transaction=Object { timeout=240000, transactionNum=1, operations=[1], more...})ISC_Da...ding.js (line 36497)
          sendQueue(callback=undefined, prompt=undefined, URL=undefined, delay=undefined)ISC_Da...ding.js (line 36208)
          sendRequest(request=Object { showPrompt=false, transport="hiddenFrame", exportResults=true, more...})ISC_Da...ding.js (line 35172)
          call(appID=Object { requestParams={...}, appID="isc_builtin", className="builtin", more...}, className=undefined, methodName=undefined)ISC_Da...ding.js (line 40791)
          x(firstArg=Object { methodName="downloadClientExport", arguments=[5], requestParams={...}, more...})1 (line 1)
          exportClientData(data=[Object { id="0", part="total", site="A_1", more...}, Object { id="1", part="total", site="A_2", more...}, Object { id="2", part="total", site="A_3", more...}, 1686 more...], requestProperties=Object { showPrompt=false, transport="hiddenFrame", exportResults=true, more...}, callback=undefined, ds=Object { ns={...}, clientOnly=true, cacheData=[1689], more...})ISC_Da...ding.js (line 27477)
          exportClientData(data=[Object { id="0", part="total", site="A_1", more...}, Object { id="1", part="total", site="A_2", more...}, Object { id="2", part="total", site="A_3", more...}, 1686 more...], requestProperties=Object { showPrompt=false, transport="hiddenFrame", exportResults=true, more...}, callback=undefined)ISC_Da...ding.js (line 18040)
          exportClientDataReply(data=[Object { id="0", part="total", site="A_1", more...}, Object { id="1", part="total", site="A_2", more...}, Object { id="2", part="total", site="A_3", more...}, 1686 more...], context=Object { exportAs="ooxml", exportDisplay="download", exportFilename="2pii_process_designed", more...})ISC_Core.js (line 73312)
          anonymous()ISC_Core.js (line 1689)
          fireCallback(callback="isc_ListGrid_0.exportClientDataReply(data,context)", argNames="data,context", args=[[Object { id="0", part="total", site="A_1", more...}, Object { id="1", part="total", site="A_2", more...}, Object { id="2", part="total", site="A_3", more...}, 1686 more...], Object { exportAs="ooxml", exportDisplay="download", exportFilename="2pii_process_designed", more...}], target=Object { ns={...}, height=500, alternateRecordStyles=true, more...}, catchErrors=undefined)ISC_Core.js (line 6188)
          fireCallback(callback="isc_ListGrid_0.exportClientDataReply(data,context)", argNames="data,context", args=[[Object { id="0", part="total", site="A_1", more...}, Object { id="1", part="total", site="A_2", more...}, Object { id="2", part="total", site="A_3", more...}, 1686 more...], Object { exportAs="ooxml", exportDisplay="download", exportFilename="2pii_process_designed", more...}], catchErrors=undefined)ISC_Core.js (line 7908)
          getClientExportDataChunk(context=Object { settings={...}, callback="isc_ListGrid_0.exportClientDataReply(data,context)", chunkSize=50, more...})ISC_Core.js (line 72670)
          fireCallback(callback=Object { target={...}, methodName="getClientExportDataChunk", args=[1], more...}, argNames=undefined, args=[Object { settings={...}, callback="isc_ListGrid_0.exportClientDataReply(data,context)", chunkSize=50, more...}], target=Object { ns={...}, height=500, alternateRecordStyles=true, more...}, catchErrors=true)ISC_Core.js (line 6191)
          _fireTimeout(ID="_timeout171")ISC_Core.js (line 28299)
          ()ISC_Core.js (line 28216)
          TypeError: parent.isc is undefined
          Last edited by nitroamos; 27 May 2014, 13:45.

          Comment


            #6
            You're probably hitting the Tomcat max post size. Or for your "localhost" deployment, the max post size of whatever server is running there.

            Comment


              #7
              Thanks, Isomorphic! I set maxPostSize="-1" and that fixed it.

              I wouldn't have guessed that. According to the Tomcat documentation, maxPostSize default is 2 mb, where as the xlsx file I'm downloading is only 115 kb. Also, I can't find any warning/error from Tomcat. All I see in the access log for a failed export is this:

              Code:
              192.168.1.120 - - [27/May/2014:14:29:26 -0700] "POST /isomorphic/IDACall?isc_rpc=1&isc_v=v9.1p_2014-05-23&isc_tnum=1 HTTP/1.1" 200 109
              which implies that it was OK, and here's the item in the catalina log:
              Code:
              === 2014-05-27 14:29:26,054 [ec-9] WARN  RPCManager - Detected zero-length IDA transaction, asking client to retry.
              I guess what was frustrating about this is that my development environment is insufficient for getting to the bottom of this type of problem.

              Are there any tools you'd recommend?

              Comment


                #8
                Tomcat logs this in it's own log, which may be separate from the SmartGWT server log depending on how you configure Tomcat.

                Comment


                  #9
                  Hi Isomorphic...
                  I face a new problem here.

                  I have set maxPostSize in my tomcat.
                  While i run my application and open a new page it open successfully. But after that all data disappear from my page when any server side operation occurs. For example when i goto server in TAB out from a text field using "save" operation from datasource then all data are disappearing.

                  Nothing happen after that and after some time "operation time out "message appear.
                  When i stop tomcat it writes a message in catlina log that

                  SERVE: Exception while dispatching incoming RPC call
                  java.io.EOFException: Unexpected EOF read on the socket
                  at org.apache.coyote.http11.InternalNioInputBuffer.readSocket(InternalNioInputBuffer.java:447)
                  at org.apache.coyote.http11.InternalNioInputBuffer.fill(InternalNioInputBuffer.java:799)




                  server.xml in tomcat contains that maxPortsize="4096" in <Connector> node.


                  The problem is:
                  I have 3 major page in application.
                  1.Members data.
                  2.Maintain.
                  3.Upgrade

                  if maxPostSize is set to maxPostSize="8192" then only Members data page is running. Any other page are giving same error as described above.

                  if maxPostSize is set to maxPostSize="12288" then only Members data and maintain page is running. Any other (billing)page are giving same error as described above.


                  if maxPostSize is set to maxPostSize="24576" then all page running correctly and no problem found in production mode.

                  Now my question is can i handle anything from my smagwt code. ?
                  Can i calculate anything from development mode that one page will take some amount of data to run in tomcat.

                  Is something missing in development mode?

                  Is there any implementation guide for develop smartgwt application for client server integration.?

                  I am using Tomcat 7.0.55
                  GWt 2.4.0
                  SmartGWt 3.1
                  SmartClient Version: v8.3_2012-11-20/PowerEdition Deployment (built 2012-11-20)
                  Mozilla 25.
                  Chrome latest version.
                  IE 11




                  Please Help.

                  Comment


                    #10
                    Sorry, this doesn't make any sense. There's no code in SmartGWT that would cause data to suddenly disappear from components when you do an export, and it doesn't make sense that parts of your application work or don't work based solely on a maxPostSize setting, which would only be involved when doing a large export or file upload..

                    You seem to be very confused about what's going on. If you can get to the point where you have a clear description of the problem, you can try again to post it here, but you should probably be looking into our commercial services if you need help with this problem, as it's almost certainly not a framework issue.

                    Comment

                    Working...
                    X