So i had a problem with this error in one of my dynamic pages, and i thought it was a field or connection or something and i started deleting stuff.I ended up with almost nothing and still had this problem.
So i created a new dynamic page, and i added nothing, only this code

And i still get the error
I’m really confused on why this is happening…What can be wrong there?
Hi Maria,
This happens because you are calling the refresh method before the dataset is ready to do so.
You can fix this by using the dataset onReady API like so:
$w('#dynamicDataset').onReady(() => $w('#dynamicDataset').refresh())
We are working on fixing this issue - it will either work automatically or we will provide a correct error message.
I do have one question though - why are you calling the refresh method when the page loads?
Hello tomen and thanks for the answer.im doing this in attempt to debug the issue…i had this problem on my main page, an tried deleting fields, connections etc. And when the problem diddnt seem to be fixing i made a new dynamic page and tested the command on its own, and then i realised the problem was in this command and not in the rest of my code on the other page.