Giter VIP home page Giter VIP logo

Comments (25)

erfannariman avatar erfannariman commented on August 14, 2024 14

Here is a temporary solution:

  1. Go to your function app and to configuration:
    image

  2. Press "New applications setting":
    image

  3. Then add the following:
    image

  4. Redownload "Publish Profile", then the publishUrl will be correct set to scm.

from webapps-deploy.

thechandanbhagat avatar thechandanbhagat commented on August 14, 2024 12

Having the same issue, our credentials were set up automatically via our App Center's Deployment center, after that didn't work we tried going manually via the error link (https://aka.ms/create-secrets-for-GitHub-workflows).
Is there any examples of what the secret value (publish profile) should look like?

@lcm98
Actually when you open the publish profile in any text editor, you need to add entire content of that file name as secret. I think to be precise, rhat should contain the publish setting of type web deploy with the publish url as
https://<-example->.scm.azurewebsites.net

@chandan-g-bhagat
This is the Publish Profile I get from Azure (sensitive data removed)

<publishData>
     <publishProfile profileName="[app-name] - Web Deploy" publishMethod="MSDeploy" publishUrl="waws-prod.publish.azurewebsites.windows.net:443" msdeploySite="[app-name]" userName="$[app-name]" userPWD="***" destinationAppUrl="http://[app-name].azurewebsites.net" SQLServerDBConnectionString="" mySQLDBConnectionString="" hostingProviderForumLink="" controlPanelLink="http://windows.azure.com" webSystem="WebSites">
        <databases />
    </publishProfile>
    <publishProfile profileName="[app-name] - FTP" publishMethod="FTP" publishUrl="ftp://waws-prod.ftp.azurewebsites.windows.net/site/wwwroot" ftpPassiveMode="True" userName="[app-name]\$[app-name]" userPWD="***" destinationAppUrl="http://[app-name].azurewebsites.net" SQLServerDBConnectionString="" mySQLDBConnectionString="" hostingProviderForumLink="" controlPanelLink="http://windows.azure.com" webSystem="WebSites">
        <databases />
    </publishProfile>
    <publishProfile profileName="[app-name] - ReadOnly - FTP" publishMethod="FTP" publishUrl="ftp://waws-prod.ftp.azurewebsites.windows.net/site/wwwroot" ftpPassiveMode="True" userName="[app-name]\$[app-name]" userPWD="***" destinationAppUrl="http://[app-name].azurewebsites.net" SQLServerDBConnectionString="" mySQLDBConnectionString="" hostingProviderForumLink="" controlPanelLink="http://windows.azure.com" webSystem="WebSites">
        <databases />
    </publishProfile>
</publishData>

Do I include everything, the tags as well as all 3 publish profiles?

So I need to change the publishURL that they provide? Will get back to you with how that works.

@lcm98

<publishData>
     <publishProfile profileName="[app-name] - Web Deploy" publishMethod="MSDeploy" publishUrl="waws-prod.publish.azurewebsites.windows.net:443" msdeploySite="[app-name]" userName="$[app-name]" userPWD="***" destinationAppUrl="http://[app-name].azurewebsites.net" SQLServerDBConnectionString="" mySQLDBConnectionString="" hostingProviderForumLink="" controlPanelLink="http://windows.azure.com" webSystem="WebSites">
        <databases />
  </publishProfile>

I had the same issue in this publishurl, use
[app-name].scm.azurewebsites.net instead of
waws-prod.publish.azurewebsites.windows.net
And leave rest as it is.

from webapps-deploy.

rtheil avatar rtheil commented on August 14, 2024 10

I'm going to add to this just to verify that I had the same issue. I created a node app and had Azure create the pipeline for me on github. It did this successfully. Then I created a .Net core API and tried to publish using the EXACT same method. It failed with error:
##[error]Failed to fetch credentials from Publish Profile. For more details on how to set publish profile credentials refer https://aka.ms/create-secrets-for-GitHub-workflows ##[error]Deployment Failed with Error: Error: Publish profile does not contain kudu URL

To fix:
Downloaded the publish profile from azure, edited the file, looked for publishUrl="waws-prod-bay-143.publish.azurewebsites.windows.net:443" and replaced it with publishUrl="[my-app-name].scm.azurewebsites.net:443" then copied the entire contents of the file and updated the secret stored in my github repository. Everything started working.

Also verified that in the publish config file for my Node app that the publishUrl was indeed pointing to scm.azurewebsites.net.

It's obvious this is a bug with the Github deployment in Azure, and specific to .Net Core (and probably other) apps.

from webapps-deploy.

chuanqisun avatar chuanqisun commented on August 14, 2024 7

Please consider re-open the issue @chandan-g-bhagat . The workaround is good but many users will hit the same problem and waste their time. Please consider updating either Azure portal get publish profile button behavior, or updating the Github Actions to ensure the default publish profile work out-of-the-box.

from webapps-deploy.

lcm98 avatar lcm98 commented on August 14, 2024 4

Having the same issue, our credentials were set up automatically via our App Center's Deployment center, after that didn't work we tried going manually via the error link (https://aka.ms/create-secrets-for-GitHub-workflows).

Is there any examples of what the secret value (publish profile) should look like?

from webapps-deploy.

erfannariman avatar erfannariman commented on August 14, 2024 3

Why is this issue closed? This is still a problem, can this be re-opened?

from webapps-deploy.

thechandanbhagat avatar thechandanbhagat commented on August 14, 2024 2

Do you have publishUrl attribute in your publishprofile file?

@RoopeshNair
Actually I fixed it, There was issue in publish url. It didn't have scm in the url.
https://<-example->.scm.azurewebsites.net

from webapps-deploy.

whimxiqal avatar whimxiqal commented on August 14, 2024 2

There is a workaround, but it is kinda scattered around on this thread. I made a StackOverflow post about it to help people figure it out. This should definitely be figured out so you don't have to go through this.

from webapps-deploy.

Joren-Thijs avatar Joren-Thijs commented on August 14, 2024 1

I'm going to add to this just to verify that I had the same issue. I created a node app and had Azure create the pipeline for me on github. It did this successfully. Then I created a .Net core API and tried to publish using the EXACT same method. It failed with error:
##[error]Failed to fetch credentials from Publish Profile. For more details on how to set publish profile credentials refer https://aka.ms/create-secrets-for-GitHub-workflows ##[error]Deployment Failed with Error: Error: Publish profile does not contain kudu URL

To fix:
Downloaded the publish profile from azure, edited the file, looked for publishUrl="waws-prod-bay-143.publish.azurewebsites.windows.net:443" and replaced it with publishUrl="[my-app-name].scm.azurewebsites.net:443" then copied the entire contents of the file and updated the secret stored in my github repository. Everything started working.

Also verified that in the publish config file for my Node app that the publishUrl was indeed pointing to scm.azurewebsites.net.

It's obvious this is a bug with the Github deployment in Azure, and specific to .Net Core (and probably other) apps.

Can confirm had the same issue, still on 14/10/2020. Replacing the URL fixed itπŸ‘

from webapps-deploy.

Jriles avatar Jriles commented on August 14, 2024 1

Also the fix works but you have to put your app name in for the [app-name] bit. Maybe this is obvious but I wasn't sure.

from webapps-deploy.

RoopeshNair avatar RoopeshNair commented on August 14, 2024

Do you have publishUrl attribute in your publishprofile file?

from webapps-deploy.

thechandanbhagat avatar thechandanbhagat commented on August 14, 2024

Having the same issue, our credentials were set up automatically via our App Center's Deployment center, after that didn't work we tried going manually via the error link (https://aka.ms/create-secrets-for-GitHub-workflows).

Is there any examples of what the secret value (publish profile) should look like?

@lcm98
Actually when you open the publish profile in any text editor, you need to add entire content of that file name as secret. I think to be precise, rhat should contain the publish setting of type web deploy with the publish url as
https://<-example->.scm.azurewebsites.net

from webapps-deploy.

lcm98 avatar lcm98 commented on August 14, 2024

Having the same issue, our credentials were set up automatically via our App Center's Deployment center, after that didn't work we tried going manually via the error link (https://aka.ms/create-secrets-for-GitHub-workflows).
Is there any examples of what the secret value (publish profile) should look like?

@lcm98
Actually when you open the publish profile in any text editor, you need to add entire content of that file name as secret. I think to be precise, rhat should contain the publish setting of type web deploy with the publish url as
https://<-example->.scm.azurewebsites.net

@chandan-g-bhagat
This is the Publish Profile I get from Azure (sensitive data removed)

<publishData>
     <publishProfile profileName="[app-name] - Web Deploy" publishMethod="MSDeploy" publishUrl="waws-prod.publish.azurewebsites.windows.net:443" msdeploySite="[app-name]" userName="$[app-name]" userPWD="***" destinationAppUrl="http://[app-name].azurewebsites.net" SQLServerDBConnectionString="" mySQLDBConnectionString="" hostingProviderForumLink="" controlPanelLink="http://windows.azure.com" webSystem="WebSites">
        <databases />
    </publishProfile>
    <publishProfile profileName="[app-name] - FTP" publishMethod="FTP" publishUrl="ftp://waws-prod.ftp.azurewebsites.windows.net/site/wwwroot" ftpPassiveMode="True" userName="[app-name]\$[app-name]" userPWD="***" destinationAppUrl="http://[app-name].azurewebsites.net" SQLServerDBConnectionString="" mySQLDBConnectionString="" hostingProviderForumLink="" controlPanelLink="http://windows.azure.com" webSystem="WebSites">
        <databases />
    </publishProfile>
    <publishProfile profileName="[app-name] - ReadOnly - FTP" publishMethod="FTP" publishUrl="ftp://waws-prod.ftp.azurewebsites.windows.net/site/wwwroot" ftpPassiveMode="True" userName="[app-name]\$[app-name]" userPWD="***" destinationAppUrl="http://[app-name].azurewebsites.net" SQLServerDBConnectionString="" mySQLDBConnectionString="" hostingProviderForumLink="" controlPanelLink="http://windows.azure.com" webSystem="WebSites">
        <databases />
    </publishProfile>
</publishData>

Do I include everything, the tags as well as all 3 publish profiles?

So I need to change the publishURL that they provide? Will get back to you with how that works.

from webapps-deploy.

lcm98 avatar lcm98 commented on August 14, 2024

@chandan-g-bhagat Ok I'll try that, should I include the 2 FTP publish profiles or remove them, or does it not matter?

from webapps-deploy.

thechandanbhagat avatar thechandanbhagat commented on August 14, 2024

@chandan-g-bhagat Ok I'll try that, should I include the 2 FTP publish profiles or remove them, or does it not matter?

@lcm98 I think it won't be any issues removing them. However, I didn't removed it. You can try it. But I can assure that it wouldn't affect removing those 2 ftp. You need MSDeploy though.

from webapps-deploy.

lcm98 avatar lcm98 commented on August 14, 2024

Yes that got it to work, thank you very much, was a life saver.

On a side note, we setup the publishing profile for another app service right after spending hours on this one, and it actually created the publishURL correctly, so we didn't have to change anything, which is kind of... funny?

from webapps-deploy.

thechandanbhagat avatar thechandanbhagat commented on August 14, 2024

Yes that got it to work, thank you very much, was a life saver.

On a side note, we setup the publishing profile for another app service right after spending hours on this one, and it actually created the publishURL correctly, so we didn't have to change anything, which is kind of... funny?

@lcm98 glad it worked. It took me a working day to figure this out. There might be some issues while fetching the publish profile. I didn't find any setting to generate scm url in publish profile. The new one has the kudu url. Not sure where we can change the settings for kudu url in publish profile. Good day!

from webapps-deploy.

kokuljose avatar kokuljose commented on August 14, 2024

A solution is described here.

from webapps-deploy.

Jriles avatar Jriles commented on August 14, 2024

Getting this bug with python 3.8 first deploy and successive deploys

from webapps-deploy.

olli1337 avatar olli1337 commented on August 14, 2024

I can confirm that this URL issue still exists. Also be careful to check the app name to match the app service name that you created in Azure.

from webapps-deploy.

rtheil avatar rtheil commented on August 14, 2024

My understanding of this issue is that it is not an issue of webapps-deploy, and thus not relevant here. It seems to be an Azure portal bug, which is incorrectly generating the script that calls webapps-deploy for certain app types, specifically .Net Core apps. I do not believe webapps-deploy has anything to do with generation of the script within Azure.

from webapps-deploy.

Jriles avatar Jriles commented on August 14, 2024

Its not just .Net core, like I stated above. And if it isn't an issue with webapps-deploy, even if this occurs during app deployment, shouldn't there be a new issue opened and a link to it here maybe?

from webapps-deploy.

erfannariman avatar erfannariman commented on August 14, 2024

For those who it might interest, I've opened an issue on docs.microsoft.com as well.

from webapps-deploy.

dtmzr avatar dtmzr commented on August 14, 2024

@erfannariman can confirm that this works and in my opinion, is the best / most consistent workaround. Thanks a lot for putting effort into this πŸ™

from webapps-deploy.

Ankuraxz avatar Ankuraxz commented on August 14, 2024

set WEBSITE_WEBDEPLOY_USE_SCM = true in application settings
Disconnect GitHub & delete workflow file
Reconnect & Redeploy

from webapps-deploy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.