Mobile app - Wappler back end - server connect not returning any data

Hi,
Wappler node.js backend and creating a mobile app (separate project).

I have the login working as it returns Identity correctly -
CleanShot 2021-04-29 at 09.21.42
(thats is the user id and it changes with whichever user I log in as so assume it is working)

And then redirects to another page, so all good there (thanks @brad).

Now when I try to load some information on the new page (server connect to an API that works on the backend) I am not getting any results.
Turned on debug and I am seeing the following:
CleanShot 2021-04-29 at 09.19.19
I have tried the API with and without a security provider, by using the user ID as a parameter, anything else I can look at?
It works fine in the backend loading all the data and querying it by user permission etc but not through the mobile app.
Any pointers on what I should be looking at?
Thanks, Paul

[Object Object] normally occurs with a duplicate or invalid variable/ id. What is the column name?

Hi Hyperbytes,

Here is the full response for a test Server Connect response getting user info based on the login:

And I am calling this on successful login.

Are you sure you have not enabled the debug option for your database query step?

Hi Teodor,

Yes I have debug on to see what is happening. If I turn it off and use the security bearer I get:

{“identity”:false}

Sorry should have posted this earlier, here is the back end api for getting user details:


Very straightforward, query the user table based on the logged-in user (security identify).
I have turned off debug now as the information didn’t help.

Then in the app project, I have a server connect:

Which I load once the login is successful:

I assume the login is successful as I get {“identity”:1} as the response (and the number changes depending on the user I logged in as) and the page changes (also if I give an incorrect username etc, I get the alert I have setup).

What is odd is that it works with the test pages on the backend project, but not on the login of the app project.

Thanks, Paul.

What got me at first is you have to make sure your API project in Wappler is set to production before you add the server connect to your mobile app.

Hi Brad,

REALLY? Not even staging? Wow, that is a hidden nugget.

So can I just change the usage in Project Settings back and forth between development and Production in my Devlopment Target?

It has to be set to production and your target must be a live server.

Ok, used my staging server, changed it to production (so live remote server, usage set as production).
Changed the login and first server connect to the staging server.
Tested and got:

userdetails is the name of the query in my server connect step.
The user ID is correctly being added to a session variable and the login stage is also returning the “identity” correctly.

Anything else I can check.

Did you add your server connect to your mobile project before or after you changed target of your API. You need to add it after as the path won’t be correct.

Yes after, change back end deployed changes then change the app project and confirmed the update address was for the staging server.