cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resident Rockstar
Resident Rockstar

Random Gateway Error 502:

I have had 2 failed flows in the last week.  They are in different flow routines.  None happened more than once.  They are "Gateway Error 502".  I rerun, and they work.  This may be a dealbreaker issue.  When i'm notified of an error, it is too late.  I cant rerun, becasue the Sharepoint item may have had further action, and my re-running this flow would not work properly.  I need to know why this is happening.  I need to rely on this.  Random weird errors cannot be tolerated.

 

This one is from List Group Members

 

{
  "error": {
    "code": 502,
    "source": "msmanaged-na.azure-apim.net",
    "clientRequestId": "56e563a1-996a-42a4-97af-b2973bd080aa",
    "message": "The response is not in a JSON format.",
    "innerError": "<!DOCTYPE html>\r\n<html>\r\n    <head>\r\n        <title>Object reference not set to an instance of an object.</title>\r\n        <meta name=\"viewport\" content=\"width=device-width\" />\r\n        <style>\r\n         body {font-family:\"Verdana\";font-weight:normal;font-size: .7em;color:black;} \r\n         p {font-family:\"Verdana\";font-weight:normal;color:black;margin-top: -5px}\r\n         b {font-family:\"Verdana\";font-weight:bold;color:black;margin-top: -5px}\r\n         H1 { font-family:\"Verdana\";font-weight:normal;font-size:18pt;color:red }\r\n         H2 { font-family:\"Verdana\";font-weight:normal;font-size:14pt;color:maroon }\r\n         pre {font-family:\"Consolas\",\"Lucida Console\",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}\r\n         .marker {font-weight: bold; color: black;text-decoration: none;}\r\n         .version {color: gray;}\r\n         .error {margin-bottom: 10px;}\r\n         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }\r\n         @media screen and (max-width: 639px) {\r\n          pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }\r\n         }\r\n         @media screen and (max-width: 479px) {\r\n          pre { width: 280px; }\r\n         }\r\n        </style>\r\n    </head>\r\n\r\n    <body bgcolor=\"white\">\r\n\r\n            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>\r\n\r\n            <h2> <i>Object reference not set to an instance of an object.</i> </h2></span>\r\n\r\n            <font face=\"Arial, Helvetica, Geneva, SunSans-Regular, sans-serif \">\r\n\r\n            <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.\r\n\r\n            <br><br>\r\n\r\n            <b> Exception Details: </b>System.NullReferenceException: Object reference not set to an instance of an object.<br><br>\r\n\r\n            <b>Source Error:</b> <br><br>\r\n\r\n            <table width=100% bgcolor=\"#ffffcc\">\r\n               <tr>\r\n                  <td>\r\n                      <code>\r\n\r\nAn unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>\r\n\r\n                  </td>\r\n               </tr>\r\n            </table>\r\n\r\n            <br>\r\n\r\n            <b>Stack Trace:</b> <br><br>\r\n\r\n            <table width=100% bgcolor=\"#ffffcc\">\r\n               <tr>\r\n                  <td>\r\n                      <code><pre>\r\n\r\n[NullReferenceException: Object reference not set to an instance of an object.]\r\n   Microsoft.Online.AggregatorService.Common.Gateway.AgsIndexConfigProvider.GetConfigVersionNumber(String configType, String configId) in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\AgsIndexConfigProvider.cs:64\r\n   Microsoft.Online.AggregatorService.Common.Gateway.ConfigurationProvider`1.GetConfigurationImp(String identifier, Boolean useCache) in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\ConfigurationProvider.cs:389\r\n   Microsoft.Online.AggregatorService.Common.Gateway.ConfigurationProvider`1.GetConfiguration(String identifier, Boolean useCache) in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\ConfigurationProvider.cs:108\r\n   Microsoft.Online.AggregatorService.Common.Gateway.GlobalContext.TryGetConfigurationItem(String identifier, TConfigItem&amp; item) in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\GlobalContext.cs:324\r\n   Microsoft.Online.AggregatorService.Common.Gateway.GlobalContext.GetAgsRootConfig() in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\GlobalContext.cs:276\r\n   Microsoft.Online.AggregatorService.Common.ThrottleClient.GetThrottleEndpoint() in e:\\bt\\923520\\repo\\src\\dev\\Common\\Throttling\\ThrottleClient.cs:577\r\n   Microsoft.Online.AggregatorService.Common.ThrottleClient.Initialize() in e:\\bt\\923520\\repo\\src\\dev\\Common\\Throttling\\ThrottleClient.cs:129\r\n   Microsoft.Online.AggregatorService.WebService.Global.Application_Start(Object sender, EventArgs e) in e:\\bt\\923520\\repo\\src\\dev\\WebService\\Global.asax.cs:120\r\n\r\n[HttpException (0x80004005): Object reference not set to an instance of an object.]\r\n   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +535\r\n   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +166\r\n   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +169\r\n   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +372\r\n   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +329\r\n\r\n[HttpException (0x80004005): Object reference not set to an instance of an object.]\r\n   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +525\r\n   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +118\r\n   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +708\r\n</pre></code>\r\n\r\n                  </td>\r\n               </tr>\r\n            </table>\r\n\r\n            <br>\r\n\r\n            <hr width=100% size=1 color=silver>\r\n\r\n            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2623.0\r\n\r\n            </font>\r\n\r\n    </body>\r\n</html>\r\n<!-- \r\n[NullReferenceException]: Object reference not set to an instance of an object.\r\n   at Microsoft.Online.AggregatorService.Common.Gateway.AgsIndexConfigProvider.GetConfigVersionNumber(String configType, String configId) in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\AgsIndexConfigProvider.cs:line 64\r\n   at Microsoft.Online.AggregatorService.Common.Gateway.ConfigurationProvider`1.GetConfigurationImp(String identifier, Boolean useCache) in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\ConfigurationProvider.cs:line 389\r\n   at Microsoft.Online.AggregatorService.Common.Gateway.ConfigurationProvider`1.GetConfiguration(String identifier, Boolean useCache) in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\ConfigurationProvider.cs:line 108\r\n   at Microsoft.Online.AggregatorService.Common.Gateway.GlobalContext.TryGetConfigurationItem[TConfigItem](String identifier, TConfigItem& item) in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\GlobalContext.cs:line 324\r\n   at Microsoft.Online.AggregatorService.Common.Gateway.GlobalContext.GetAgsRootConfig() in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\GlobalContext.cs:line 276\r\n   at Microsoft.Online.AggregatorService.Common.ThrottleClient.GetThrottleEndpoint() in e:\\bt\\923520\\repo\\src\\dev\\Common\\Throttling\\ThrottleClient.cs:line 577\r\n   at Microsoft.Online.AggregatorService.Common.ThrottleClient.Initialize() in e:\\bt\\923520\\repo\\src\\dev\\Common\\Throttling\\ThrottleClient.cs:line 129\r\n   at Microsoft.Online.AggregatorService.WebService.Global.Application_Start(Object sender, EventArgs e) in e:\\bt\\923520\\repo\\src\\dev\\WebService\\Global.asax.cs:line 120\r\n[HttpException]: Object reference not set to an instance of an object.\r\n   at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)\r\n   at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)\r\n   at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)\r\n   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)\r\n   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)\r\n[HttpException]: Object reference not set to an instance of an object.\r\n   at System.Web.HttpRuntime.FirstRequestInit(HttpContext context)\r\n   at System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)\r\n   at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)\r\n--><!-- \r\nThis error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode=\"Off\"/&gt;. Consider using &lt;customErrors mode=\"On\"/&gt; or &lt;customErrors mode=\"RemoteOnly\"/&gt; in production environments.-->"
  }
}

