cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Can't bind custom CDS 2.0 entity to app - Error: BadGateway

PowerApps Version 3.18052.12

Instance version 9.0.2.192

 

Hi All,

 

After creating custom CDS entities, I receive an error when attempting to add the newly created entity as a data source to an app.

 

The error I receive each time is the same with the exception of the clientRequestID, debugInfo and Session ID and reads like this:

 

{
  "error": {
    "code": 500,
    "source": "msmanaged-na.azure-apim.net",
    "clientRequestId": "8dbc51d5-ba1d-4217-9c5c-8d48fdb94eaf",
    "message": "BadGateway",
    "innerError": {
      "status": 500,
      "message": "Object reference not set to an instance of an object.",
      "source": "commondataserviceconnectionprovider-westus.tip0-westus.p.azurewebsites.net",
      "debugInfo": "clientRequestId: 8dbc51d5-ba1d-4217-9c5c-8d48fdb94eaf"
    }
  }
}

 

 

I had completed the process of adding all of the 41 fields of my schema and saved the entity (adding and saving in batches of approximately 8-10 fields at a time). Next, I went to add the entity to an app and got the aformentioned error. I opened a support ticket, but am still awaiting a response as it gets escalated.

 

In the meantime, suspecting perhaps this had something to do with creating and saving fields in batches, I created a second custom CDS entity and began adding fields one-at-a-time, saving the entity after each field that was added. After each SAVE, I would test to make sure I could bind the entity to an Edit Form and was successful up through the first twenty-one fields before receiving the error. I'm unable to use either of the two custom CDS entities as they both appear to have some form of corruption.

 

Approximately five weeks ago, I experienced this same exact issue. However, the hasty solution provided by tech support at that time, was to delete the environment and provision a new one. Clearly, this problem was not unique to the environment, as it has happened to multiple entities in two separate environments now.

 

Has anyone else experienced this? Any suggestions for a fix would be greatly appreciated.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @bsimons,

 

I wanted to follow up my last post with an update, so anyone else reading this thread will know what the ultimate solution was.

 

You were correct in identifying the cause of the problem. However, my statement that I was not 'using' the CDS Experimental connector was also correct. I wasn't attempting to connect any apps to data sources via the Experimental connector. However, evidently, even the mere presence of the Experimental CDS connector in my environment during the time that I created the two custom entities, was the cause of the error.

 

The solution was to delete the Common Data Service (Experimental) connector from the environment and delete the affected custom entities. Then, re-create the custom entities with the Common Data Service (Premium) connector present in the environment.

 

Since taking these steps, the problem has disappeared.

 

Thank you for identifying the cause of the problem.

 

Chris

View solution in original post

5 REPLIES 5
CWesener
Power Apps
Power Apps

Adding @bsimons from the Connector team.

Thanks,
Clay.
bsimons
Power Apps
Power Apps

Thanks providing the debug details.  We will take a look.

 

bsimons
Power Apps
Power Apps

Hello @DChrisPhillips

 

It appears that you are trying to use the CDS (Experimental) connector against an updated CDS instance.  Please use the Common Data Service connector instead of the experimental connector.  That should resolve your issue.  

 

-Brandon

Hi @bsimons,

 

Thanks for the speedy response.

 

 

I double checked the environment's connectors and it was showing that I was using the CDS Premium connector. However, just to make sure, I deleted the connector, created a blank app, and attempted to connect to my custom entity. I got the same error. The CDS Premium is the only connector I have connected to the environment. I've attached a couple screenshots of the data connection.

 

I've never actually used the Experimental connector. That said, I once added the connector, because I wasn't sure which one I was supposed to use. Ultimately, I deleted it because no entities show up to choose from (see third screenshot). Once you enter the Environment ID, you get the screen where there would normally be entities to choose from. 

 

Is it possible that the problem was initially created by once having merely attempted to connect via the Experimental connector?

 

To be clear, I've removed all connectors and selected only the CDS Premium connector and I'm still getting the error.

 

Thanks,

 

Chris

 

Hi @bsimons,

 

I wanted to follow up my last post with an update, so anyone else reading this thread will know what the ultimate solution was.

 

You were correct in identifying the cause of the problem. However, my statement that I was not 'using' the CDS Experimental connector was also correct. I wasn't attempting to connect any apps to data sources via the Experimental connector. However, evidently, even the mere presence of the Experimental CDS connector in my environment during the time that I created the two custom entities, was the cause of the error.

 

The solution was to delete the Common Data Service (Experimental) connector from the environment and delete the affected custom entities. Then, re-create the custom entities with the Common Data Service (Premium) connector present in the environment.

 

Since taking these steps, the problem has disappeared.

 

Thank you for identifying the cause of the problem.

 

Chris

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (3,134)