cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MatthewLloyd
Frequent Visitor

Excel Run Script - 502 Bad Gateway

Have a flow which sends an array of objects to be sorted by their date using an office script. Was working fine for months until two hours ago started recieving the below errors. We haven't any significant changes I'm aware of in the past two hours that may have caused this:

 

{
  "error": {
    "code"502,
    "source""australia-001.azure-apim.net",
    "clientRequestId""xxxxxxx-xxxxxxx-xxxxxxx-xxxx-xxxxxxxxxxx",
    "message""BadGateway",
    "innerError": {
      "message""Failed to find certificate with subjects 'aadencrypt.officescripts.microsoftusercontent.com', 'aadencrypt.runtime.arbitraryrunner.com'\r\nclientRequestId: xxxxxxx-xxxxxxx-xxxxxxx-xxxx-xxxxxxxxxxx",
      "storageErrorCode"0
    }
  }
}
71 REPLIES 71
C_oba
Regular Visitor

@Yutao 
cabf770f-4d89-4329-ab45-73f7429ca0b3
b88b7a49-7f73-4c4d-851c-5070e53a1efd

↑ Do they say same thing? One of my failure may contains conflict error. 

@C_oba 

 

For both two failures, the error message I am seeing on our side is "CoauthSessionTerminated: The workbook needs to be updated." This was quite possible also due to co-authoring issues caused by another Excel client modifying the same workbook at the same time.

C_oba
Regular Visitor

@Yutao 
The flow I sent is only manual trigger→run script.

Files aren't touched by anyone without me (after runnning script I sometimes restore old version file to test again). 

and I've just learned this error occur to specific file.

AlCow
Advocate I
Advocate I

I have just got back to work from a period being away, and found that I have multiple flows failing whenever they encounter a Run Script step. These were all working fine previously. I have tried creating new test flows with very simple steps and scripts, and they all fail with 502- Bad Gateway. This thread suggests it was a back office issue that was fixed. Is it broken again?

lashed
Frequent Visitor

I am getting the same error today in a production flow that was working when last run 1 week ago. Excel for business connector, in europe. The flow creates the excel file before running the script - there are no issues with another user locking the file. I put a 15 min delay in prior to running the script and that didn't help either.

 

{
  "error": {
    "code"502,
    "source""europe-002.azure-apim.net",
    "clientRequestId""641648ff-6baf-48d6-88de-944557f6e8d3",
    "message""BadGateway",
    "innerError": {
      "message""We were unable to run the script. Please try again.\r\nclientRequestId: 641648ff-6baf-48d6-88de-944557f6e8d3",
      "logs"null
    }
FelipeBR
Frequent Visitor

I am getting the same error here too. When i running "Run Script" this error appears:
 
{
  "error": {
    "code"502,
    "source""flow-apim-europe-001-northeurope-01.azure-apim.net",
    "clientRequestId""xxxxxxx-xxxxxxx-xxxxxxx-xxxx-xxxxxxxxxxx",
    "message""BadGateway",
    "innerError": {
      "message":
"We were unable to run the script. Please try again. \r\nclientRequestId: xxxxxxx-xxxxxxx-xxxxxxx-xxxx-xxxxxxxxxxx",
"logs"null
    }
  }
}
 
Can someone help me with this issue?
jt_leaf_sk
Regular Visitor

same problem here, location: Europe

😞

dbroadberrybaw
Regular Visitor

Same problem here. Have reported in Admin Console but hasn't been published as Active Issue yet.

Yutao
Microsoft
Microsoft

Sorry our service has been having an outage in multiple geo-regions 😢.  We are actively working on it and will keep you posted here. Thanks for your patience!

thx @Yutao, - will the issue be present in admin center any time soon, to keep track of the resolution?

AWorley
Helper I
Helper I

I opened a MS support ticket. Same error in USA. 

Yutao
Microsoft
Microsoft

@jt_leaf_sk - unfortunately I don't think our service has been integrated into Admin Center yet. Office Scripts is a relatively new feature, and a few dependencies are still being built along the way. I'll try my best to keep you updated through this thread. Thanks for your understanding!

jt_leaf_sk
Regular Visitor

my issue got resolved by opening flow in edit mode, expanding the "Run excel script" action, refreshing the list of scripts available in the Excel file and re-selecting the right one.

the flow then run properly.

doing some more testing now, checking other "run excel script" actions, but so far all seems in order.

Yutao
Microsoft
Microsoft

[UPDATE] We are partially restored in some of the regions. Some users might start seeing Office Scripts getting back online. Unfortunately it is still not fully recovered at this moment. Will keep you updated. Thanks again for your patience!

I tried this and it does seem to have worked but it also came at the same time as the partial restore post below so not sure for which reason it worked.

fauz
New Member

Has this issue been resolved?

jiwhite
Advocate I
Advocate I

My flows are taking multiple times as long and timing out today because of BadGateway retries.

Client Request Id: 11911d44-82f4-4661-a9ca-c6525b937e9e

Yutao
Microsoft
Microsoft

[UPDATE] We're still in the process of recovering all the regions. Thanks for your patience!

 

C_oba
Regular Visitor

@Yutao 
I found the error reason.
When sharing script , Runscript in powerautomate sometimes fail.
Is it within your expectations?

Yutao
Microsoft
Microsoft

@C_oba - can you please describe your scenario a bit further?

 

So you have shared your script with other folks, then run the same script in Power Automate?

 

This normally shouldn't cause that particular error message we were seeing in the logs ("CoauthSessionTerminated: The workbook needs to be updated"). This particular error is most likely caused by multiple clients (not necessarily "human" client, services or apps accessing the workbook also count) modifying the same workbook at the same time.

 

But it seems the target workbook is solely used by your script. So it's indeed a little strange here...

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,157)