1
App runs fine on iPhone client but not at all in AppGyver web preview
complete
R
Rainer Rodewald
iPhone client version 4.5.7, parser version 13.0.1
App ID: 443748
App has only one page. It has 3 dropdowns. Once a selection is made in every dropdown, a result list is shown (becomes visible, visibility is bound to a formula). All works fine on the phone, but in web preview the dropdowns are not filled properly, hence the app fails to work properly.
The app concept follows the AG sorting and filtering power-up video (https://www.youtube.com/watch?v=FA4o1aYY1aQ). The dropdowns are populated by a combined CONCAT (‘No selection‘) and MAP function. In the web preview, only the ‘No selection' appears, the rest does not. In the 3rd dropdown, one item appears in addition, instead of two.
Log In
Activity
Newest
Oldest
T
Timo Kapanen
complete
T
Timo Kapanen
under review
V
Vili Karilas
Hi Rainer Rodewald,
No worries, I managed to find the source of the issue - the HTTP Request flow function is missing its HTTP method. Setting it to GET should make things work. You can do this either in your custom flow function inputs (set method to GET) or in the HTTP Request node itself, you can change the method binding to "static text" and choose "GET" from the dropdown.
In your case, the app was getting stuck in an infinite loop of trying to get the data from the request. Because the method was missing, the third output of the HTTP request node always triggered, which causes the flow to loop again in 500ms as specified by the connected delay node.
Additionally, I noticed that some of the formulas used in you app were getting quite long, with multiple OR and AND statements. This could lead into issues in the future, as it can be hard to debug multiple combinations of conditions. All you need is one wrongly written statement and the entire formula can fall apart. As an alternative, consider using the SELECT formula function on the alllistings variable to filter it according to your filters. Here's an example start:
UNIQUE_BY_KEY(MAP(SELECT(appVars.alllistings, pageVars.MarkeFilter === item.fields.Marke && pageVars.KraftstoffFilter === item.fields.Kraftstoffart), {label: item.fields.Getriebeart, ...
Lastly, I'll illustrate how to debug things: in the image, I've attached the "debug log" flow function to almost all node outputs. If you're previewing the app on your phone, you can view these log messages in the Debugger console, and if you're using web preview, you can also use the browser console by pressing F12 (chrome) and choosing the console tab. These logs are especially helpful with complex flow functions such as HTTP request, as you can bind the debug log message to the the error code or status message that the Request outputs. It's also possible to log variables in this way.
Please let us know if this worked for you.

R
Rainer Rodewald
Vili Karilas: Hi Vili, thank you so much. I added the missing GET method and now it works fine. Thank you also for the help with the formula syntax, as it does get complicated sometimes. :)
The debugging I will try out later today.
I am very impressed by the quality and thoroughness of your support, it looks like you invested quite a lot of time and effort into this, which is awesome, so thanks again!
T
Timo Kapanen
Rainer Rodewald: great to hear that you have things working! Closing the ticket
V
Vili Karilas
Hello Rainer Rodewald,
I took a look at your app and saw that you're using a HTTP request to bind to get data to an app variable that's then used to populate the dropdown. Can you check if the HTTP request works properly on web, getting the data and populating the app variable? You can either use the debugger, or install the "debug log" flow function from the marketplace and then use your web browser's console to inspect the returned values / app variables.
R
Rainer Rodewald
Vili Karilas: Hi, and thanks for helping me. I'm new to programming and I am not very experienced with the console. Where do I need to look for the variables being filled or not? I have seen though that the data coming via the API is being downloaded. I could also send a screenshot if that helps. Thanks!