PostgreSQL data source Returning "Invalid Response Format"

Skuid Version:12.0.4

I can’t get a PostgreSQL data source to return any data. I’ve tried messing around with the javascript a bunch but any call I make to postgres from an actual running page returns  

Invalid Response Format
I know my connection is working because from the configure tab I was able to retrieve tables and fields dynamically from the database using the "Import Data Source Object" mechanism and from the page builder I'm able to create models from that data source. What's going on here? How can I debug this further?

Shmuel, sorry to hear you’re having trouble getting data to be returned. Does the SQL user that you’re connecting with have Read access on the tables that you’re connecting with? 

First step, I’d do the following — go to the “Network” tab in Chrome and refresh your Skuid Page. Look for an XHR request whose network endpoint ends with “load”, and then go into “Preview” the response, there is probably a “message” property in the response that will give additional information.

What fields / conditions did you configure in the Model?

Do’h! The SQL user did not have access to anything! I made a special role for skuid and didn’t give it access to anything. Granting it access to the proper database, schema, tables, and sequences fixed it. Somehow it had access to the table metdata (maybe some kind of default permission Heroku gave).


Notes from before I solved that:
I looked at the load XHR request before before I posted and didn’t notice anything strange. I just did it again. There are two load requests, one with a POST verb and one with an OPTION verb. The POST verb returns a json object with the table metadata (and it contains the correct metadata), the OPTIONS doesn’t have a previewable response.

I have no conditions and configured all fields from the table to be present in the model.


Some possible causes:

  1. When there's a field you include in the Model that doesn't exist in the Datasource Object. So maybe you delete a field in the DB but still have it on your Skuid page?
  2. You have child relationship or subquery conditions
General PostgreSQL datasource debugging tips If you have multiple Postgres models on the page, you should go to the Advanced tab, and uncheck "Request data in the same transfer as other Models", this way you can request each of the models separately, which helps with debugging and finding the "bad" model. 

Once you do that, open your Dev Console then reload the page with the Network tab open
Look for a request like this, and you can click it and look at the Preview tab. If you see models: null, then that’s probably your bad model. You should get more details there, something like lastQueryString which gives you the SQL statement that Skuid made against your db to query data, for example. 

Example response in the Preview tab looks like this. If yours says models: null, then it’s likely to get “Invalid Response Format” error on the Skuid page

hey, i was also looking for the same. thank you for the responses… it was helpful.
best regards!!!