SAP Builders Discussions
Join the discussion -- ask questions and discuss how you and fellow SAP Builders are using SAP Build, SAP Build Apps, SAP Build Process Automation, and SAP Build Work Zone.
cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong image in repeated containers (SEVERAL BUG)

ramg
Explorer
0 Kudos

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)

WhatsApp Image 2024-03-06 at 10.54.06.jpeg

Version with the bug:

ramg_0-1709733531668.png

The app ID is 49364

SAP team, can you please review it?

Thank you

10 REPLIES 10

ramg
Explorer
0 Kudos

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

ramg
Explorer
0 Kudos

Same problem in IOS build (tryied in testflight) 😭

WhatsApp Image 2024-03-06 at 12.28.01.jpeg

0 Kudos

More info about this bug. Anyone here can suggest a workaround?

This is the configuration of the background of the container.

ramg_0-1709753307430.png

ramg_1-1709753391948.png

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

 

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

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?

 

 




--------------
See all my blogs and connect with me on Twitter / LinkedIn

0 Kudos

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.

marihirvi
Product and Topic Expert
Product and Topic Expert
0 Kudos

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?

0 Kudos

Marihirvi. Hello.

Here the screenshot.

ramg_0-1709824747839.png

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)

ramg_1-1709824956153.png

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.

 

 

ramg
Explorer

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

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

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.




--------------
See all my blogs and connect with me on Twitter / LinkedIn

0 Kudos

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