This one is from another List Group Members:

 

{
  "error": {
    "code": 502,
    "source": "msmanaged-na.azure-apim.net",
    "clientRequestId": "64d8f252-99c8-4aec-9300-98db73055137",
    "message": "The response is not in a JSON format.",
    "innerError": "<!DOCTYPE html>\r\n<html>\r\n    <head>\r\n        <title>Object reference not set to an instance of an object.</title>\r\n        <meta name=\"viewport\" content=\"width=device-width\" />\r\n        <style>\r\n         body {font-family:\"Verdana\";font-weight:normal;font-size: .7em;color:black;} \r\n         p {font-family:\"Verdana\";font-weight:normal;color:black;margin-top: -5px}\r\n         b {font-family:\"Verdana\";font-weight:bold;color:black;margin-top: -5px}\r\n         H1 { font-family:\"Verdana\";font-weight:normal;font-size:18pt;color:red }\r\n         H2 { font-family:\"Verdana\";font-weight:normal;font-size:14pt;color:maroon }\r\n         pre {font-family:\"Consolas\",\"Lucida Console\",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}\r\n         .marker {font-weight: bold; color: black;text-decoration: none;}\r\n         .version {color: gray;}\r\n         .error {margin-bottom: 10px;}\r\n         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }\r\n         @media screen and (max-width: 639px) {\r\n          pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }\r\n         }\r\n         @media screen and (max-width: 479px) {\r\n          pre { width: 280px; }\r\n         }\r\n        </style>\r\n    </head>\r\n\r\n    <body bgcolor=\"white\">\r\n\r\n            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>\r\n\r\n            <h2> <i>Object reference not set to an instance of an object.</i> </h2></span>\r\n\r\n            <font face=\"Arial, Helvetica, Geneva, SunSans-Regular, sans-serif \">\r\n\r\n            <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.\r\n\r\n            <br><br>\r\n\r\n            <b> Exception Details: </b>System.NullReferenceException: Object reference not set to an instance of an object.<br><br>\r\n\r\n            <b>Source Error:</b> <br><br>\r\n\r\n            <table width=100% bgcolor=\"#ffffcc\">\r\n               <tr>\r\n                  <td>\r\n                      <code>\r\n\r\nAn unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>\r\n\r\n                  </td>\r\n               </tr>\r\n            </table>\r\n\r\n            <br>\r\n\r\n            <b>Stack Trace:</b> <br><br>\r\n\r\n            <table width=100% bgcolor=\"#ffffcc\">\r\n               <tr>\r\n                  <td>\r\n                      <code><pre>\r\n\r\n[NullReferenceException: Object reference not set to an instance of an object.]\r\n   Microsoft.Online.AggregatorService.Common.Gateway.AgsIndexConfigProvider.GetConfigVersionNumber(String configType, String configId) in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\AgsIndexConfigProvider.cs:64\r\n   Microsoft.Online.AggregatorService.Common.Gateway.ConfigurationProvider`1.GetConfigurationImp(String identifier, Boolean useCache) in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\ConfigurationProvider.cs:389\r\n   Microsoft.Online.AggregatorService.Common.Gateway.ConfigurationProvider`1.GetConfiguration(String identifier, Boolean useCache) in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\ConfigurationProvider.cs:108\r\n   Microsoft.Online.AggregatorService.Common.Gateway.GlobalContext.TryGetConfigurationItem(String identifier, TConfigItem&amp; item) in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\GlobalContext.cs:324\r\n   Microsoft.Online.AggregatorService.Common.Gateway.GlobalContext.GetAgsRootConfig() in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\GlobalContext.cs:276\r\n   Microsoft.Online.AggregatorService.Common.ThrottleClient.GetThrottleEndpoint() in e:\\bt\\923520\\repo\\src\\dev\\Common\\Throttling\\ThrottleClient.cs:577\r\n   Microsoft.Online.AggregatorService.Common.ThrottleClient.Initialize() in e:\\bt\\923520\\repo\\src\\dev\\Common\\Throttling\\ThrottleClient.cs:129\r\n   Microsoft.Online.AggregatorService.WebService.Global.Application_Start(Object sender, EventArgs e) in e:\\bt\\923520\\repo\\src\\dev\\WebService\\Global.asax.cs:120\r\n\r\n[HttpException (0x80004005): Object reference not set to an instance of an object.]\r\n   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +535\r\n   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +166\r\n   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +169\r\n   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +372\r\n   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +329\r\n\r\n[HttpException (0x80004005): Object reference not set to an instance of an object.]\r\n   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +525\r\n   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +118\r\n   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +708\r\n</pre></code>\r\n\r\n                  </td>\r\n               </tr>\r\n            </table>\r\n\r\n            <br>\r\n\r\n            <hr width=100% size=1 color=silver>\r\n\r\n            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2623.0\r\n\r\n            </font>\r\n\r\n    </body>\r\n</html>\r\n<!-- \r\n[NullReferenceException]: Object reference not set to an instance of an object.\r\n   at Microsoft.Online.AggregatorService.Common.Gateway.AgsIndexConfigProvider.GetConfigVersionNumber(String configType, String configId) in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\AgsIndexConfigProvider.cs:line 64\r\n   at Microsoft.Online.AggregatorService.Common.Gateway.ConfigurationProvider`1.GetConfigurationImp(String identifier, Boolean useCache) in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\ConfigurationProvider.cs:line 389\r\n   at Microsoft.Online.AggregatorService.Common.Gateway.ConfigurationProvider`1.GetConfiguration(String identifier, Boolean useCache) in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\ConfigurationProvider.cs:line 108\r\n   at Microsoft.Online.AggregatorService.Common.Gateway.GlobalContext.TryGetConfigurationItem[TConfigItem](String identifier, TConfigItem& item) in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\GlobalContext.cs:line 324\r\n   at Microsoft.Online.AggregatorService.Common.Gateway.GlobalContext.GetAgsRootConfig() in e:\\bt\\923520\\repo\\src\\dev\\Common\\Gateway\\GlobalContext.cs:line 276\r\n   at Microsoft.Online.AggregatorService.Common.ThrottleClient.GetThrottleEndpoint() in e:\\bt\\923520\\repo\\src\\dev\\Common\\Throttling\\ThrottleClient.cs:line 577\r\n   at Microsoft.Online.AggregatorService.Common.ThrottleClient.Initialize() in e:\\bt\\923520\\repo\\src\\dev\\Common\\Throttling\\ThrottleClient.cs:line 129\r\n   at Microsoft.Online.AggregatorService.WebService.Global.Application_Start(Object sender, EventArgs e) in e:\\bt\\923520\\repo\\src\\dev\\WebService\\Global.asax.cs:line 120\r\n[HttpException]: Object reference not set to an instance of an object.\r\n   at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)\r\n   at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)\r\n   at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)\r\n   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)\r\n   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)\r\n[HttpException]: Object reference not set to an instance of an object.\r\n   at System.Web.HttpRuntime.FirstRequestInit(HttpContext context)\r\n   at System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)\r\n   at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)\r\n--><!-- \r\nThis error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode=\"Off\"/&gt;. Consider using &lt;customErrors mode=\"On\"/&gt; or &lt;customErrors mode=\"RemoteOnly\"/&gt; in production environments.-->"
  }
}
2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Random Gateway Error 502:

