First of all I appreciate that the Workflow feature is in beta.
Main problem I'm having is that my workflows seem to succeed happily when I run each step in succession but as soon as I leave it to the scheduler, the jobs fail and the logs don't tell me what happened.
This isn't just happening on one workflow but rather all of my workflows. The pattern is that they all fail when calling an external API, in this case, ServiceFusion. It's quite possible that the process of calling the external API is different when run by the scheduler rather than by the user but the issue I have with Retool is that the Logs are not doing their job.
I've tried various things like reducing the frequency of the workflow and also reducing the quantity of data it handles. I've not managed to find a clear pattern. Sometimes I will get the workflow to work consistently for hours only to log back in the next day to find it failed again. Not sure if this is some sort of authentication issue or whether it's just that the some data is throwing an error.
So yeah... please can someone offer some guidance as to how to see the actual problem. The only real error I have to go on is one that appears in the console but it's clearly a Retool thing and nothing to do with my code.
GET /api/resources/76c46546-d8b6-4381-8760-9d74ecb66fa7/schema?environment=production&action=workflows 400
Uncaught (in promise) Error: cannot fetch schema
at Generator.next ()
at a (app.4478f322cdc0edb68fb8.js:2:2826946)
This definitely looks like a bug. I’ve filed it and added a couple tickets to it already, will add this one as well. Hopefully we can get this addressed soon🤞 in the meantime, I’ll ask about any timelines we can share!
As a quick sanity check, might this be an issue of Workflows running on the server side when running automatically vs running on the client side when manually run? Does this auth work consistently when manually run vs when scheduled/automatic?
Sadly not, I've yet to establish any reliable way of replicating the issue, it's intermittent.
I can't be sure without actually seeing the error message but I'm all but convinced the error is actually not in Retool at all and it's actually the third party API refusing or timing out and Retool is not handling the error properly / visibly