Even vanilla Azure function will not publish from VS - deployment

I created an Azure function tonight in Visual Studio and had errors publishing it. So I created a vanilla HTTP triggered one, and tried to publish it, no code changes. Same errors. I am logged in to my Azure account, I've downloaded a publish profile, and reset it and tried again. I've done it by selecting the function app in the IDE. I've tried figuring out how to FTP the function app, but I pushed files up and nothing appeared in the portal (I copied the build folder into the wwwroot folder on the server). In FTP, I can see in the deployment folder some files are there, that denote that an attempted deployment failed, so it's talking to Azure, and deciding it hasn't worked.
The error log is not very helpful:
30/05/2019 8:46:11 PM
System.AggregateException: One or more errors occurred. ---> System.Exception: Publishing failed.
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.Publish.Framework.Model.DefaultPublishSteps.<>c__DisplayClass26_0.b__2()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Publish.Framework.Model.DefaultPublishSteps.d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel.d__176.MoveNext()
---> (Inner Exception #0) System.Exception: Publishing failed.<---
===================
I'd be quite happy to do it via FTP if there was a guide on what to put where.

I'm not sure about the Visual Studio issue. I ran into something similar once, and it required me to log out of my Azure subscription and log back in before it got resolved. You may want to give that a try if you haven't already.
Regarding alternate deployment strategies, I suggest you take a look at the Run from Package deployment feature. It allows you to publish your app as a zip file and run it that way. Other MS-specific tools (VS Code, Azure Pipelines, etc.) are moving towards using this mechanism rather than the legacy "MSDeploy" mechanism that Visual Studio uses today.

So, I found the issue. If you create a function inside Azure and download it, it will use csx files, which is not what I wanted, but, the local.settings.json contains a ton of settings that are not in the VS generated file. Copying those into my project made it all work. You should use your own download, so the settings are correct for you, but, it was settings like this:
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"WEBSITE_SLOT_NAME": "Production",
"FUNCTIONS_EXTENSION_VERSION": "~2",
"ScmType": "None",
"WEBSITE_AUTH_ENABLED": "False",
"APPINSIGHTS_INSTRUMENTATIONKEY": "xxxxxx",
"WEBSITE_NODE_DEFAULT_VERSION": "10.14.1",
"WEBSITE_CONTENTAZUREFILECONNECTIONSTRING": "DefaultEndpointsProtocol=xsxxxxxx",
"WEBSITE_CONTENTSHARE": "xxxx",
"WEBSITE_SITE_NAME": "xxxxxx",
"AzureWebJobsStorage": "DefaultEndpointsProtocol=xxxxxxxx"
Deploying also caused my project to download missing DLLs, so it seems the wizard in Visual Studio is a complete wash.

Related

VssServiceResponseException: Forbidden in Azure Pipelines

I'm using Azure Pipelines to run automated tests via VSTest Platform (V2). The deployment group I'm using has no Internet access and is private. I have the task currently set up to run Nunit tests in the project via the test assemblies. The deployment group has VSTest Platform installed on it and I specify the path to vstest.console.exe in the task. The build artifact is downloaded from the pipeline.
The error I'm getting during the VSTest task is this:
Unhandled exception ocurred: Microsoft.VisualStudio.Services.WebApi.VssServiceResponseException: Forbidden
Followed by a stack trace and then this shortly after:
Error: The process 'C:\agent\A1\_work\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.164.2\Modules\DTAExecutionHost.exe' failed with exit code 3762504530
I can attach the full log if need be, but I'm just trying to get some general direction at the moment.
First off, what is VssService? I'm assuming it has something to do with Visual Studio, but the only things I can find with the VSS acronym are Visual SourceSafe (Microsoft source control software from ~2005, so I really doubt that's it) and something to do with Cisco network switches.
Second, what is DTAExecutionHost?
Third, where can I find information on that error code?

stale deployment in WAS

