Hi,
I keep getting this sporadic error in an app.
A red bar at the top saying 'An error occurred on the server.'
I have tried to track it down but it happens at different times and in different places within the app.
I had a look at the F12 console to see if there was anything useful and found an error popping up that corresponds to the error on screen:
POST https://europe-001.azure-apim.net/invoke 502
on further inspection, I find the following error in a request.
{error: {code: 502, source: "europe-001.azure-apim.net",โฆ}} error: {code: 502, source: "europe-001.azure-apim.net",โฆ} clientRequestId: "b675ef21-40d3-4b48-acad-3abc1aee298a" code: 502 innerError: {status: 502,โฆ} message: "Unexpected Exception : [0]Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.RuntimeCheckFailedException: Internal error: gatewayAndUserInfo โต TemplateMessage: A runtime check error occurred: โต โตGatewayPipelineErrorCode=DM_GWPipeline_UnknownError โตGatewayVersion= โตFailureMessage= โต ([0]Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.RuntimeCheckFailedException.StackTrace:) โต at Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.Internal.RuntimeChecks.Fail(String message) โต at Microsoft.PowerBI.DataMovement.GatewayMashupClient.MashupGatewayClientHost..ctor(IGatewayDiscoverer gatewayDiscoverer, GatewayAndUserInfo gatewayAndUserInfo, IEnumerable`1 dataSourceCredentials) โต at Microsoft.PowerBI.DataMovement.GatewayMashupClient.GatewayMashupConnectionFactory.CreateConnection(IGatewayDiscoverer gatewayDiscoverer, GatewayAndUserInfo gatewayAndUserInfo, IEnumerable`1 dataSourceCredentials, Guid clientActivityId, Guid rootActivityId, Guid activityId, ITelemetryService telemetryService, GatewaySpoolControlSetting gatewaySpoolControlSetting) โต at Microsoft.PowerBI.DataMovement.GatewayMashupClient.GatewayMashupConnectionFactory.<>c__DisplayClass0_0.<CreateConnection>b__0() โต at Microsoft.PowerBI.DataMovement.Pipeline.Common.Diagnostics.PipelineTelemetryService.ExecuteInActivity(PipelineActivityType pipelineActivityType, Action action) โต at Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.Internal.DiagnosticsContext.DiagnosticsContextExecutor.ExecuteInTopLevelActivity(PipelineActivityType pipelineActivityType, Action action) โต at Microsoft.PowerBI.DataMovement.GatewayMashupClient.GatewayMashupConnectionFactory.CreateConnection(IGatewayDiscoverer gatewayDiscoverer, GatewayAndUserInfo gatewayAndUserInfo, IEnumerable`1 dataSourceCredentials, Guid clientActivityId, Guid rootActivityId, Guid activityId, GatewaySpoolControlSetting gatewaySpoolControlSetting) โต at Microsoft.Azure.Connectors.Common.Mashup.Adapter.GatewayMashupQueryExecutor.CreateMashupConnection(HttpRequestMessage request, MashupConnectionStringBuilder builder) in D:\bt\969492\repo\src\source\common\Mashup\Adapter\GatewayMashupQueryExecutor.cs:line 86 โต at Microsoft.Azure.Connectors.Mashup.Sql.SqlMashupQueryExecutor.CreateMashupConnection(HttpRequestMessage request, MashupConnectionStringBuilder builder) in D:\bt\969492\repo\src\source\Mashup\Sql\Adapter\SqlMashupQueryExecutor.cs:line 140 โต at Microsoft.Azure.Connectors.Common.Mashup.Adapter.MashupQueryExecutor.<>c__DisplayClass13_2.<InvokeMashupAsync>b__0() in D:\bt\969492\repo\src\source\common\Mashup\Adapter\MashupQueryExecutor.cs:line 268 โต at System.Threading.Tasks.Task`1.InnerInvoke() โต at System.Threading.Tasks.Task.Execute() โต--- End of stack trace from previous location where exception was thrown --- โต at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() โต at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) โต at Microsoft.Azure.Connectors.Common.Utilities.TaskExtensions.<WithCancellation>d__0.MoveNext() in D:\bt\969492\repo\src\source\common\Utilities\Extensions\TaskExtensions.cs:line 43 โต--- End of stack trace from previous location where exception was thrown --- โต at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() โต at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) โต at Microsoft.Azure.Connectors.Common.Utilities.TaskExtensions.<WithCancellation>d__1`1.MoveNext() in D:\bt\969492\repo\src\source\common\Utilities\Extensions\TaskExtensions.cs:line 57 โต--- End of stack trace from previous location where exception was thrown --- โต at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() โต at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) โต at Microsoft.Azure.Connectors.Common.Mashup.Adapter.MashupQueryExecutor.<InvokeMashupAsync>d__13.MoveNext() in D:\bt\969492\repo\src\source\common\Mashup\Adapter\MashupQueryExecutor.cs:line 268 โต inner exception: Internal error: gatewayAndUserInfo โตclientRequestId: b675ef21-40d3-4b48-acad-3abc1aee298a" source: "sql-ne.azconn-ne.p.azurewebsites.net" status: 502 message: "BadGateway" source: "europe-001.azure-apim.net"
I can't tie this to a specific function within PowerApps and it doesn't appear to have any impact on the running app other than continually showing the red bar error at the top of the screen which is of great annoyance to users.
It seems to happen most when I have a lot of functions happening in one action but not always.
Sometimes the app will be fine for a while then start giving me the error again.
The data sources in the app are SQL tables through an on-premise gateway which is showing online and logging the same error on the server. Also the Office365 data source and the Office 365 Users data source.
After looking in the logs on the server for the gateway I find a corresponding error at the same time in the 'GatewyInfo#DateTime#.log':
[DM.GatewayCore] Db pool opening raw database connection to [Microsoft.Data.Mashup: <pi>Microsoft.Data.Mashup:TRUNCATED:[Basic] Encrypted Credential information omitted</pi>] [DataMovement.PipeLine.GatewayDataAccess] Gateway couldn't decrypt the credential using the symmetric key.
Now I know all the credentials are set up correctly because all of the queries are executing and all of the data is being returned to the app so why would it do this every so often?
Does anyone have any suggestions?
I'm receiving the same, also sporadic, but noticable on pages with more lookups.
An error occurred on the server. Server Response: Not a valid connector response. returning message as is: { "error": { "code": 502, "source": "msmanaged-na.azure-apim.net", "clientRequestId": "9273c748-7c9e-401d-90fd-c4c18fdece88", "message": "BadGateway", "innerError": { "status": 502, "message": "Unexpected Exception : [0]Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.RuntimeCheckFailedException: Internal error: gatewayAndUserInfo\r\n Template...
I am having similar issues with one of my apps that is connected to Salesforce. The app loads with this error condition but is functional, I have tried re-authenticating the connector several times but it doesn't seem to fix the error.
All of my end users are getting the same error message when the app is first loaded. If they close and re-open the app, the error does not re-appear until the session is ended and another begins.
User | Count |
---|---|
225 | |
101 | |
93 | |
56 | |
30 |
User | Count |
---|---|
288 | |
116 | |
109 | |
62 | |
58 |