Input Randomly Not Responding to dmx-on:updated

I have an input like this:

<input novalidate id="i_contact_search_name" name="contact_search_name" type="text" class="input_search" placeholder="Contact name or email..." dmx-on:updated="flow_search_contacts.run({})">

And the flow it runs just invokes a large server action that looks like this:

<script is="dmx-flow" id="flow_search_contacts" type="text/dmx-flow">{
  run: {
    action: "{{search_contacts.load({in_test_mode: test_mode.data.test_mode.test_mode, is_deleted: i_contact_search_deleted.checked?1:0, name: i_contact_search_name.value, activity: i_contact_search_activity.value, contact_tag: i_contact_search_contact_tag.value, region: i_contact_search_region.value, gender: i_contact_search_gender.value, age_range: i_contact_search_age_range.value, activity_type: i_contact_search_activity_type.value, activity_tag: i_contact_search_activity_tag.value, activity_region: i_contact_search_activity_region.value, brand: i_contact_search_brand.value})}}",
    name: "search_contacts"
  }
}</script>

I'm finding that sometimes, after using my app for a while (which could be 10 minutes or an hour or so), the flow just stops triggering when the input is updated.

The rest of the app is running just fine, and all the server connects are working correctly.

I wondered if it is to do with the PHP "session.gc_maxlifetime, but this is set to 8 hours, or 28800 seconds:

Can someone help me diagnose what could be going wrong please?

I am using Wappler 3.9.7.

Thanks!
Antony.

(The single input I've shown is part of a large search function that looks like the image below, and contains all the other inputs referenced in the flow. They all have a dmx-on:updated to run the flow, and they all stop working at the same time...)

search

Hi Antony,
It's quite hard to answer this :slight_smile: Can you check in your browser dev tools if the server action is actually called/loaded (when this problem occurs) or is it even not called by the flow?

BTW, we are about to release Wappler 5 in the very near future :slight_smile:

Hi there @Teodor…

Thanks for your reply! Yes, I sense this is hard to answer, so I am grateful for your being able to ask me questions about the kind of things to look for.

The server action is not being called, so the problem is either:

  1. The dmx-on:updated is no longer triggering
  2. The flow is choosing not to run
  3. The flow is choosing not to execute the server connect.

And no errors in the browser dev tools > console?

Correct, nothing is reported there…

Maybe @patrick has some ideas about debugging this

1 Like

@Antony I know you are hesitant to upgrade, but the performance upgrades done recently may in fact solve the issue here.

I was battling a hard to reproduce issue that plagued me for many moons – turns out it was evident only on slower devices. I think sometimes these intermittent errors are just a result of dmx trying to do too much – sometimes it works, then all of a sudden it doesn’t. The performance updates eliminated the problem immediately and permanently.

Just something to consider.

2 Likes

Thanks for that idea @mebeingken!

That is an option… although I read the post where I need to make lots of changes to dmx triggers as they now operate too fast compared with before… :sweat_smile:

So it will be interesting to see whether @patrick thinks it is related or not…

I don’t know why it should stop working, perhaps there is a case where the flow keeps running and it will not trigger until it was finished.

for debugging you can add onupdated="console.log('updated with value: ' + this.value)" to the input. It should log each time in the console when the input was updated, this way we know if the event is being triggered.

The flow has a data property running, use it to display show some progress indicator. If you try to run the flow while it was already running it should normally show an info message in the console.

It could also be some bug that already has been fixed with the latest version, since you are probably several versions behind it is difficult to say.