I'm learning to use IBM WebSphere v8.8.5 for JavaEE development. I'm using MyEclipse as the development environment.
Sometimes when I debug my project from inside MyEclipse, I could see errors like this
00000091 ComponentMeta E WSVR0603E: ComponentMetaDataAccessor beginContext method received a NULL ComponentMetaData.
00000091 AlarmListener E SCHD0063E: A task with ID 953 (mi-online-app-1.0.0-SNAPSHOT#my-online-services-1.0.0-SNAPSHOT.jar#PaymentResultCheckServiceBean) failed to run on Scheduler WebSphere_EJB_Timer_Service (WebSphere_EJB_Timer_Service) because of an exception: java.lang.NullPointerException.
But actually, there's no PaymentResultCheckServiceBean in my project. It used to be in the project but I have renamed it.
When I develop in MyEclipse, I add a WAS server. Sometimes if anything wrong, I'll directly delete the whole workspace from disk and create a new one. So I'm wondering if these ways leave some stale data in WAS folder so that when WAS starts, old deployment got to run. But I've checked C:\IBM\WebSphere85\AppServer\profiles\AppSrv01\installedApps\myserver, there's nothing here.

OpsHub Migration to VSO can't get past changeset and stops running

I've tried this twice with the same result.
Error Message: OH-SCM-009 Error Occurred while sync. Could not find file 'O:\w11_10_0'
Version: OpsHub Integration Manager Framework-OVSMU-V1.0.1.006
Here are the changeset details
Close OpsHub Migration Utility.
Delete Folder w11_10_0 and Start Migration utility again.
Which will again create new folder and start syncing.
If you still getting this error, Can you please zip up and send us the log files from location :\Program Files\OpsHub Visual Studio Online Migration Utility\logs and email them to ovsmu#opshub.com Please include a reference to this request in your email so we will provide proper resolution to this
At one point if you moved code from one TFS Team Project to a New Team Project and DELETED the original team project then this may cause this issue.

WorkFlow designer fails to load in VS 2013

We are using Work Flow's in our project and it is developed in VS 2010. Recently we migrated to VS 2013 Professional. Now when we try to open a Work Flow Activity in VS 2013, we get the following error message:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.SharePoint.WorkflowExtensions, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.SharePoint.WorkflowExtensions, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'"
We could find the "Microsoft.VisualStudio.SharePoint.WorkflowExtensions.dll" under "C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\WorkflowDesigner", but still when we open the WF designer, we get the FileNotFound exception.
When we close and open the WF again, we get the below error message :
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Microsoft.VisualStudio.Activities.EditorPane.set_FileName(String value)
at Microsoft.VisualStudio.Activities.EditorPane.Microsoft.VisualStudio.Shell.Interop.IPersistFileFormat.Load(String fileName, UInt32 formatMode, Int32 readOnly)
Any idea what is causing the issue?
The exception is related to missing Workflow Manager or Workflow Manager Tools on the machine which might not have installed successfully with VS installation at first.
However, you can fix this issue by installing/reinstalling them and dependencies. You might need to restart the machine as well.
Here is the link to download the installers separately: http://www.microsoft.com/en-my/download/details.aspx?id=35375
Looks like we got the root cause now. There were some internet restrictions imposed on the PC's when VS 2013 was installed for which some of the WF related stuffs didn't get downloaded/updated properly.
We tried to re-install VS 2013 without Internet restrictions, and things started to work fine.
Hope this helps someone in need. :)
This worked for me: my workflow was referencing a custom activity I did not have in the /bin folder. Once I placed that custom activity (.dll) into the bin folder, I had no problems.

Eclipse Team Foundation Server plugin (Team Explorer Everywhere) giving null errors

I have been using the TFS plugin for eclipse with my companies TFS server for several months. Last week, my laptop crashed while eclipse was open and a connection to the TFS was present. Now, every time I launch eclipse, I get an error stating a connection could not be made to the server, throwing a NullPointerException.
To try to fix this, I cleaned eclipse from my system and removed the installed plugin and then reinstalled eclipse and the TFS plugin. Now, I am no longer getting this connection error on launch. I added the original TFS to the list of servers in eclipse and it can see all of the projects (see http://i.imgur.com/SbgyuRx.png).
However, trying to use any of the projects leads to a screen with an error message saying Error querying workspaces: null. The error log shows the plugin in question as com.microsot.tfs.client.common, with the stack trace saying An exception stack trace is not available.
I am using the same exact plugin installation that I originally used. I have no idea why I'm getting these errors.
The error logs may be helpful. You can view them by going to Help > Team Explorer Everywhere Support, then clicking on the Logs tab.
Ultimately, though, this is probably some corrupt configuration files. TEE performs some various background tasks and I suspect one of those was interrupted in the middle of some file I/O when your computer crashed. Deleting the cache directory may be helpful:
~/.microsoft/Team Foundation
When you restart Eclipse, you should get a dialog box that indicates that your TFS server information cannot be located, but when you reconnect to that TFS server, your projects should return to being TFS managed.