List of records not shown on mobile device

Hi,
I am very new to AppGyver. I started to connect a Postgres database using PostgREST. I was able to connect the database and its tables. I am now trying to list records following the published videos.

I got that working using the “list item” component. But the list to DB items is only shown in the Web-Apps preview. No luck on my iPhone. I can chose and see the page (Heading, text…), but the list containing the data - which I can see in my browser in the WebApp i- s not shown on the iPhone…

Many thanks for your help.

Cheers, Wolfgang

Hi @Wolfgang_Korosec ! I have not encountered something like this before – as a first step I would use the debugger to check that the data variable is actually populating when I run the app on a mobile device.

Hi Mari,
the debugger was not a great help - but maybe that is my fault.
I am using a self-signed certificate when running the Rest-API. Clould that be the root cause of the problem ?

Cheers, Wolfgang

Is there any data type conflicts? I have seen that cause this effect in the past.

@Wolfgang_Korosec On the “State” tab of the debugger you can see all your variables and their contents, it would be the first step to understand if the data is coming in at all or if it’s just not displayed right. There is a similar case here where data is coming in but it’s not being shown.

What’s your app ID (number in Composer URL) and what page is this occurring on?

Hi Mari
app ID: /builder/applications/224262/

Output of the debugger WebApp
STATE => DATA REFERENCE
{ 1 item
“customers1”:[…] 91 items
}
{ 1 item
“employees1”:[…] 9 items
}

Output of the debugger - App running on the iPhone
STATE => DATA REFERENCE
=>
{
1 item “customers1”:[]0 items
}
{
1 item “employees1”:[] 0 items
}
very strange…
The data source is using https and a self-signed certificate - could that be the reason ?

Best Wolfgang

*** PROBLEM SOLVED ***
The self signed cerificate was causing the problem !!!

I moved the system to an AWS EC2 free tier VM. On AWS caddy is able to load a vaild Let’s Encrypt certificate.

So, here comes my receipt for a free, Open-Source Appgyver backend:

  1. AWS EC2 t2.micro (free) instance running Ubuntu 20.04
  2. Postgres as database
  3. PostgREST as restful database API https://postgrest.org/
  4. Caddy as reverse proxy to connect to the AppGyver Apps https://caddyserver.com/
  5. https://www.noip.com/ as free DYNDNS service

Is anybody working with that or a similar setup ?
Looking forward to your feedback !

Best regards,
Wolfgang

@Wolfgang_Korosec, how did you manage to use the Get record API? I try to use Postgres based Supabase, and just can’t fetch a single recor in AppGyver. This is my case:

Hi Artem_Dzyuba
I am using Postgrest ( https://postgrest.org/ ) not Supabase.
You can switch return values between array and single record using a HTTP Header Key: Accept Value: application/vnd.pgrst.object+json
See: Tables and Views — PostgREST 9.0.0 documentation
Maybe there is a similar concept in Supabase…

Good luck and best regards
Wolfgang

1 Like

Thank you, this works!