cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JasonK
Helper IV
Helper IV

Bad gateway 502 Onedrive pdf converter

Hello Everyone,

 

I had built a flow 2 months ago that would convert word files on a sharepoint document repository into PDF. Eventually it evolved to converting excel files so a switch case was built to accomodate. This was all working fine for a while until yesterday 10/28.

 

The flow was able to save the file to onedrive but failed on the conversion to PDF with a bad gateway 502 error. In the body it stated:

"The underlying connection was closed: An unexpected error occurred on a send.\r\n inner exception: An error occurred while sending the request.\r\n inner exception: The underlying connection was closed: An unexpected error occurred on a send.\r\n inner exception: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.\r\n inner exception: An existing connection was forcibly closed by the remote host",
 
I attempted to rerun the flow and try other files and resulted in the same thing.
 
I decided to open a support ticket. Support had me rebuild the connector connection and noticed the icon for onedrive had updated. It continued to fail, so we ended up rebuilding a copy of the flow and resulted in the same issue. The tech upon checking the gateways tab was met with a message about needing a subscription stated to me pdf conversion on onedrive needed a premium licensce. I was totally confused stating that it made no sense as the changes occurred oct 1st and still ran fine up until yesterday.  It then evolved into saying i was possibly on a trial account. (I am under GCC g3 Lic, and not using free flow). Eventually he got back to me and explained he was wrong so we further troubleshoot the issue.
 
We ended up opening up IE with browser cache clear. The flow tested and then ran fine without the gateway issue. His explanation was that when i built my flow, the flow designer was possibly pulling in old cached information into building my flow therefore resulting in the gateway 502 errors. Resaving in IE with new cache clear fixed the problem was his explanation. This baffled me as it didnt really make sense that a cloud platform would rely on browser cache to authenticate. This would lead me to believe there are many other users that run into this same scenario using Chrome.
 
Has anyone ran into a similar incident and explanation like this before? Also if anyone knows the onedrive pdf converter requires a premium lic? Or was i fed a bunch of baloney and connections on the backend fixed itself. If this is truly the root cause of the issue, then the flow designer needs to be redesigned.
 
Thanks
Jason
41 REPLIES 41

I've tried increasing the interval and the counts several times.  It just ends up taking longer to ultimately fail the whole flow.  

Continuing to get failures all this morning. Support has been non existent asking me to run network traces on my end which makes no sense.

 

Every conversion is leading to:

bad gateway timeout.JPG

 

Other users not on the same tenant are facing the same error. 

Week 3, still failing:

 

{
"error": {
"code": 502,
"source": "power-apis-usgov001-public.azure-apihub.us",
"clientRequestId": "25a3df29-ca16-41b9-8e7e-39ed35418bcd",
"message": "BadGateway",
"innerError": {
"status": 502,
"message": "Error from Office Service. Url=https://wordcs.osi.office365.us:973/wordca/wordconversionservice.svc/rest/ConvertFileUrl HttpCode=OK cert=subject:E=wwdcsse@microsoft.com, CN=OneDriveToWord-USGov, OU=Office Service Infrastructure, O=Microsoft Corporation, L=Redmond, S=Washington, C=U
"source": "api.connectorp.svc.ms"
}
}
}
BenFetters
Continued Contributor
Continued Contributor

I am having the same issue. Are there any updates on this? It said my connections had broken and then I fixed them and that didn't fix anything. 

 

Thanks

 

Ben Fetters

If this solved the problem for you, feel free to hit "Accept as Solution" so others can find the answer easier. 🙂

Kind regards,

Ben Fetters
Power Apps/Power Automate Developer
www.sovereignsp.com

No failures this week. Support got back to me asking me if the issue was still occurring. Would be nice to know what exactly was broken and what they fixed...

 

All of my connections broke as well and had to reauthenticate. PITA

This week this method is not running.

What error are you getting? @adminafrasa 

The same error 502 Bad Gateway.

 
fsudler1
Frequent Visitor

I am having the same issue. The connection is timing out and causing my flow to run extremely slow. What's the deal?

Additional information, I am seeing things move at a rate of 2 documents every 5 to 6 minutes. The document isn't very large at all.