Hi @martinav,

 

Could you please share a screenshot of your flow's configuration?

Do you add the "List group members" action of Office 365 Groups connector within your flow?

 

The HTTP 502 error is a temporary or transient failure, please click or tap Resubmit to try the flow again to check if the issue is solved. More details about troubleshooting a 502 error, please check the following article:

Troubleshoot a flow

 

I have made a test on my side and don't have the issue that you mentioned. My flow's configuration as below:2.JPG

The flow works successfully as below:3.JPG

 

 

 

Please check if the connection to the "List group members" action is invalid, if yes, please update the connection to this action. More details about updating connections in Microsoft Flow, please check the following article:

https://docs.microsoft.com/en-us/flow/add-manage-connections#update-a-connection

 

In addition, please take a try to clear cache of your browser and re-create your flow, then check if the issue is solved.

 

Please check and see if the following article would help in your scenario:

https://docs.microsoft.com/en-us/azure/app-service/app-service-web-troubleshoot-http-502-http-503

 

https://technet.microsoft.com/en-us/library/bb794799.aspx

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Resident Rockstar
Resident Rockstar

Re: Random Gateway Error 502:

v-xida,

 

Thank you for your reply.  

 

Yes, I'm using "List Groug Members" action.  

 

Yes, I mentioned that I resubmitted the flow, it it worked properly.  But, I cannot do that in many cases, because it would be too late, and the actions done in the flow would actually be "too late" and would affect other actions completed.

 

This is not a 100% problem.  It has occurred twice to my knowledge.  Probably a couple hundred flow executions  have worked fine, both before and after the error.  Thus, the flow is quite valid.  It wouldn't work correctly 99% of the time if it was not.

 

Regards,

Rod

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Users online (5,211)