Query error "failed to fetch" based on query naming?!

I was encountering a weird error in a module I was building where a query was returning an error without any specifics just saying "failed to fetch".

I tried replacing the variables, the resource, everything else. What finally solved the problem is actually even weirder. The name of the query in the editor was "replace_ad_image_element_with_alternative". If I took out the word "replace" at the beginning the query suddenly worked?!

I thought it might have to do with double naming across my account but actually its gets even weirder. Certain letters of the word replace are enough to make the query fail?!

replace_ad_image_wi => failed to fetch
replac_ad_image_wi => failed to fetch
rep_ad_image_wi => failed to fetch
ad_image_wi => success!
qwuuinoqiwnqowine_ad_image_wi => success!

Evidence:





I would add more context about the app I was working on but this makes so little sense to me that I am not even sure what :sweat_smile:

tried more things:
replacead_image_with_alternative => success

it's expanding...


Hello @henrikad!

Apologize for the odd query behavior. I haven't seen anything like this before :sweat_smile:

If I may ask, are you self hosting Retool or on the cloud? And if you are self hosting, which version are you on?

My first guess was that this might be related to the query coming from the query library. I haven't see a 'failed to fetch' error message but my hunch is that the module is fetching the query's data from the query library and that might be where the disconnect is occurring :thinking:

If you set up the same query locally to the app/module and not inside the query, do you still get the issue where the string of 'replace' in the query name causes the 'failed to fetch' error message? :crossed_fingers:

I tried to reproduce the bug on cloud using a button inside a module that on click would trigger a query from my query library to run, passing in params from a text box component to the query, which is just a REST API query that get country data.

I added in the word replace at the start of my query and didn't get any errors. Let me know if I might be missing a step.

My suspicion is that updating to the latest version if you are not on cloud or moving the query to be local and not in the query library might solve the naming issue for you

Thanks for the reply @Jack_T, i'm using cloud and the behaviour only occured, when using it from the query library.

I get that the problem is so unusual that it's unlikely you will be able to recreate it. I made the post more as a public service for someone potentially encountering this in the future.

1 Like

Hi @henrikad thank you for letting me know.

We appreciate the thought and hope that sharing this can help other users than run into the same issue.

The query library does have some known bugs we are working, but this is quite unique :sweat_smile: