Public app can't call workflow

As far as I know this became broken in the last couple of days. I am normally working in the IDE and am therefore authenticated but a colleague is normally using the public URL to access the app and he just stumbled into this problem this afternoon and this is a very common action so we are pretty sure we would have noticed if it was broken yesterday or earlier.

The problem is this:

  1. User is accessing app using public URL.
  2. User action calls a Resource Query where the resource is Retool Workflow.
  3. A request to login is triggered.

If the user is already logged in no problem. Basically public apps can't call workflows at the moment.

So far we are pretty sure more than one Workflow is doing the same thing.

I did "rotate the API key" and redeploy on one workflow but that did not fix anything.

EXPERIMENT:

I converted it from a workflow query to a rest API query. And finally got that working inside the IDE. Now to test from a public session....

That fixes the problem. In other words:

If the Resource is a Retool Workflow unauthenticated browsers throw the logon page.

If the Resource is a REST API query unauthenticated browsers call the workflow and get back a result.

This is BAD and/or extraordinarily inconvenient and definitely this is new behavior.

In the chrome debugger I see this call:

https://methodical.retool.com/api/pages/uuids/e298afa3-cc53-4404-96ea-58f704e5c4c0/runWorkflowFromRetoolApp

Followed by Failed to load resource: the server responded with a status of 401 ()

Which make sense because this is a public user who is not logged in. The question is how is this suppose to work and why does it work sometimes and not others.

My colleague just reports "success" in the last hour. However it still fails for me in an incognito mode browser. And then it failed again for him later.

2 Likes

@Roland_Alden instead of directly triggering the workflow, use REST API connection to trigger the workflow.
Create a REST API resource that sends a post request to you workflow. This solve these issue for my case.

If this works for you as well, please mark as solve so that others can find the solution easily.

Hi Roland,

Thank you for posting about this! Our on call team investigated and has a fix. I've enabled the fix for your organization. Let me know if you're still seeing anything unexpected

For others following along, the fix should be going live to all organizations soon

3 Likes

Hello @Tess - I'm experiencing the exact problem here - could you please enable the fix for my organization too?

Thanks!

It would also be nice to know exactly what this bug is(was) and why it seems to be intermittent and what the fix is.

Hi there,
The fix has been enabled for all orgs. We had a feature flag that wasn't enabled or being used, and another update that we made caused the feature flag to become enforced. I'm not sure why it would have been intermittent since it seemed like the feature flag needed to be checked on. Rather than rollback the other update, we did some testing on the feature flag, and then enabled it for all orgs.

3 Likes