When mine failed it would run for 10-15 mins on a retry then eventually fail.

 

Can you paste the detailed error you are seeing in the flow history?

 
 

Here is the error. Additional information is that occurs while looping through records and this was in the middle of the run.

 

badGateway-err.JPGbadGateway-err2.JPG

Has the file been deleted? 404 indicates the resource dosent exist. Possibly removed or deleted.

No. That action is creating a file in OneDrive using the content of the Word template that was filled out in the prior step.

Probably should paste the entire flow history where it fails. Almost sounds like its user clicking on create word doc, which launches a document.docx file (which saves automatically) then user renames the file, by the time the flow gets to that step, it cannot locate the original document.docx thus the 404.

 

Need more details to understand what is going on.

eloijr
Frequent Visitor

I've got the same problem today, 65 % of my flows failed and I received this message:

{
  "error": {
    "code"502,
    "source""flow-apim-msmanaged-na-centralus-01.azure-apim.net",
    "clientRequestId""52ce1a14-a11d-4d1f-9136-7a2754dd209d",
    "message""BadGateway",
    "innerError": {
      "status"502,
      "message""Service Unavailable - <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'>...>",
      "source""api.connectorp.svc.ms"
    }
  }
}

I would suggest create a ticket to the powerautomate team. Based on the message i guess they are aware, but this needs more attention

MasoodAkhtar
New Member

Hi All,

 

I have fixed this problem by changing CDS to D365 Connectors.

Recently i faced this problem when I changed connectors from D365 to CDS Current Environment as D365 has been depricated. When I changed the connector back to D365, then the issue has gone.

 

Thanks,

Masood

MasoodAkhtar
New Member

 
jtao
Helper I
Helper I

This issue come up today for all my flows using one drive convert word to pdf.

 

{
  "error": {
    "code"502,
    "source""australia-001.azure-apim.net",
    "clientRequestId""7d32e5c3-3072-418e-b64c-38cc89af1a1a",
    "message""BadGateway",
    "innerError": {
      "status"502,
      "message""Service Unavailable - <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta content='text/html; charset=utf-8' http-equiv='content-type'/><style type='text/css'>body {{font-family:Arial; margin-left:40px; }}img  {{ border:0 none; }}#content {{ margin-left: auto; margin-right: auto }}#message h2 {{ font-size: 20px; font-weight: normal; color: #000000; margin: 34px 0px 0px 0px }}#message p  {{ font-size: 13px; color: #000000; margin: 7px 0px 0px0px}}#errorref {{ font-size: 11px; color: #737373; margin-top: 41px }}</style><title>{0}</title></head><body><div id='content'><div id='message'><h2>Our services aren't available right now</h2><p>We're working to restore all services as soon as possible. Please check back soon.</p></div><div id='errorref'><span>Ref A: 1C74253C4EBD40CB89EA2791980880D1 Ref B: OSA02EDGE0721 Ref C: 2022-12-14T01:31:47Z</span></div></div></body></html>",
      "source""api.connectorp.svc.ms"
    }
  }
}

Helpful resources

Announcements

Community Roundup: A Look Back at Our Last 10 Tuesday Tips

As we continue to grow and learn together, it's important to reflect on the valuable insights we've shared. For today's #TuesdayTip, we're excited to take a moment to look back at the last 10 tips we've shared in case you missed any or want to revisit them. Thanks for your incredible support for this series--we're so glad it was able to help so many of you navigate your community experience!   Getting Started in the Community An overview of everything you need to know about navigating the community on one page!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Ranks and YOU Have you ever wondered how your fellow community members ascend the ranks within our community? We explain everything about ranks and how to achieve points so you can climb up in the rankings! Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Powering Up Your Community Profile Your Community User Profile is how the Community knows you--so it's essential that it works the way you need it to! From changing your username to updating contact information, this Knowledge Base Article is your best resource for powering up your profile. Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Blogs--A Great Place to Start There's so much you'll discover in the Community Blogs, and we hope you'll check them out today!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Unlocking Community Achievements and Earning Badges Across the Communities, you'll see badges on users profile that recognize and reward their engagement and contributions. Check out some details on Community badges--and find out more in the detailed link at the end of the article! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Blogging in the Community Interested in blogging? Everything you need to know on writing blogs in our four communities! Get started blogging across the Power Platform communities today! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Subscriptions & Notifications We don't want you to miss a thing in the community! Read all about how to subscribe to sections of our forums and how to setup your notifications! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Getting Started with Private Messages & Macros Do you want to enhance your communication in the Community and streamline your interactions? One of the best ways to do this is to ensure you are using Private Messaging--and the ever-handy macros that are available to you as a Community member! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Community User Groups Learn everything about being part of, starting, or leading a User Group in the Power Platform Community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Update Your Community Profile Today! Keep your community profile up to date which is essential for staying connected and engaged with the community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Thank you for being an integral part of our journey.   Here's to many more Tuesday Tips as we pave the way for a brighter, more connected future! As always, watch the News & Announcements for the next set of tips, coming soon!    

