Today I created a new server on Vultr Cloud and added that as a custom server in the Resources Manager. The server has been correctly added and I have successfully deployed an existing project on the server.
However, I have noticed that all the repeat steps in the server APIs have stopped returning any data. The other steps are returning data correctly, but the repeat steps are returning empty arrays. There are no errors in the dev console. The only difference between working and non-working deployments is the deployment of this project on a custom server. Any help in resolving this issue is greatly appreciated.
There are no errors in the network or console tab. The database has records. The project is running correctly on another remote server. This is an issue only on the new custom server.
All the other API steps are returning data correctly. It’s only an issue with the repeat steps in all the APIs.
How the repeat works is based on the Wappler’s core files. Double check on the server if the files have been transferred correctly.
The repeat step is working without any exceptions, so point 1 is probably not applicable. The source of the repeat step is a query. Enable output for that, and check if the query is returning the value as expected of not. Could be some firewall on the Vultr server, or on the DB server, not allowing to access DB correctly.
View the logs of the remote server, just like the logs are shown in Wappler. You will have to SSH into the server and run some commands. If you are running the application over docker in the new server, try installing Portainer to easily view the logs on the browser.
Thanks for the suggestions. I will check these, especially the second point about checking the source query for the repeat. I will update the post after running these checks.
Can you post a screenshot of the repeat step? Have you made sure the output is set to ‘exclude’ with an empty field list? (Or include and the fields you want outputting added to the list)
The repeat steps have been setup either with include and fields or exclude and empty field list. Both repeats are failing. These are the screenshots of the API steps and output in dev console.
There’s no error in the dev console and all the APIs are working correctly on another remote server. The only difference is that these repeat steps are failing on the server that has been added as a custom server in Resources Manager.
if the rpt_listcountry_timezones has also 418 records
if you disable these setValues inside the repeat (that pull theeir values from the query) and just add a new one for test for example indx=$index and output it, will you get 418 records
(with indx = from 0 to 417)?
If the above steps are ok then probably the query setup is not combatible with the new server…
(I suppose )
@famousmag Interesting! The set Value inside the repeat is getting a correct value of the $index.
So, it seems there’s an issue with the new server not compatible with the query setup, when the server has been setup as a custom server in the Resources Manager.
That’s what I think is happening. The custom server details in the project.json file are missing many details when compared with the server added from the available service providers such as Linode.
Custom server details in the project.json file. There’s no ssh_key record associated with this entry in the file along with other details such as server id, region, server specs etc.
Project.json is just for Wappler to understand the project. It does not have any impact on the deployed application.
Although, if Wappler is reading and filling information in some production target file, that could impact the remote server.
One other idea: Add a insert-query step, and log the $value inside repeat.
We recently had a situation where being inside repeat, Wappler would refuse to access properties of repeat-source directly. But when doing the same with $value.xxx it would work.