Error Message: Before the data import for finished, its data source timed out. Double-check whether that data source can process import queries, and if it can, try again.
First let me get on the scenario before this error message came.
I published Power BI report with folder as data source. This folder is on my local computer. I want my data to get refreshed on schedule. For that I should have a gateway. I installed the personal gateway from here.
After installation, I setup the gateway by login to my account. On my dataset settings in Power BI service portal, I selected the personal gateway and clicked on edit credentials if any error on it.
Finally, I tried doing on demand refresh. It failed with the above bold error message. Did not find a suitable solution on the forums. Then finally did some trick.
Opened the gateway on the system. Clicked on Restart. Kept the gateway opened without closing the window. Refreshed the data, it worked. Now, closed the gateway window, again refreshed. It worked again.