Author Topic: Mystery error on subsequent grid loads  (Read 3441 times)

fzeker

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 10
    • View Profile
Mystery error on subsequent grid loads
« on: September 22, 2017, 01:03:55 am »
I developed an application using pqGrid, with server-side xml being provided.  My grid initializes, ajax returns the xml, .paramquery.xmlToJson() converts for pqGrid, all is working beautifully on my dev. virtual machine.  VM tests great in IIS7 and IIS express.  But pqGrid.min.js script crashes (see log file) once installed on the customer intranet server running MS Server 2003, which needed upgraded/config. to run .NET.  I had to enable .WOFF/.WOFF2 files extensions, so I realize it was quite out of sync with current practices.  The concern I have is the javascript libraries, .ts and .map files potentially being unhandled.

The problem is very peculiar, the first init. and data load of the grid is trouble free, no errors, works as desired.  All subsequent attempts are throwing errors in the browser console.  Please see the (Chrome v.60.x) browser console log file attached.  Does the pqGrid error look familiar or make any sense to you ?

I have spent mega+ hours on this project designing it completely from ground up focused on pqGrid pro, and works error free on my server.  Ready for client testing phase and now I cannot afford to dissect the pqGrid script for potential errors.  The customer is raring to get this tested and into production as soon as possible.

If you need my javascript for pqGrid init or have any questions, I'll be glad to share.  Also is it at all possible an IIS config. would affect pgGrid libraries ?
Thanks for anything you can provide.

These are all my client side library references FYI:
!-- page CSS --
css/w3.css
css/googleapis.css
css/font-awesome-4.7.0/css/font-awesome.min.css
   
!-- jquery refs --
scripts/jquery.min.js

!--jqueryui refs --
scripts/jquery-ui/jquery-ui.css
scripts/jquery-ui/jquery-ui.min.js

!--PQ Grid files--
scripts/pqgrid.min.js

!--PQ Grid files--
scripts/pqgrid.min.css
scripts/pqgrid.ui.min.css

!--jqueryui touch punch for touch devices--
scripts/touch-punch/touch-punch.min.js

!--PQ Grid Office theme--
scripts/themes/steelblue/pqgrid.css

!-- jsZip for zip and xlsx export--
scripts/jsZip-2.5.0/jszip.min.js
Scripts/jsZip-2.5.0/filesaver.min.js

scripts/pqGrid_init.js
Scripts/jqMain.js

fzeker

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Mystery error on subsequent grid loads
« Reply #1 on: September 22, 2017, 01:07:42 am »
Using version:  ParamQuery Pro v4.0.1

fzeker

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Mystery error on subsequent grid loads
« Reply #2 on: September 22, 2017, 08:41:06 pm »
This issue is not occurring in IE11 on dev. VM, but installed new Chrome and see same issue on VM.  I'm putting in a bunch more console logging for help pin pointing the call stack issue.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6313
    • View Profile
Re: Mystery error on subsequent grid loads
« Reply #3 on: September 22, 2017, 09:46:17 pm »
Your error trace is not very useful as it's taken from pqgrid.min.js

Please use pqgrid.dev.js for getting complete error stack trace in the browser.

you mention that it works fine in dev env, but breaks in production.

Assuming that you copied all the js/ css, client side files as it's to the production, I guess it's the difference in response from server ( dev / production ) which is causing the error. Because the client side scripts run in the browser and they are not affected by server side env ( dev or production ).
Suggest you to open the browser network console and compare the server side response in case of dev and production.

You also mention that in prod, it loads data on first init, but throws error on subsequent requests. Please elaborate the process of subsequent requests. How do the subsequent requests originate and on what user action?
« Last Edit: September 22, 2017, 10:00:09 pm by paramquery »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6313
    • View Profile
Re: Mystery error on subsequent grid loads
« Reply #4 on: September 22, 2017, 10:03:55 pm »
Also is it possible for you to share url of the application in production?

fzeker

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Mystery error on subsequent grid loads
« Reply #5 on: September 22, 2017, 11:24:01 pm »
Thanks for reply!  My appology for unparsed logfile, Notepad++ does nice job opening those, so I must not have save EOL conv. after parsed. 

I finally did get a test with exact same browser on both ends.  Confirmed that Prod test with IE11 is clean, as is no errors as the case on dev. 
Tests with Chrome 60.x on both sides is where the errors halt pgGrid as seen in the log, I have attached parse the log and after running with pggrid.dev.js

Errors begin on pgGrid.dev.js [Line 1762]:   l.$stripe = s

So this is at least consistent on both systems, just cannot see anything that is causing Chrome to flop. 

Prod is an intranet. I can send my pqGrid init javascript and html, the rest in not easily supplied, but I can save a data request result to flat file for simulation if need be.

Process of subsequent requests originate from the same custom/simple SPA form.  I am posting all new requests to the server via $.ajax().post, round-trip results with XML and being parsed. The first load runs fine on Chrome, say for Customer Name, then I narrow down to Invoice No., crashes on that load. These are complete pgGrid loaded results on first load, then next load is stuck with the Grid Loading.. and errored out behind the scenes.  IE 11 performs subsequent requests without fail, as many as I type and submit.

Thanks.
« Last Edit: September 23, 2017, 12:00:08 am by fzeker »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6313
    • View Profile
Re: Mystery error on subsequent grid loads
« Reply #6 on: September 22, 2017, 11:31:39 pm »
Can you please reattach the log.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6313
    • View Profile
Re: Mystery error on subsequent grid loads
« Reply #7 on: September 23, 2017, 12:04:39 am »
collapsible option is an object not a boolean. Please correct it.

https://paramquery.com/pro/api#option-collapsible

fzeker

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Mystery error on subsequent grid loads
« Reply #8 on: September 23, 2017, 12:46:40 am »
 I overlooked that, you're absolutely correct.  Issue resolved.  THANK - YOU - SIR !