2024 Mar 06 1:21 PM - edited 2024 Mar 06 1:59 PM
Hello. I have repeating containers with a background image.
The images are obtained from an API and in each container, they are taken from different URLs.
In the preview application, the images are not taken correctly and the same image is always repeated.
I thought it was a bug in the preview app, but it happens also in the compiled version of Android (I haven't tried it on IOS yet).
The bug is several months old and is really serious, since it does not allow a functional update to be generated.
This screen captures shows the problem.
Working well (previous version)
Version with the bug:
The app ID is 49364
SAP team, can you please review it?
Thank you
2024 Mar 06 2:35 PM
The same problem when using repeated image instead of repeated container background.
Checking the files API, and the solicited URL is correct.
Please. Is urgent !!
Thanks
2024 Mar 06 3:31 PM
Same problem in IOS build (tryied in testflight) 😭
2024 Mar 06 7:31 PM
More info about this bug. Anyone here can suggest a workaround?
This is the configuration of the background of the container.
This exact config is working in production to the same API, using the same URLs.
I am waiting for this to release a new version, that is critical ASAP.
Thanks
2024 Mar 07 5:50 AM
The icon for each team (?) is what you are saying is a container background?
I assume the matches (?) are repeated, but are the teams in each match also repeated?
Is the API and the project something you can share?
You're saying the exact app was working a month ago and now not?
2024 Mar 07 1:59 PM
Hi Dan.
The icon for each team (?) is what you are saying is a container background?
Yes. Each team has a logo. The image logo is taken from a file API, and the URL is taken from a repeated variable. The behaviour is the same, using the image as a bakground of a container or using a image component.
I assume the matches (?) are repeated, but are the teams in each match also repeated?
Matches are not repeated. The name of the team is presented correctly. The problem exists on the images.
Is the API and the project something you can share?
I don't understand this question.
You're saying the exact app was working a month ago and now not?
No. I have and older version of the app in production working as expected and has more than a month. Maybe 4 or 5 months. But the file API didn't change and the structure of the repeated containers is the same as the production one.
This problem appears same time ago in the preview app and was reported in the older discussion board and I think also in older bug report system.
2024 Mar 07 9:29 AM
Hi @ramg, a screenshot of the structure of the repeated list would help a lot to understand what is happening and to reproduce the bug if there is one. Is it OK that the formula always points to the first item at index [0] in "Equipos" list?
Could you repeat for debugging purposes a text element from the same list, so that we can see if the problem is in the URL being generated in the wrong way or in the app not reading the URLs correctly?
2024 Mar 07 3:35 PM
Marihirvi. Hello.
Here the screenshot.
The repeated component is Fila resultados. The Container with the background image is Contenedor logo inside a cell "Celda locatario". It is another in a cell "Celda visitante".
In the image below you can see that there is the same logic on a text component, and the behaviour is the expected (the team name)
About the Equipos list index. It's correct. Equipos has two object elements. The teams logo and name are (Locatario in index 0, Visitante in index 1). Here a JSON of that structure.
{
"Resultados":[
{
"Campeonato":"Uruguayo 2023",
"Fecha":"13",
"Categoria":"2010",
"Equipos":[
{
"Nombre":"Academia FRM",
"Logo_url":"https://#####db3810aa",
"Resultado":"1"
},
{
"Nombre":"City Park",
"Logo_url":"https://#####32d4815c",
"Resultado":"5"
}
]
},
{
"Campeonato":"Uruguayo 2023",
"Fecha":"13",
"Categoria":"2010",
"Equipos":[
{
"Nombre":"América",
"Logo_url":"https://#####4a44b9f2",
"Resultado":"1"
},
{
"Nombre":"El Bosque",
"Logo_url":"https://#####2fcb38aa",
"Resultado":"0"
}
]
},
{
"Campeonato":"Uruguayo 2023",
"Fecha":"13",
"Categoria":"2010",
"Equipos":[
{
"Nombre":"Carrasco Lawn Tennis",
"Logo_url":"https://#####6968e0b4",
"Resultado":"2"
},
{
"Nombre":"Old Boys",
"Logo_url":"https://#####ce3a3ae2",
"Resultado":"0"
}
]
}
]
}
Could you repeat for debugging purposes a text element from the same list, so that we can see if the problem is in the URL being generated in the wrong way or in the app not reading the URLs correctly?
As answered previously, I am using the field "Nombre" of the same repeated data in a text element, and that works perfect.
Also I check the requested URL's in my API server side, and the requested URL is correct. The problem resides when the image is draw. Looks like a cache problem.
2024 Mar 08 2:28 PM - edited 2024 Mar 08 8:08 PM
I found the problem @marihirvi and @Dan_Wroblewski
The bug is on the image automatic cache in SAP Build Apps implementation.
The URL: https://example.com/abcd/1 is the same of https://example.com/abcd/2 for cache purposes.
But there are different, https://example.com/1/abcd than https://example.com/2/abcd
Because I am using the first type of URL's, both images are the same (when not).
I think, I don't know when, the cache system changed to consider the last part of URL ( /1 in the examples) and not the whole URL.
Now I can fix it in my app, building a new release changing the scheme of URL formatting. But, let me say that the bug exists.... and I hope you can fix it.
I make a simple app just to show what's the problem. App id 88909
Thanks
2024 Mar 10 8:21 AM
I have a repeated list item, and for the image I use random images.
If I make the URL "https://picsum.photos/200/200", indeed, all the images will be the same because the images are cached.
Buf if I make the URL "https://picsum.photos/200/20" + repeated.current.ProductID --> meaning the URL is the same except for last part, than I in fact get different images. The same is true if I make the last part the same but the middle different, like this "https://picsum.photos/20" + repeated.current.ProductID + "/200".
Seems like the same case as yours.
2024 Mar 10 3:37 PM
Dan.
Looks like the internal cache considers the last part of a URL (after the last "/") as the filename, and that what is cached.
The bug solution should be to cache the entire URL as filename.
Thank you for your analysis.
Ramiro