Page 1 of 1

JSON Error on Button Click

Posted: August 31st, 2022, 11:09 am
by CathyC
I have seen this issue in classic for a while now and it had been hard to recreate. I had a few more examples now that I could recreate and I searched in our issue history and found some good screenshots to better see all the cases.

For some it was a userdialog service that caused it and others it was ajax on for the button that was the cause.

Platform 4
Case 1
image.png
On the EASYCommerce Account Home page, click to email a user their password, progress animation shows. SetTerminateActions window shows, click Ok. go to header search bar and type a value, click search. Progress animation shows. JSON error pops up.

Case 2
image.png
This one was raised to me by a user: I was searching for a product in the item catalogue and after clicking the search button this warning box did pop up. After clicking “ok” the product was shown anyways.

Other
Case 1
I don't remember where this one happened. On a specific EASYCommerce install where a button was added to download files. Click a button that streams a file, then click any other button on the page. The invalid JSON error came up. The fix for this was to turn ajax off for the button

Paris
Case 1
Feb, March, April, July 2021, March 2022
On the checkout page, user clicks a button to place the order, but the path runs a user dialog service. An issue was found by the internal team for the UserDialog service. Fix was applied by Justin May 2022 (ref issue 0896)
image.png
image.png
Case 2
August 2022
On the catalog page filtered by a search, when trying to add an item from the grid view to cart. Not sure if this had a user dialog service in it, but this was after a fix was applied to the tenant for the user dialog service, so that shouldnt have errored anymore.
image.png

Re: JSON Error on Button Click

Posted: September 1st, 2022, 12:51 pm
by Joe
I've also seen this error on platform3 using 5.1 classic. I was never able to consistently recreate the error, but my guess was that it had something to do with the UserDialog service. I only ever got the "not valid JSON" message if UserDialog had already ran in the button.

Re: JSON Error on Button Click

Posted: September 1st, 2022, 3:54 pm
by CathyC
thanks Joe! I edited my original post because the userdialog on yours reminded me of other cases I was able to put

Re: JSON Error on Button Click

Posted: September 1st, 2022, 4:16 pm
by SteveCap
Task #10755 has been created. This post will be updated when it has been completed.

Re: JSON Error on Button Click

Posted: September 14th, 2022, 3:00 pm
by btyrell
Removing the AutoComplete service from the textbox solved the issue for Platform 4 in Cathy's original post. Is there any way currently to have AutoComplete work while avoiding this issue?

Re: JSON Error on Button Click

Posted: October 13th, 2022, 12:21 pm
by CathyC
We had this issue again and it was reported that it is happening frequently. This is for the paris case 2. searching from the catalog page in the header search box. We looked and this was not calling an api. it didnt have auto complete or a userdialog service
image.png
What else can we check for this?

Re: JSON Error on Button Click

Posted: October 18th, 2022, 5:49 pm
by shalomsims
Ran into this same issue on 5.1 Classic EasyProcess.

Not sure exactly what I did. I was running UpdateAll logic using the button on the MyLists feature. My internet started running slowly around this time and I'm not sure if that helped cause an issue. It was working

Here's a link to the IDE for UpdateAll:
https://easyprocess.krisesystems.com/Pr ... rt_Control

Link to the page:
https://easyprocess.krisesystems.com/Pr ... WznmhUk32w
Screenshot 2022-10-18 134521.png

Re: JSON Error on Button Click

Posted: October 24th, 2022, 11:31 am
by CathyC
more reports of this from paris example:
image.png
I think from the login page. Appears if the session is inactive for 1 minute or so error appears
so might be related to inactivity for some time?

Re: JSON Error on Button Click

Posted: October 31st, 2022, 11:33 am
by JustinVanRegenmorter
As of RunTime Revision 1106 the suspected code has a try catch to help provide a better error and prevent these JSON popups.

Re: JSON Error on Button Click

Posted: May 8th, 2023, 11:46 am
by CathyC
I dont think we have seen this in a while. I am marking it as resolved, but we can reopen later if needed

EDIT: In the past few months I had a talk with the internal team about why the latest EC didnt have the auto complete feature like 4.8 EC. I found in EASYTracker issue 256, this issue description which pointed to this forum post as the root cause. Putting the info here in case we wanted to pick that up again so its searchable. Looks like it was fixed, but never tested and the task of adding it to EC was dropped since it wasnt an immediate need.
Catalog Issues
...
-When searching, a JSON error shows up. to fix, disconnect the solr auto complete service in the search bar.
-This service was made for this client, but when I raised the json error to steve he said this was the cause.
viewtopic.php?p=1049
this issue is platform4 case 1. in looking into it, add more details to the forum post and update whether removing the autocomplete fixed it. and ask if there is a way to utilize the autocomplete in a way that it wont cause this issue