The resource was not found, it may have been deleted.... when deploy from GitHub to Azure

Jacky Poon 0 Reputation points
2025-08-05T14:44:03.72+00:00

Dear officer,

I need some help in that I encountered an error when I tried to migrate a generative AI App from GitHub to Azure. The web app I created using Python 13.2. I can successfully deploy the web app to Azure and I have entered all environment variables from Python .env file to environment variables under Settings in Azure Environment Variables.png.

Then I click on the URL in Default Domain. I encountered the error 404 error message 404 Error.png. The error message stating that:

Error code404

DetailsThe resource was not found, it may have been deleted. If this was launched from a pinned tile on the dashboard, it should be removed. Resource ID: /subscriptions/6f9e534d-7828-4ee5-bf08-7622f79d10fe/resourceGroups/ai_group/providers/Microsoft.Web/sites/aihosting3/slots/bnb5frbwdrfpbwh8808d-hghuazevhxf8h7dt

Status Code: 404

After performed some Internet search. I added the entry hghuazevhxf8h7dt into deployment slot Deployment Host.png. Then I click on the URL in the default domain. I got the same error 404.

Does someone know how to resolve this issue? The deployment is successful but I am unable to access the web app with error 404. Thanks!

Regards,

Jacky

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RAMAMURTHY MAKARAPU 160 Reputation points Microsoft External Staff Moderator
    2025-08-21T00:32:00.5733333+00:00

    Hello @Jacky Poon,

    Thank you for submitting your question on Microsoft Q&A.

    Thank you for providing the screenshots. After reviewing them, I’ve identified some possible reasons for the 404 error you’re seeing on your Azure web app, along with steps to help resolve the issue.

    Root Cause Analysis

    The error message you’re seeing points to a resource ID that includes a deployment slot name is

    aiohosting3/slots/bnb5frbwdrfpbwh8808d-hguazevhxf8h7dt

    But according to your Deployment Slots screenshot, the actual slot names are

    • aiohosting3 (Production)
    • aiohosting3-bnb5frbwdrfpbwh8
    • aiohosting3-hguazevhxf8h7dt

    It looks like the error message is referring to a slot name that doesn’t exist or is formatted incorrectly

    bnb5frbwdrfpbwh8808d-hguazevhxf8h7dt this is not a valid slot name in your environment.

    Steps to Resolve the issue

    1. Review the URL you’re using
    1. Avoid merging slot names
      • The error suggests that a URL or configuration is mistakenly combining two slot names (bnb5frbwdrfpbwh8808d and hguazevhxf8h7dt), which isn’t valid.
      • Go through your deployment settings and environment variables to make sure there’s no such combination.
    2. Confirm deployment slot setup
      • Verify that your app is deployed to the intended slot.
      • Test each slot’s URL separately to identify which one is working.
    3. Check the Azure Portal for slot availability
      • Navigate to Azure Portal > App Services > aiohosting3 > Deployment Slots.
      • Make sure the slot you want to access is present and running.
    4. Clear your browser cache or use incognito mode
      • Sometimes, cached URLs or redirects can result in this type of issue.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.