Calling all User Group Leaders and Super Users! Mark Your Calendars for the next Community Ambassador Call on May 9th!

This month's Community Ambassador call is on May 9th at 9a & 3p PDT. Please keep an eye out in your private messages and Teams channels for your invitation. There are lots of exciting updates coming to the Community, and we have some exclusive opportunities to share with you! As always, we'll also review regular updates for User Groups, Super Users, and share general information about what's going on in the Community.     Be sure to register & we hope to see all of you there!

April 2024 Community Newsletter

We're pleased to share the April Community Newsletter, where we highlight the latest news, product releases, upcoming events, and the amazing work of our outstanding Community members.   If you're new to the Community, please make sure to follow the latest News & Announcements and check out the Community on LinkedIn as well! It's the best way to stay up-to-date with all the news from across Microsoft Power Platform and beyond.    COMMUNITY HIGHLIGHTS   Check out the most active community members of the last month! These hardworking members are posting regularly, answering questions, kudos, and providing top solutions in their communities. We are so thankful for each of you--keep up the great work! If you hope to see your name here next month, follow these awesome community members to see what they do!   Power AppsPower AutomateCopilot StudioPower PagesWarrenBelzDeenujialexander2523ragavanrajanLaurensMManishSolankiMattJimisonLucas001AmikcapuanodanilostephenrobertOliverRodriguestimlAndrewJManikandanSFubarmmbr1606VishnuReddy1997theMacResolutionsVishalJhaveriVictorIvanidzejsrandhawahagrua33ikExpiscornovusFGuerrero1PowerAddictgulshankhuranaANBExpiscornovusprathyooSpongYeNived_Nambiardeeksha15795apangelesGochixgrantjenkinsvasu24Mfon   LATEST NEWS   Business Applications Launch Event - On Demand In case you missed the Business Applications Launch Event, you can now catch up on all the announcements and watch the entire event on-demand inside Charles Lamanna's latest cloud blog.   This is your one stop shop for all the latest Copilot features across Power Platform and #Dynamics365, including first-hand looks at how companies such as Lenovo, Sonepar, Ford Motor Company, Omnicom and more are using these new capabilities in transformative ways. Click the image below to watch today!   Power Platform Community Conference 2024 is here! It's time to look forward to the next installment of the Power Platform Community Conference, which takes place this year on 18-20th September 2024 at the MGM Grand in Las Vegas!   Come and be inspired by Microsoft senior thought leaders and the engineers behind the #PowerPlatform, with Charles Lamanna, Sangya Singh, Ryan Cunningham, Kim Manis, Nirav Shah, Omar Aftab and Leon Welicki already confirmed to speak. You'll also be able to learn from industry experts and Microsoft MVPs who are dedicated to bridging the gap between humanity and technology. These include the likes of Lisa Crosbie, Victor Dantas, Kristine Kolodziejski, David Yack, Daniel Christian, Miguel Félix, and Mats Necker, with many more to be announced over the coming weeks.   Click here to watch our brand-new sizzle reel for #PPCC24 or click the image below to find out more about registration. See you in Vegas!       Power Up Program Announces New Video-Based Learning Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram. These include a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the image below to find out more!   UPCOMING EVENTS Microsoft Build - Seattle and Online - 21-23rd May 2024 Taking place on 21-23rd May 2024 both online and in Seattle, this is the perfect event to learn more about low code development, creating copilots, cloud platforms, and so much more to help you unleash the power of AI.   There's a serious wealth of talent speaking across the three days, including the likes of Satya Nadella, Amanda K. Silver, Scott Guthrie, Sarah Bird, Charles Lamanna, Miti J., Kevin Scott, Asha Sharma, Rajesh Jha, Arun Ulag, Clay Wesener, and many more.   And don't worry if you can't make it to Seattle, the event will be online and totally free to join. Click the image below to register for #MSBuild today!   European Collab Summit - Germany - 14-16th May 2024 The clock is counting down to the amazing European Collaboration Summit, which takes place in Germany May 14-16, 2024. #CollabSummit2024 is designed to provide cutting-edge insights and best practices into Power Platform, Microsoft 365, Teams, Viva, and so much more. There's a whole host of experts speakers across the three-day event, including the likes of Vesa Juvonen, Laurie Pottmeyer, Dan Holme, Mark Kashman, Dona Sarkar, Gavin Barron, Emily Mancini, Martina Grom, Ahmad Najjar, Liz Sundet, Nikki Chapple, Sara Fennah, Seb Matthews, Tobias Martin, Zoe Wilson, Fabian Williams, and many more.   Click the image below to find out more about #ECS2024 and register today!     Microsoft 365 & Power Platform Conference - Seattle - 3-7th June If you're looking to turbo boost your Power Platform skills this year, why not take a look at everything TechCon365 has to offer at the Seattle Convention Center on June 3-7, 2024.   This amazing 3-day conference (with 2 optional days of workshops) offers over 130 sessions across multiple tracks, alongside 25 workshops presented by Power Platform, Microsoft 365, Microsoft Teams, Viva, Azure, Copilot and AI experts. There's a great array of speakers, including the likes of Nirav Shah, Naomi Moneypenny, Jason Himmelstein, Heather Cook, Karuana Gatimu, Mark Kashman, Michelle Gilbert, Taiki Y., Kristi K., Nate Chamberlain, Julie Koesmarno, Daniel Glenn, Sarah Haase, Marc Windle, Amit Vasu, Joanne C Klein, Agnes Molnar, and many more.   Click the image below for more #Techcon365 intel and register today!     For more events, click the image below to visit the Microsoft Community Days website.      

