# Homeyscript: running a push confirm flowcard times out after 30s

**URL:** <https://community.homey.app/t/homeyscript-running-a-push-confirm-flowcard-times-out-after-30s/70583>\
**Category:** Questions & Help\
**Created:** [October 15, 2022, 10:07pm UTC](https://community.homey.app/t/homeyscript-running-a-push-confirm-flowcard-times-out-after-30s/70583 "2022-10-15T22:07:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 15, 2022, 10:07pm UTC](https://community.homey.app/t/homeyscript-running-a-push-confirm-flowcard-times-out-after-30s/70583/1 "2022-10-15T22:07:07Z")

</div>

Hi guys & girls,

I have this script, which starts a flowcard “send a push confirmation to userX”;  
it works well, but it times out after 30s already when there’s not been a response yet.  
However, the ‘real’ flowcard “send a push confirmation to userX” times out after 30 minutes (which seems reasonable).

Any thoughts?

`Error: at Timeout._onTimeout (/node_modules/athom-api/dist/index.js:1:1318770)`  
`at listOnTimeout (node:internal/timers:559:17)`  
`at processTimers (node:internal/timers:502:7)`

Code:

```auto
const response = await Homey.flow.runFlowCardCondition({
        uri: 'homey:manager:mobile',
        id: 'push_confirm',
        args: {
			    user: {
			    athomId: 'myUserAthomID'
		    	},
		    text: 'Test push confirmation from HomeyScript test-push_confirmation.js'
        },
      });

// This is used to catch the Yes or No returned by user 
const obj = response;
const params = new URLSearchParams(obj).toString();
let result = params.slice(49,54)

//console.log("Result: " + result);

    if ( result == "false" ) {
    return(false)
    }
    else
    return(true)
  }

```

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [October 16, 2022, 5:24am UTC](https://community.homey.app/t/homeyscript-running-a-push-confirm-flowcard-times-out-after-30s/70583/2 "2022-10-16T05:24:19Z")

</div>

> [@Peter\_Kawa](#):
>
> Any thoughts?

HomeyScript scripts are not intended [to run longer than 30 seconds](https://github.com/athombv/com.athom.homeyscript/blob/eb92bffee1974327060fbd5c76a10f096ee24805/app.js#L18). That’s hardcoded in the app.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 16, 2022, 5:08pm UTC](https://community.homey.app/t/homeyscript-running-a-push-confirm-flowcard-times-out-after-30s/70583/3 "2022-10-16T17:08:44Z")

</div>

Allright then hehe. Thanks Robert.  
Makes sense, but I didn’t know that fact yet.
