Websockets and Refresh Server Action after 6.5.0 update issue

Hi Wapplers,

I have just updated to Wappler 6.5.0. I have noticed an issue after this update as follows:

  1. I have a long form with about 20 questions (inputs).
  2. When someone fills out the form it automatically saves to the database (i.e. calls a server action which updates the table).
  3. The user can come back anytime and can continue where they left off as the inputs value is dynamically bound to the database fields.
  4. There are also automatic calculations which occur on this page and so I have added the “Live refresh witrh Sockets” attribute to my “getthedeal” server action.
  5. When I load the page and throughout using the page the idea is that there is constant ocmmunication and updates from the getthedeal server action. I have achieved this by adding “refresh Server Action” in the updatedeal server action. So when there are constant updaes on the page the server action is refreshed to pull in the updated data.

Now everything was working great until I updated to this new version. Now look at the recorded video below. It wont stop loading its like an infinite loop. This does not happen on my live website with the older version of Wappler.

Any idea what is going on? Again, I have changed absolutely nothing. This is complete due to the update.

Seems like you have some errors in the expressions? Check the console in the devtools and provide us with exact errors, so we can investigate further.

Hi George I think those errors are due to empty values being sent to the update server action. Either way i am only experiencing this now after the update.

well maybe you can provide some default values (with the Default formatter) so that no wrong expressions get generated as those can cause more errors.

OK so I switched projects to another cloned version of this app and I did not update project files (that prompted me in the beginning)

and the issue does not exist and no errors show up in console. It works normally. There is definitely an issue after apply update. Dont think the new errors are the issue in any case… it seems to be a websocket issue. The parser error you see does no show up on the older version only the new one. The parser error relates to this:

 <dmx-value id="interest" dmx-bind:value="(getthedeal.data.query.primaryOffered == 'First Registered Mortgage' &amp;&amp; lvr.value &lt;= getalender.data.query.maxLVR1RM)?((getalender.data.query['1RMrate']/12/100) * getthedeal.data.query.Loanamount)*getthedeal.data.query.cappedMonths:((getalender.data.query['2RMrate']/12/100) * getthedeal.data.query.Loanamount)*getthedeal.data.query.cappedMonths"></dmx-value>

If I comment that line out there is no error

Please look at this 304 Not modified error… perhaps that also has something to do with it?

304 Not modified is not an error, it means that the content was not modified and a cached version should be used. What is the backend that you use (node, php)?

Nodejs/postgresql/docker

The error and sockets issue I’m having doesn’t show up on earlier versions though only this one

Besides Im not too worried about that error. Whats stopping me in my tracks now is that the sockets action keeps executing as per my video above.

Here a small update for the parser error that you are getting

dmxAppConnect.zip (115.7 KB)

Thank you! Ok I finally fixed this issue. I set Data Caching for my state manager as below and the sockets issue has been resolved! You were right before.

Thank you! :beers:

I am actually still having issues with this. The caching is messing up my inputs as it wont let me change and update the values - it keeps refreshing with older cached values. I have tried putting in debounce but still no luck. Very frustrating. I need to disable caching on the server connect but then the socket issue is back where it keeps loading. Again this did not happen on previous version.

Hi Patrick will the issue of the parsing error be fixed in the next update or the sockets issue ? The socket issue still remains

OK so after changing all my inputs from :updated to :changed that seems to have solved the issue. Strange that it only became an issue on this latest update, but all is good.

So it seems not an issue with the websockets. The updated event should only trigger when a value was updated and was different than the previous value. The changed event only triggers after a user changed the value and should not trigger on changes from code.

Fixed in Wappler 6.5.1

This topic was automatically closed after 47 hours. New replies are no longer allowed.