Tuesday Tip | Update Your Community Profile Today!

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   We're excited to announce that updating your community profile has never been easier! Keeping your profile up to date is essential for staying connected and engaged with the community.   Check out the following Support Articles with these topics: Accessing Your Community ProfileRetrieving Your Profile URLUpdating Your Community Profile Time ZoneChanging Your Community Profile Picture (Avatar)Setting Your Date Display Preferences Click on your community link for more information: Power Apps, Power Automate, Power Pages, Copilot Studio   Thank you for being an active part of our community. Your contributions make a difference! Best Regards, The Community Management Team

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Super User of the Month | Ahmed Salih

We're thrilled to announce that Ahmed Salih is our Super User of the Month for April 2024. Ahmed has been one of our most active Super Users this year--in fact, he kicked off the year in our Community with this great video reminder of why being a Super User has been so important to him!   Ahmed is the Senior Power Platform Architect at Saint Jude's Children's Research Hospital in Memphis. He's been a Super User for two seasons and is also a Microsoft MVP! He's celebrating his 3rd year being active in the Community--and he's received more than 500 kudos while authoring nearly 300 solutions. Ahmed's contributions to the Super User in Training program has been invaluable, with his most recent session with SUIT highlighting an incredible amount of best practices and tips that have helped him achieve his success.   Ahmed's infectious enthusiasm and boundless energy are a key reason why so many Community members appreciate how he brings his personality--and expertise--to every interaction. With all the solutions he provides, his willingness to help the Community learn more about Power Platform, and his sheer joy in life, we are pleased to celebrate Ahmed and all his contributions! You can find him in the Community and on LinkedIn. Congratulations, Ahmed--thank you for being a SUPER user!

Users online (6,867)