#Some more problems since the recent updat

1 messages · Page 1 of 1 (latest)

half anchor
#

I keep getting an error message as displayed on the attached pic.

The referenced script does not appear on this page so shouldnt be causing any issues.

I also cannot navigate to another page on row selection as the error pops up again.

As you can see from the pic, there is very little info as to why this error is appearing. It did not appear until the update earlier todayp

grave sailBOT
#

Hey There,

We've registered your query, and our team will get back to you soon.

Regards,
Team Appsmith

grave sailBOT
#

Can you please share this app with us to debug this scenario? Add
[email protected] as a Developer and send us the link to it.

half anchor
#

@grave sail this app contains my personal financials which I cannot share

grave sailBOT
#

Could you try to reproduce this behavior in a toy app for us to look at?

half anchor
#

@grave sail I am getting the same error appearing on a different app.
I went into the editor for a totally different app and getting the same error

half anchor
#

Infact, the app is also in a different workspace and getting feeds from a different database

grave sailBOT
#

Can you try clearing your browser cache?

half anchor
#

@grave sail Earlier the issue was on the computer in the office, I ma now using a different computer and having the same issue

grave sailBOT
#

Understood. Let me raise this to the team.

half anchor
#

@grave sail I think it might have something to do with the following function

export default {
updateBalance: async() => {
await setInterval(() => {
Balance.run()
storeValue('balance', Balance.data[0])}, 10000);
}
}

Although I cant figure out why it would flag up on a different app in a different workspace

Is there a better way to write the function?

#

On a different page and as you can see from the pic, the JS referenced is not on this page

grave sailBOT
#

Hey Paul! The problem here is that, if you don't terminate the query run by
using clearInterval, it continues to run even if you leave the page. This
happens due to this bug: https://github.com/appsmithorg/appsmith/issues/15910
To avoid that error, depending on your use case, you will have to either use
clearInterval() or copy the query to the other pages as well if you want to keep
it running.

GitHub

Is there an existing issue for this? I have searched the existing issues Description When callback functions inside a setInterval are triggered to run and are not terminated by clearInterval, then ...

half anchor
#

@grave sail I have added clearInterval but I am still getting the errors appearing

grave sailBOT
#

When did you trigger clearInterval? Do you mean that it continues to run after
clearing it?

half anchor
#

@grave sail Im trying to debug just now, not sure what the problem is at the min, ill reply once i know a bit more

grave sailBOT
#

Ok. Keep us posted.

half anchor
#

@grave sail Cant figure it out...

The function that I am using to setInterval is

export default {
updateBalance: async() => {
await showModal('Modal1')
await setInterval(() => {
Balance.run()
storeValue('balance', Balance.data[0])}, 10000, "AddBalanceTimer");
}

And to clearInterval I am using

export default {
updatePage: () => {
clearInterval("AddBalanceTimer")
navigateTo('Trade');
}
}

grave sailBOT
#

Ok. And when do you stop the interval?

half anchor
#

@grave sail the interval stops when I leave the page. Either by saving the entry or pressing the back button. I have added clearInterval("AddBalanceTimer") to the Scripts for both

grave sailBOT
#

Could you share some screenshots of the code in the events that trigger the
clearInterval method and maybe a loom.com screen recording to show the issue in
action?

half anchor
#

@grave sail I havent noticed the issue today. Im not sure if it maybe took some time for the issue to settle after introducing the clearinterval function. I will keep an eye on this

grave sailBOT
#

Ok. Please keep us posted.

half anchor
#

@grave sail the issue still seems to be happening. where should I send an export of the app for you to check?