Nuget restore failing with error "The user name or password is incorrect."
During Nuget restore operations, customers are periodically seeing the error
"The user name and password is incorrect."
We are investigating this and will update the thread as soon as we have more information.
Here is some sample log output when this error occurs:
2017-11-13T19:48:53.732 Installing WindowsAzure.Storage 7.2.1.
2017-11-13T19:48:53.794 Installing Microsoft.Bot.Builder 3.9.0.0.
2017-11-13T19:48:53.825 Installing Microsoft.Azure.DocumentDB 1.11.0.
2017-11-13T19:48:53.982 Installing Microsoft.Bot.Builder.History 3.0.6.
2017-11-13T19:49:13.403 The user name or password is incorrect.
2017-11-13T19:49:13.423
2017-11-13T19:49:13.423
2017-11-13T19:49:13.434 Packages restored.
2017-11-13T19:49:23.325 Function compilation error
Though the scenario is quite different, https://github.com/projectkudu/kudu/issues/2622 likely has the same root cause.
Also, from StackOverflow: https://stackoverflow.com/questions/47295401/azure-function-nuget-cache-restore-failing-with-the-user-name-or-password-is-in
I just ran into the same issue. For me it came up while trying to add System.Runtime.Serialization.Formatters 4.0.0.0
Once I realized that the version I was looking for instead was 4.0.1.0, I stopped getting that error.
@paulbatum maybe you can check the versions that you are trying to add, if they're available?
@dersia that's odd, and I'm thinking this might be coincidental, and that this assembly version does not matter.
For what it is worth, I want to confirm that I am getting the same error.
2017-11-16T00:44:29.544 OK https://api.nuget.org/v3-flatcontainer/edjcase.jsonrpc.client/index.json 273ms 2017-11-16T00:44:29.544 GET https://api.nuget.org/v3-flatcontainer/edjcase.jsonrpc.client/1.3.1/edjcase.jsonrpc.client.1.3.1.nupkg 2017-11-16T00:44:29.786 OK https://api.nuget.org/v3-flatcontainer/edjcase.jsonrpc.client/1.3.1/edjcase.jsonrpc.client.1.3.1.nupkg 231ms 2017-11-16T00:44:29.848 GET https://api.nuget.org/v3-flatcontainer/edjcase.jsonrpc.core/index.json 2017-11-16T00:44:30.000 OK https://api.nuget.org/v3-flatcontainer/bouncycastle/1.8.1/bouncycastle.1.8.1.nupkg 956ms 2017-11-16T00:44:30.074 OK https://api.nuget.org/v3-flatcontainer/edjcase.jsonrpc.core/index.json 228ms 2017-11-16T00:44:30.090 GET https://api.nuget.org/v3-flatcontainer/edjcase.jsonrpc.core/1.3.1/edjcase.jsonrpc.core.1.3.1.nupkg 2017-11-16T00:44:30.143 OK https://api.nuget.org/v3-flatcontainer/edjcase.jsonrpc.core/1.3.1/edjcase.jsonrpc.core.1.3.1.nupkg 63ms 2017-11-16T00:44:30.268 Installing EdjCase.JsonRpc.Core 1.3.1. 2017-11-16T00:44:30.880 Installing EdjCase.JsonRpc.Client 1.3.1. 2017-11-16T00:44:31.425 Installing Nethereum.RLP 2.1.0. 2017-11-16T00:44:31.722 Installing BouncyCastle 1.8.1. 2017-11-16T00:44:31.894 Installing Nethereum.JsonRpc.Client 2.1.0. 2017-11-16T00:44:32.276 Installing Nethereum.JsonRpc.RpcClient 2.1.0. 2017-11-16T00:44:32.698 Installing Nethereum.KeyStore 2.1.0. 2017-11-16T00:44:33.120 Installing Nethereum.Signer 2.1.0. 2017-11-16T00:44:33.385 Installing Nethereum.ABI 2.1.0. 2017-11-16T00:44:33.656 Installing Nethereum.Util 2.1.0. 2017-11-16T00:44:34.140 Installing Nethereum.RPC 2.1.0. 2017-11-16T00:44:34.515 Installing Nethereum.Hex 2.1.0. 2017-11-16T00:44:34.817 Installing Nethereum.Contracts 2.1.0. 2017-11-16T00:44:35.161 Installing Nethereum.Web3 2.1.0. > 2017-11-16T00:44:36.177 The user name or password is incorrect. 2017-11-16T00:44:36.196 2017-11-16T00:44:36.196 2017-11-16T00:44:36.196 Packages restored. 2017-11-16T00:44:36.302 Function compilation error 2017-11-16T00:44:36.302 run.csx(10,7): error CS0246: The type or namespace name 'Nethereum' could not be found (are you missing a using directive or an assembly reference?) 2017-11-16T00:44:36.302 run.csx(26,5): error CS0246: The type or namespace name 'Accounts' could not be found (are you missing a using directive or an assembly reference?)
Can you all try setting an Azure App Setting named WEBSITE_USE_PLACEHOLDER, with value 0? With suspect that it will solve the issue.
I set the key.
First of all, everything is just very slow. Even switching between functions, it takes forever to show the code even. When I tried to run it, I received this error:
We are not able to get the key swaggerdocumentationkey. Please check the runtime logs for any errors or try again later. Session Id: b63ce6c50eed47ea976e541d71c62729
Timestamp: 2017-11-16T04:50:34.264Z
@barissaydag That's likely a just result of the app restarting after setting the app setting. Try closing the app and coming back to it and it should be ok.
Yup, you were right.
OK, I don't see the "The user name or password is incorrect" error anymore. Also, project.lock.json is being created. I am testing more. But so far it seems like it solved the problem.
@barissaydag thanks for confirming! Note that you will get a slower cold start as a result of not having that flag (which may or may not matter, depending on scenario). We are working on fixing the root issue, though we don't yet have a clear ETA.
No problem, thanks for helping despite the late hour. I am looking forward to the permanent fix of the root cause.
+1
Encountered the same problem, and the workaround above fixed it. Thanks!
Just a quick update - we have a fix for this issue and its in our next deployment train. Current ETA for full global deployment of the fix is 12/5. Feel free to ping me on this issue if I have not sent another update by then.
Once the fix is deployed, its important that you remove the workaround (setting WEBSITE_USE_PLACEHOLDER to 0) so that your function app gets good cold start performance.
Also encountered the same problem and am using the workaround. Is there any new information on the deployment status of the fix? Was this pushed on 12/5?
@richard-spice The deployment completed a few a days ago. If you are still getting this error then I need to investigate. Can you give me a UTC timestamp and the region? That should be enough for me to track it down.
Thanks for the quick feedback. We're not experiencing the error at this time, but I didn't want to remove the the workaround setting until I saw confirmation that the fix was deployed. We will make the change in the upcoming days, and I'll report back with the information you requested if there is a problem. Thanks!
Just to make it clear for readers of this thread:
Fix is deployed globally. We now recommend removing the WEBSITE_USE_PLACEHOLDER=0 setting to ensure your application gets better cold start performance.
@richard-spice good to hear. Sorry for not updating the thread when the deployment completed.
Hi @paulbatum
Tested with following project.json and it works fine now :-)
{
"frameworks": {
"net46":{
"dependencies": {
"Microsoft.Azure.Devices": "1.5.0-preview-001"
}
}
}
}