text:
Failed to locate opened application

Hello,
Using Robotframework+appiumLibrary and WinAppDriver, I am trying to launch a Windows Desktop app that is made using WinForms but it is consistently giving me a "Failed to locate opened application window with appId: C:/xxx/xxx/installer-win46.exe, and processId: 280. The app launches successfully and displayed on-screen but this message indicated to me that it is unable to get the sessionId and the framework is unable to interact with it. I checked the Task Manager and found the process and processId matching what WinAppDriver claimed that it cannot locate.
It will also fail at the Tear Down step, saying that "No application is open". Why is it not detecting the app? I saw some other posting about this issue, but they have a workaround for this issue because they are using a full fledged programming language. Is there any workaround for this for Robotframework?
My Robotframework launch script looks like this:
${REMOTE_URL}     http://127.0.0.1:4723
${APP}  C:/xxx/xxx/installer-win64.exe

	Open Application  ${REMOTE_URL}  platformName=Windows  deviceName=mymachine  app=${APP}  automationName=appium

The below is the Inspect.exe output indicating that the app is a WindowsForm 10 app.
How found:	Mouse move (712,398)
	hwnd=0x00030694 ??bit class="WindowsForms10.Window.8.app.0.34f5582_r6_ad1" style=0x16C80000 ex=0x50101
ChildId:	0
Interfaces:	IEnumVARIANT IOleWindow IAccIdentity
Impl:	Local oleacc proxy
AnnotationID:	0100008094060300FEFFFFFF00000000
Name:	[null]
Value:	"Management Services"
Role:	title bar (0x1)
State:	focusable (0x100000)
Location:	{l:431, t:377, w:468, h:23}
Selection:
Description:	"Displays the name of the window and contains controls to manipulate it"
Kbshortcut:	[null]
DefAction:	[Error: hr=0x80020003 - Member not found.]
Help:	[null]
HelpTopic:	""
ChildCount:	5
Window:	0x30694
FirstChild:	"Close" : push button : normal
LastChild:	"Close" : push button : normal
Next:	"Management Services" : client : focusable
Previous:	[Error: hr=0x80004005 - Unspecified error]
Left:	[Error: hr=0x80004005 - Unspecified error]
Up:	[null]
Right:	[null]
Down:	"Management Services" : client : focusable
IsContentElement:	false
Other Props:	Object has no additional properties
Children:	"IME" : push button : invisible
	"Minimize" : push button : invisible
	"Maximize" : push button : invisible
	"Context help" : push button : invisible
	"Close" : push button : normal
Ancestors:	"Management Services" : window : moveable,focusable
	"Desktop" : client : focusable
	"Desktop" : window : focusable
	[ No Parent ]

Screenshot:

My environment:
Windows 10 x64
Python 2.7.13
WinAppDriver running on Administrator console
Robot Framework 3.0.2
AppiumLibrary 1.4.5.4
Thanks for any help/info given.

Hi @auyong,
It is possible that the process you launched started a different process that ultimately own the application window you see on screen. The error message you posted seems to indicate that this is the case. You can use the inspect tool or Task Manager to see the process id associated with the application window. It is very likely a different process id than the one you are trying to match. Let us know if this is not the case.
The good news is you can create a session by attaching to this application window. This should enable you to have a working session to perform all the operations you need on WinAppDriver.

Hello @timotiusmargo ,
Thanks for getting back so quickly. I used Task Manager, found the process (which has a different name in the Process tab from the Details tab), right clicked on it-> "go to details" and confirmed that the PID and Process Name in Details tab are the same as the one that is reported by the failure. Please see screenshot:
The main "Process" tab of Task Manager shows a different name for the Process:

Go to Details tab of Task Manager, shows correct Process Name and PID, that matches cmd console error:

So, the question now is, which Process Name is being used by WinAppDriver/AppiumLibrary? WinAppDriver's appium server reported the name for the Details tab in the Task Manager, but if you manually look in the Processes tab, it has a different name.
For attaching to the application window, I am not sure how that can be done in Robotframework using the appiumLibrary, as I do not see any keywords to set the capability. It only has a "Get Capability" keyword.

Hi @auyong
Can you describe a little bit more the architecture of the application that you're trying to automate? Are you installing it when you launch it or is it already installed? Is the Console-5.4.2-win64 application a WinForms application or a console application? Having the application in Task Manager doesn't necessarily imply that that process has a window associated with it.
Is there any way for us to replicate this in house?

Hi @khouzam
Thanks for looking into this. The application that I am trying to automate is an installer. Actually there are multiple ways to install the app. One way is using a setup.exe file that calls a WinForm10 application to do the installation (Inspect.exe output at the top of this thread).
Another way is the xxx_Console-5.4.2-win64.exe file that creates an "MsiDialogCloseClass" window (according to Inspect: see below) to do the installation. However, both ways I tried to automate, I am facing the same error message of "failed to locate opened application window...".
How found:	Mouse move (721,327)
	hwnd=0x000B039A 64bit class="MsiDialogCloseClass" style=0x14CA0000 ex=0x40100
RuntimeId:	"[42.721818.1.-2147483647.721818.-2.0]"
BoundingRectangle:	{l:628 t:315 r:1105 b:338}
ProcessId:	6488
ControlType:	UIA_TitleBarControlTypeId (0xC375)
LocalizedControlType:	"title bar"
HasKeyboardFocus:	false
IsKeyboardFocusable:	true
IsEnabled:	true
IsContentElement:	false
IsPassword:	false
IsOffscreen:	false
ProviderDescription:	"[pid:6232,hwnd:0x0 Annotation:Microsoft: Annotation Proxy (unmanaged:uiautomationcore.dll); Main(parent link):Microsoft: MSAA Proxy (unmanaged:uiautomationcore.dll)]"
Value.IsReadOnly:	false
Value.Value:	"Access Manager 5.4.2.648 Setup"
IsDockPatternAvailable:	false
IsExpandCollapsePatternAvailable:	false
IsGridItemPatternAvailable:	false
IsGridPatternAvailable:	false
IsInvokePatternAvailable:	false
IsMultipleViewPatternAvailable:	false
IsRangeValuePatternAvailable:	false
IsScrollPatternAvailable:	false
IsScrollItemPatternAvailable:	false
IsSelectionItemPatternAvailable:	false
IsSelectionPatternAvailable:	false
IsTablePatternAvailable:	false
IsTableItemPatternAvailable:	false
IsTextPatternAvailable:	false
IsTogglePatternAvailable:	false
IsTransformPatternAvailable:	false
IsValuePatternAvailable:	true
IsWindowPatternAvailable:	false
IsItemContainerPatternAvailable:	false
IsVirtualizedItemPatternAvailable:	false
FirstChild:	"System" menu bar
LastChild:	"Close" button
Next:	[null]
Previous:	"Welcome to the Access Manager 5.4.2.648 Setup Wizard" image
Other Props:	Object has no additional properties
Children:	"System" menu bar
	"Minimize" button
	"Maximize" button
	"Close" button
Ancestors:	"Access Manager 5.4.2.648 Setup" window
	"Desktop" pane
	[ No Parent ]

I did a little more digging and also discovered that by running the xxx_Console-5.4.2-win64.exe file, it also generated 3X Windows Installer processes in the Task Manager. I believe with a high degree of confidence that one of these Windows Installer processes is the owner of this MsiDialogCloseClass window, as I tested by ending the tasks one by one, and the MsiDialogCloseClass window only closed after I closed one of the Windows Installer process.
The suggestion to do "attaching to this application window" by @timotiusmargo , I do not think that it will work for me because of this issue filed by vickywyy (we are both using robotframework):
https://github.com/appium/appium/issues/9106
Thanks

Latest Update:
I am finally able to identify the app using the "Attaching to this application window" technique, in Robotframework.
Here's the code snippet that worked for me:
#Go back to Root (Desktop)
Open Application  ${REMOTE_URL}  platformName=Windows  deviceName=mymachine app=Root  automationName=appium
#Put the App's Name into a variable
${element}  Get Webelement  name="<the Name parameter of your app in Inspect>"
#Open the app using the variable
Open Application  ${REMOTE_URL}  platformName=Windows  deviceName=mymachine  appTopLevelWindow=${element}	 automationName=appium

Thanks for the info and help!

Hello,
It seems my joy is shortlived. Somehow, the "Open Application  ${REMOTE_URL}  platformName=Windows  deviceName=mymachine  appTopLevelWindow=${element}	 automationName=appium" line is failing with "Could not find any recognizable digits". I can workaround it by using the keyword "Run Keyword and Ignore Error" so that the test keeps running.
See the screenshot below. It is pretty obvious ${element} is valid but it encounters the "could not find recognizable digits" when I am trying to point to that app using appTopLevelWindow. Thoughts?

Hi @auyong,
Can you please paste the WinAppDriver.exe logs that you can get from the console? We will need to see what is being passed into WinAppDriver, which command/API endpoint, and the error returned to understand the issue.

Hi @timotiusmargo,
Here is the log:
C:\WinAppDriver>WinAppDriver.exe
Windows Application Driver listening for requests at: http://127.0.0.1:4723/
Press ENTER to exit.
==========================================
POST /session HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: close
Content-Length: 508
Content-Type: application/json;charset=UTF-8
Host: 127.0.0.1:4723
User-Agent: Python http auth
{"capabilities": {"alwaysMatch": {"deviceName": "ranAuto", "app": "C:/temp/Suite-2017.2-mgmt-win64/Manage/Access Manager/Console-5.4.2-win64.exe", "platformName": "Windows", "appWorkingDir": "C:/testFramework/testScripts"}, "firstMatch": []}, "desiredCapabilities": {"deviceName": "ranAuto", "app": "C:/temp/Suite-2017.2-mgmt-win64/Manage/Access Manager/Console-5.4.2-win64.exe", "platformName": "Windows", "appWorkingDir": "C:/testFramework/testScripts"}}
HTTP/1.1 500 Internal Error
Content-Length: 239
Content-Type: application/json
{"status":13,"value":{"error":"unknown error","message":"Failed to locate opened application window with appId: C:/temp/Suite-2017.2-mgmt-win64/Manage/Access Manager/Console-5.4.2-win64.exe, and processId: 6908"}}
==========================================
POST /session HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: close
Content-Length: 268
Content-Type: application/json;charset=UTF-8
Host: 127.0.0.1:4723
User-Agent: Python http auth
{"capabilities": {"alwaysMatch": {"deviceName": "ranAuto", "app": "Root", "platformName": "Windows", "automationName": "appium"}, "firstMatch": []}, "desiredCapabilities": {"deviceName": "ranAuto", "app": "Root", "platformName": "Windows", "automationName": "appium"}}
HTTP/1.1 200 OK
Content-Length: 111
Content-Type: application/json
{"sessionId":"78D3A0E6-86B4-4194-A98B-DA30B7B89880","status":0,"value":{"app":"Root","platformName":"Windows"}}
==========================================
POST /session/78D3A0E6-86B4-4194-A98B-DA30B7B89880/elements HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: close
Content-Length: 122
Content-Type: application/json;charset=UTF-8
Host: 127.0.0.1:4723
User-Agent: Python http auth
{"using": "name", "sessionId": "78D3A0E6-86B4-4194-A98B-DA30B7B89880", "value": "Access Manager 5.4.2.648 Setup"}
HTTP/1.1 200 OK
Content-Length: 97
Content-Type: application/json
{"sessionId":"78D3A0E6-86B4-4194-A98B-DA30B7B89880","status":0,"value":[{"ELEMENT":"42.787810"}]}
==========================================
POST /session HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: close
Content-Length: 436
Content-Type: application/json;charset=UTF-8
Host: 127.0.0.1:4723
User-Agent: Python http auth
HTTP/1.1 500 Internal Error
Content-Length: 99
Content-Type: application/json
{"status":13,"value":{"error":"unknown error","message":"Could not find any recognizable digits."}}
==========================================
GET /session/78D3A0E6-86B4-4194-A98B-DA30B7B89880/screenshot HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: close
Content-Type: application/json;charset=UTF-8
Host: 127.0.0.1:4723
User-Agent: Python http auth
HTTP/1.1 200 OK
Content-Length: 293078
Content-Type: application/json
giB0ER887BahaQIWKyucPXsWq1YO3DH26tUrdAg77HzV1T1GjBhxyW5jx5NtzNlms50/fx58oHzHHXdAFQrwQ6qkpOTkyZN4RBqM4I+jgCcU2G0o13lRm0YLtEJhwIABY8eOhcK5c+c2bNiwdetWKEAc3rGlufk8xIM533vvPWPGjIEuMAr4HDp0aOTIkUOGDIGxICZO4/rrr58+fXrPnj0hwhdffLFu3bp33nnn008/PXjwIGrEPKZYBfTCCeCSWVndGXTj7kE8NTNzuP760VOnpl59da9z5y7s2P7F3/72t+LiYgh++PBhVORtFpblA7tDfLBgELDImFCAphtvvBEmCeV//GP3u+8V1365T7ppM0FrYTFdxWyiI3A5oUwQnZW4KVP6Htr8KmN9lXJ7hpoDWgmJG6Ps5vZXq/pOkebOTEpe3SJlM [...]
==========================================
POST /session HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: close
Content-Length: 508
Content-Type: application/json;charset=UTF-8
Host: 127.0.0.1:4723
User-Agent: Python http auth
{"capabilities": {"alwaysMatch": {"deviceName": "ranAuto", "app": "C:/temp/Suite-2017.2-mgmt-win64/Manage/Access Manager/Console-5.4.2-win64.exe", "platformName": "Windows", "appWorkingDir": "C:/testFramework/testScripts"}, "firstMatch": []}, "desiredCapabilities": {"deviceName": "ranAuto", "app": "C:/temp/Suite-2017.2-mgmt-win64/Manage/Access Manager/Console-5.4.2-win64.exe", "platformName": "Windows", "appWorkingDir": "C:/testFramework/testScripts"}}
HTTP/1.1 500 Internal Error
Content-Length: 239
Content-Type: application/json
{"status":13,"value":{"error":"unknown error","message":"Failed to locate opened application window with appId: C:/temp/Suite-2017.2-mgmt-win64/Manage/Access Manager/Console-5.4.2-win64.exe, and processId: 8240"}}
==========================================
GET /session/78D3A0E6-86B4-4194-A98B-DA30B7B89880/screenshot HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: close
Content-Type: application/json;charset=UTF-8
Host: 127.0.0.1:4723
User-Agent: Python http auth
HTTP/1.1 200 OK
Content-Length: 313410
Content-Type: application/json
kzw/+eST1IDsixYt6j/Rt+WmG6kZnX3hhRe6urrOP//8G2+88ciRI93d3VQgO03p+eefpy40veXLl3/hC1+gvsRjjz22cuXK1NRUKre3t7///vtf/OIXW1pahAb9sY99jCamj3QWArEOD/lYxau9cRSCV8ff/va311xzjTBqSUsEZKRqfDy7LRAAYDZx1113LVmyZP78+fPmzaMXfk9Pz3XXXTcwMNDW1vbKK6/ccccd1CZKRXQJzODRhoPKpk2rZJVBpiNxunQc4YGfQiAiiN90dNQY84Qso6OjIyMjw8PD9Obh9OnTn2+IOnnXStEdzGxStu1nKriWXiNn96HtSoUuEhoAMG4gQAMAAAAgYky8AO2tkAbEYpQKY9++fSkpKWvWrBFVOkufLeko7KtXrxb2MBnjH2KDe5Nl4ZOiuVF7MQ36fEvwk [...]
==========================================
POST /session HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: close
Content-Length: 268
Content-Type: application/json;charset=UTF-8
Host: 127.0.0.1:4723
User-Agent: Python http auth
{"capabilities": {"alwaysMatch": {"deviceName": "ranAuto", "app": "Root", "platformName": "Windows", "automationName": "appium"}, "firstMatch": []}, "desiredCapabilities": {"deviceName": "ranAuto", "app": "Root", "platformName": "Windows", "automationName": "appium"}}
HTTP/1.1 200 OK
Content-Length: 111
Content-Type: application/json
{"sessionId":"10419D48-B95B-425B-A8B2-844EDE03D9D6","status":0,"value":{"app":"Root","platformName":"Windows"}}
==========================================
POST /session/10419D48-B95B-425B-A8B2-844EDE03D9D6/elements HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: close
Content-Length: 122
Content-Type: application/json;charset=UTF-8
Host: 127.0.0.1:4723
User-Agent: Python http auth
{"using": "name", "sessionId": "10419D48-B95B-425B-A8B2-844EDE03D9D6", "value": "Access Manager 5.4.2.648 Setup"}
HTTP/1.1 200 OK
Content-Length: 121
Content-Type: application/json
{"sessionId":"10419D48-B95B-425B-A8B2-844EDE03D9D6","status":0,"value":[{"ELEMENT":"42.329272"},{"ELEMENT":"42.787810"}]}
==========================================
POST /session HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: close
Content-Length: 436
Content-Type: application/json;charset=UTF-8
Host: 127.0.0.1:4723
User-Agent: Python http auth
{"capabilities": {"alwaysMatch": {"deviceName": "ranAuto", "automationName": "appium", "platformName": "Windows", "appTopLevelWindow": {"element-6066-11e4-a52e-4f735466cecf": "42.329272", "ELEMENT": "42.329272"}}, "firstMatch": []}, "desiredCapabilities": {"deviceName": "ranAuto", "automationName": "appium", "platformName": "Windows", "appTopLevelWindow": {"element-6066-11e4-a52e-4f735466cecf": "42.329272", "ELEMENT": "42.329272"}}}
HTTP/1.1 500 Internal Error
Content-Length: 99
Content-Type: application/json
{"status":13,"value":{"error":"unknown error","message":"Could not find any recognizable digits."}}
==========================================
GET /session/10419D48-B95B-425B-A8B2-844EDE03D9D6/screenshot HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: close
Content-Type: application/json;charset=UTF-8
Host: 127.0.0.1:4723
User-Agent: Python http auth
HTTP/1.1 200 OK
Content-Length: 279546
Content-Type: application/json
I1NEp2kbIQnORm1dqynQUaJVdlve9PioNbP2iTkY99U+YY4KI0eP2yYi7n9vjTZJ00/27pk0dhRtHk0QBEEQBEG0B+0rQFcsm9MusqdVv+2VTzvBhqtD6jNBEAQRVVBdEyecgFOJC36YROw7efIk+qCIXF9ff6jqsObxujXv3/f8DaoSE6/p06cPb6Q1Nja6OAMHDvznf/7nvLy80aNHDx8+HAq4hrqsrAyagAMcUYPu0aPHgw8+OGrUqGuvHX3//fejJv7FF19AFXD99df/7Gc/mzp1anJK6qjR1+bn52NHFRUVbGmzpu3du/fo0aPQZMyYMffeMyM1NfWWSTdPmzYN3cCOAjoTvjUtLi5u9uzZ0Be45c+4t2fPnmDcvnUbOLBHAmps72m3u9uNN96Ym3NbctKwvLumQw7gA6necuvNE7+fOWLEi [...]

Hi @timotiusmargo
did you find anything that looks out of place within the logs?

Hi @auyong,
Below is the line that I am interested in:
POST /session HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: close
Content-Length: 436
Content-Type: application/json;charset=UTF-8
Host: 127.0.0.1:4723
User-Agent: Python http auth
{"capabilities": {"alwaysMatch": {"deviceName": "ranAuto", "automationName": "appium", "platformName": "Windows", "appTopLevelWindow": {"element-6066-11e4-a52e-4f735466cecf": "42.329272", "ELEMENT": "42.329272"}}, "firstMatch": []}, "desiredCapabilities": {"deviceName": "ranAuto", "automationName": "appium", "platformName": "Windows", "appTopLevelWindow": {"element-6066-11e4-a52e-4f735466cecf": "42.329272", "ELEMENT": "42.329272"}}}
HTTP/1.1 500 Internal Error
Content-Length: 99
Content-Type: application/json
{"status":13,"value":{"error":"unknown error","message":"Could not find any recognizable digits."}}

The appTopLevelWindow capabilities needs to be the window handle (e.g. 0xB822E2) that is typically retrieved by getting the window handle attribute from the Access Manager element you found. Consider the following example from https://github.com/Microsoft/WinAppDriver#attaching-to-an-existing-app-window:
var CortanaWindow = DesktopSession.FindElementByName("Cortana");
var CortanaTopLevelWindowHandle = CortanaWindow.GetAttribute("NativeWindowHandle");
CortanaTopLevelWindowHandle = (int.Parse(CortanaTopLevelWindowHandle)).ToString("x"); // Convert to Hex

// Create session by attaching to Cortana top level window
DesiredCapabilities appCapabilities = new DesiredCapabilities();
appCapabilities.SetCapability("appTopLevelWindow", CortanaTopLevelWindowHandle);

In your test, you seemed to provide the element id as top level window. Can you replace it value with the element window handle attribute?

hi @timotiusmargo
I am also facing the same issue as @auyong .Here are the error logs -
==========================================
POST /session HTTP/1.1
Accept-Encoding: gzip,deflate
Connection: Keep-Alive
Content-Length: 178
Content-Type: application/json; charset=utf-8
Host: 127.0.0.1:4723
User-Agent: Apache-HttpClient/4.4.1 (Java/1.8.0_121)
{"desiredCapabilities":{"app":"C:\temp\xyz\Desktop-abc\QAConsole\QAconsole.exe","takesScreenshot":true,"platformName":"Windows","deviceName":"WindowsPC","platformVersion":"1.0"}}
HTTP/1.1 500 Internal Error
Content-Length: 183
Content-Type: application/json
{"status":13,"value":{"error":"unknown error","message":"Failed to locate opened application window with appId: C:\temp\xyz\Desktop-abc\QAConsole\QAconsole.exe, and processId: 6912"}}
As you have mentioned process id associated with the application window do not match. In the task manager PID is 2880 and but  WinAppDriver PID is 6912 .

Windows10 x64
Java.version: 1.8
WinAppDriver running on console
AppiumLibrary 5.0.0
Thanks
Deepak

hi @timotiusmargo @auyong
Can you help me to resolve this issue?
Thanks
Deepak

Hi @DeepakJadon,
As suggested above, you need to attach to an existing window once your application window is launched. Typically your application startup will look like below:

Create a session for your application (this will launch the process and the main window even though locating window may fail)
Wait until your application window shows up
Create a desktop session through which you can locate the application window you are interested
Retrieve the window handle of the application window you located
Create a session by providing the application top level window above

Thanks @timotiusmargo - Let me try your solution!

Hi @timotiusmargo
Case 1
I am using vbscript to launch my application as an administrator and can able to launch app successfully but getting this error ->>>org.openqa.selenium.WebDriverException: Failed to locate opened application window with appId
Case 2
If i directly use the exe of the application , cannot able to launch the application and getting this error ->>> org.openqa.selenium.WebDriverException: The requested operation requires elevation (WARNING: The server did not provide any stacktrace information)
As you said  i need to attached to an existing window once my application is launched. With the vb script i am able to launch ... but getting error [case 1 and case 2] while instantiating the driver
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", "Windows");
capabilities.setCapability("deviceName", "WindowsPC");
capabilities.setCapability("platformVersion", "1.0");
capabilities.setCapability("app", "Root");
capabilities.setCapability("app", "C:\Users\Desktop\test\console.exe"); [Case 2]
capabilities.setCapability("app", "C:\Users\Desktop\test\final.vbs"); [Case 1 ]
DesktopDriver = new WindowsDriver(new URL("http://127.0.0.1:4723"), capabilities); [Error while instantiating the driver]
DesktopDriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
String Handle = DesktopDriver.getWindowHandle();
WebElement ConsoleWindow = DesktopDriver.findElementByName("Log in");
String QAConsoleTopLevelWindowHandle = ConsoleWindow.getAttribute(Handle);
DesiredCapabilities appCapabilities = new DesiredCapabilities();
appCapabilities.setCapability("appTopLevelWindow",QAConsoleTopLevelWindowHandle);
ConsoleSession = new WindowsDriver(new URL("http://127.0.0.1:4723"), appCapabilities);
After my application gets launched i need to click on google image button.Here is the snapshot of my application

Whats is wrong with the code?
Thanks Deepak

I tried as above but it does not find the window using FindElementbyName.
Here is what I am trying to do.

1.Launch my application . 2. Wait for a few seconds for the splash screen to go away 3. Attach to the application to login [The login is a dialog with edit fields username and password and a Login button

When I try to reattach, I get an error -  System.InvalidOperationException: System.InvalidOperationException: An element could not be located on the page using the given search parameters..
Here is my code -
`using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium.Appium.Windows;
using OpenQA.Selenium.Remote;
using OpenQA.Selenium;
using System;
using System.Threading;
namespace QA_automation
{
public class QASession
{
protected const string WindowsApplicationDriverUrl = "http://127.0.0.1:4723";
private const string QAAppId = @"C:\Program Files\myData\mykit\0.1\setup\QA.exe";
private const string QAAppArgs = @"-product=qamode";
    protected static WindowsDriver<WindowsElement> session;
    protected static WindowsElement userName;
    protected static WindowsElement passWord;

    public static void Setup(TestContext context)
    {
        if (session == null)
        {
            DesiredCapabilities appCapabilities = new DesiredCapabilities();
            appCapabilities.SetCapability("app", QAAppId);
            appCapabilities.SetCapability("appArguments", QAAppArgs);
            appCapabilities.SetCapability("deviceName", "WindowsPC");
            appCapabilities.SetCapability("platformName", "Windows");
            session = new WindowsDriver<WindowsElement>(new Uri(WindowsApplicationDriverUrl), appCapabilities);

			// wait for splash screen to disappear
            Thread.Sleep(TimeSpan.FromSeconds(8));

			//Desktop root attach
            DesiredCapabilities desktopCapabilities = new DesiredCapabilities();
            desktopCapabilities.SetCapability("app", "Root");
            var DesktopSession = new WindowsDriver<WindowsElement>(new Uri(WindowsApplicationDriverUrl), desktopCapabilities);

			//attach to original window
			var QAWindow = DesktopSession.FindElementByName("(Beta) QAkit Version: 0.1.0.101");
            String QAConsoleTopLevelWindowHandle = QAWindow.GetAttribute("NativeWindowHandle");
            QAConsoleTopLevelWindowHandle = (int.Parse(QAConsoleTopLevelWindowHandle)).ToString("x"); // Convert to Hex

            DesiredCapabilities QAappCapabilities = new DesiredCapabilities();
            appCapabilities.SetCapability("appTopLevelWindow", QAConsoleTopLevelWindowHandle);
            var QASession = new WindowsDriver<WindowsElement>(new Uri("WindowsApplicationDriverUrl"), QAappCapabilities);

			// Enter userName and passWord which are in hierarchy
			// window[(Beta) QAkit Version: 0.1.0.101]/Dialog[Login]
            QASession.FindElementByName("User Name:").SendKeys("UserA");
            QASession.FindElementByName("Password:").SendKeys("sample");

//...
}`
Not sure why it is not attaching the window. Please help.Thank you!

When I ran the test in debug mode, the desktopSession had the following exceptions :

Hi @madhavankumar,
//attach to original window
				var QAWindow = DesktopSession.FindElementByName("(Beta) QAkit Version: 0.1.0.101");
                String QAConsoleTopLevelWindowHandle = QAWindow.GetAttribute("NativeWindowHandle");
                QAConsoleTopLevelWindowHandle = (int.Parse(QAConsoleTopLevelWindowHandle)).ToString("x"); // Conv

Can you use Inspect to confirm if the correct Window is being targeted?

@timotiusmargo
Hi, I'm trying to start an application using winappdriver but the PID numbers are different from each other. The target application is triggered via a program that we do not have the right to start directly after doing a little investigation, so how can I make the application started automatically after the pid numbers are different.

authors: DeepakJadon auyong bsakizli hassanuz khouzam madhavankumar timotiusmargo

repo: Microsoft/WinAppDriver


text:
LNK1181 errors when building sample files

Used the SDK a month ago, at that time I can build the samples files successfully.
Today, I downloaded the latest SDK and tried to build the same sample files:
(1) Building Samples/HelloUI, got the error as below:
LNK1181 cannot open input file 'starboardXaml.lib'
(2) Building Samples/WOCCatalog, got the error as below:
LNK1181: cannot open input file 'OpenGLES.lib'

Maybe you can build StarboardXaml and OpenGLES project by yourself, then build all WinObjC SDK again.
I guess the sample will find the lib.

I did download the latest sdk and am able to build the samples just fine.  What configuration are you using?

I think the second error ("cannot open input file 'OpenGLES.lib'") should be fixed with this PR:
https://github.com/Microsoft/WinObjC/pull/222

I have tried the samples from the Oct30 preview release and have been able to build all of the samples and run them.  Can you point out which project (Store 10, WP 8.1, etc) that you are using?

I have tried the samples from the Oct30 preview release and have been able to build all of the samples and run them.  Can you point out which project (Store 10, WP 8.1, etc) that you are using?

I think this might only happen when building the SDK from source, at least that seems to be the case for #222.

mufanfan, you mention that you tried to build the same samples.
To clarify:

did you open and attempt to build the original sample projects that you built last month, or
did you take the latest sample files from the SDK and attempt to build them?

Thanks!

same error for me.
i used Woccatalog-winstore10.sln.
got error LNK1181 - can not input file'OpenGLES.lib'
thanks!

and FOR helloUI
Error	LNK1181	cannot open input file 'StarboardXaml.lib'	:(

I tried it on another PC and got the same error.
Steps:
(1) go to the folder \WinObjC-master\samples\HelloUI;
(2) double click HelloUI-WinStore10.sln and open it in Visual studio;
(3) Click debug -> Start Debugging
(4) Get the error as below:
1>------ Build started: Project: HelloUI (HelloUI\HelloUI), Configuration: Debug Win32 ------
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "XamlCompositorCS". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
1>  ConsumeRuntimeComponent.cpp
1>  ....\HelloUI\HelloUI.m
1>  ....\HelloUI\main.m
1>LINK : fatal error LNK1181: cannot open input file 'StarboardXaml.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
########### Visual Studio info:
Visual Studio Enterprise 2015
Version 14.0.23107.0 D14REL
########### Windows 10 info:
Windows 10 Enterprise

In addition, it worked totally fine with the earlier SDK that was release around 10/09/2015

On another PC, I have Visual Studio Community and Windows 10 pro, always get the same error.

We’ve tracked this down and it’s a debug-only issue. A fix has been identified and is coming soon.

That's great, looking forward to this updated version.

@mufanfan What is the size of the SDK zip file that you downloaded? Here is a link to the latest file.
The pre-packaged SDK (released October 30) should be about 179Mb zipped and 578Mb unzipped. It should contain a number of dll and lib files in lib\Universal Windows\x86

Okay, the sdk you provided is totally fine. I didn't encounter any issues.
But I'm so confused, I always click the 'Download Zip' button on https://github.com/Microsoft/WinObjC and click , and a 245MB WinObjc-master.zip file will be downloaded. That SDK has all kinds of Link1181 errors and can't create store packages at all.

@mufanfan The "Download Zip" button on the right that you are clicking downloads the whole branch. If you only want the prebuilt files, you'll want to navigate to the "releases" page and download the latest "Winobjc.zip" file available.
https://github.com/Microsoft/WinObjC/releases

Thanks so much to Keluo-ms for your clarification.
Here I have another question, I'm trying to build a open-source ios project and I got below errors which prevent me from creating the store packages:
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(1778,5): warning APPX0104: Certificate file 'climbers_TemporaryKey.pfx' not found.
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(1778,5): warning APPX0107: The certificate specified is not valid for signing. For more information about valid certificates, see http://go.microsoft.com/fwlink/?LinkID=241478.
To my understanding, the TemporaryKey.pfx is auto-generated by VS, right?
Is there anything or settings I didn't do? Thanks.

I also checked the \samples\HelloUI\HelloUI.vsimporter\HelloUI-WinStore10 folder, there's already a HelloUI_TemporaryKey.pfx file there.
Is this a vsimporter's issue?

Okay, so I created a brand new climbers project,  and then manually copied the climbers_TemporaryKey.pfx under my ios project folder \climbers.vsimporter\climbers-WinStore10
And it works, the store appxupload package is successfully generated!!! Finally.
But still, will you fix this minor issue?

@mufanfan, can you please file a new issue to track the .pfx issue? This helps us keep track of distinct issues.
And thanks for taking the time test our project, we really appreciate it :smile:

source: gharchive/issue

authors: SAPNALnT antoine-haas asimonov-msft cloudmonkeypeng drewjohnsonstpaul keluo-ms mufanfan rajsesh-msft triplef

repo: Microsoft/WinObjC

license: MIT

license_type: permissive

license_source: github-api


text:
Unable to resolve an external symbol _inet_ntop

Unable to resolve an external symbol _inet_ntop, which is referenced in the function _NSMakeRange
I have already added
#pragma comment(lib, "Ws2_32.lib")
,but still got a link error.
which lib file should I add to my project. Thanks.

I am not able to repro this, can you provide a code sample or snippet that reproduces this issue?

hello, I can repro this with these steps:

open WinObjc sample project "WOCCatalog"
add some head files, and add ‘Ws2_32.lib’ for for link
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#if defined(WINOBJC)
#pragma comment(lib, "Ws2_32.lib")
#endif
in " application:didFinishLaunchingWithOptions:" add testing code:
// testing code
char addrBuf[INET_ADDRSTRLEN];
char testData[100];
inet_ntop(AF_INET, testData, addrBuf, (socklen_t)sizeof(addrBuf));
////////////
then I can get a link error about '_inet_ntop'

authors: rajsesh-msft yaveymao


text:
Allow specifying arbitrary event handlers to any ReactWrapperComponent

Using the geteventlisteners package to allow capturing arbitrary event handlers specified as @Outputs on any React-wrapper component. e.g.:
<fab-icon iconName="Add" (onClick)="handleIconClick($event)" (onMouseOver)="handleIconMouseOver($event)"></fab-icon>

handleIconClick(ev: MouseEvent) {
  console.log('icon clicked!', ev);
}

handleIconMouseOver(ev: MouseEvent) {
  console.log('icon moused-over!', ev);
}

Although extending global prototypes (i.e. not-yours) is bad practice, this is what Angular uses to capture events, and this seemed like the only way to get any arbitrary output from the element.
The other option is to handle each specific event, which is a rather long list, and requires further maintenance, when the DOM, React or the component library adds events to listen to.
This is similar in the idea as us passing any arbitrary attribute to the underlying React component.

@xjerwa Both. In React, everything is a prop, which can be anything really - a primitive, object, a function (callback) etc. However, we can categorize them into 5 categories:

[Native] HTML attributes - Since all of them are just strings (or numbers, though I'm not sure how we deal with numbers today), Angular templates allow passing any attribute to the component, and then ReactWrapperComponent passes them down as-is.
React-component defined "input" props, e.g. a DefaultButton's text prop - we create @Inputs for these in the wrapper Angular component and pass them to the React counterpart via the template.
React-component defined "output" props, these are just callbacks. e.g. Checkbox's onSelect prop - we create @Outputfor these in the wrapper Angular component, catch the callback from React, map all arguments to an object and emit() using an EventEmitter, so the user can listen to it.
React render-props - we handle these today using createInputJsxRenderer in ReactWrapperComponent and similar, which map JSX-returning functions to Angular TemplateRef, ComponentRef or a function returning an HTMLElement.
[Native] HTML events - these are defined in @types/react's DOMAttributes. Theoretically, we could define the relevant ones for each component, e.g. onClick for a <button>, onChange for an <input> etc. But since onClick is relevant for every DOM element at the end of the day, we'd need to define it everywhere - and the same goes for other stuff - This is quite a bit of work, and duplicate code throughout the wrapper components. To avoid that, this PR adds a way to specify arbitrary events on any component that extends ReactWrapperComponent, we then check what events are being listened to, and pass the relevant handlers (which all look the same - output wise, since they're native DOM events) down to the React component, which passes it down to the DOM element that React renders.

As mentioned, ideally the same could be done for any trivial input/prop (i.e. #1, #2 above, #3 too, with some additional work to automatically convert function arguments to an object), the main issue so far has been getting the Angular compiler to play along, but I'll need to re-visit that, since I haven't looked at it in quite some time.

source: gharchive/pull-request

repo: Microsoft/angular-react


text:
Fix diagram description

Changing "VM1" to "VM2".
In the diagram, VM2 has one NIC attached.

@grahamsk,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@grahamsk : Thanks for your contribution to the Azure documentation! The author, @jimdial, has been notified to review your proposed change.

@grahamsk  Good catch. I caught it earlier this morning and already submitted a PR for it (which should publish later today), so I'm closing this one. #please-close

authors: PRmerger grahamsk jimdial msftclas

repo: Microsoft/azure-docs


text:
Spike:  Investigate making PR to Flux to add Azure Devops key

Flux has Github and Gitlabs keys baked in by default.  Let's investigate if there is a PR we can make on Flux to add support for Azure Devops so that Azure Devops repos work by default without horsing around with ssh keys.

Related to #65 cc @yradsmikham

weaveworks/flux#1728

Flux 1.10.1 release supports Azure DevOps by default.

authors: andrebriggs sarath-p timfpark

repo: Microsoft/bedrock


text:
CompactBinary Protocol V2 doesn't work in C#

I updated the Serialization sample to use CBV2 and now it throws a runtime exception. I've seen similar errors with other IDL, but it appears there's some amount of corruption going on with V2.
Code (program.cs):
var writer = new CompactBinaryWriter<OutputBuffer>(output, 2 /* used to be 1 */);

// The first calls to Serialize.To and Deserialize<T>.From can take
// a relatively long time because they generate the de/serializer
// for a given type and protocol.
Serialize.To(writer, src);

var input = new InputBuffer(output.Data);
var reader = new CompactBinaryReader<InputBuffer>(input, 2 /* used to be 1 */);

Exception:

System.IO.InvalidDataException was unhandled
HResult=-2146233087
Message=Invalid type BT_UINT64, expected BT_STRING
Source=Bond
StackTrace:
at Bond.Expressions.ThrowExpression.ThrowInvalidTypeException(BondDataType expectedType, BondDataType actualType)
at lambda_method(Closure , CompactBinaryReader1 )        at Bond.Deserializer1.Deserialize[T](R reader)
at Bond.Deserialize`1.From[R](R reader)
at Examples.Program.Main() in c:\Users\kylemc\Documents\Visual Studio 2013\Projects\serialization\program.cs:line 29
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

Yes, CBv2 writer is not support in C# at the moment. Reader is supported.

When do you think the CBv2 writer will be supported?

I don't have a specific date at the moment.
For context, what makes CBv2 different from other protocols is that is requires double pass during serialization in order to calculate lengths of nested structs. That's why it requires some additional infrastructure that other protocols don't. That is also why not that many people have been using it (the double pass is an extra cost) so it hasn't been on top of the priority list.

authors: kylemc sapek

repo: Microsoft/bond


text:
findTopIntent doesn't resolve correctly

The code for findTopIntent doesn't map the intents properly, and doesn't return a topIntent. The following JavaScript resolves the issue:
    static findTopIntent(recognizerResults) {
        return new Promise((resolve, reject) => {
            let top = undefined;

            const intents = recognizerResults[0].intents;
            Object.keys(intents).forEach(name => {
                if(!top || intents[name] > top.score) {
                    top = {
                        name: name,
                        score: intents[name]
                    };
                }
            });
            resolve(top);
        });
    }

https://github.com/Microsoft/botbuilder-js/blob/e562aa6f395f76c50fee396b7edee1c549f05186/libraries/botbuilder/src/recognizer.ts#L175

I've asked @emadelwany to take a look at this. I have another patch going out tomorrow for auth tokens never being updated after they expire which I'd like to piggyback this fix on.

Thanks @emadelwany

This should be fixed.

authors: GeekTrainer Stevenic

repo: Microsoft/botbuilder-js


text:
Name: Azure CLI's Bot Extension fails in publishing SDK V4 Bot

Tool
Name: Azure CLI's Bot Extension fails in publishing SDK V4 Bot
Version:
{
"extensionType": "whl",
"name": "botservice",
"version": "0.4.3"
}
OS: Client ran this command is Windows 2012 R2 server.
Describe the bug
followed the doc at : https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-enterprise-template-deployment?view=azure-bot-service-4.0#deploy-to-azure
But that command in the doc above gave us error:
PS C:\Tools\MyProjects\JasonBotV4Test> az bot publish -g JasonBotV4Test -n JasonBotV4Test --proj-file BasicBot.csproj --sdk-version v4
az: error: unrecognized arguments: --proj-file BasicBot.csproj --sdk-version v4
To Reproduce
Steps to reproduce the behavior:

Install the latest version of the Azure cli tool.
az extension add -n botservice
az login
PS C:\Tools\MyProjects\JasonBotV4Test> az bot publish -g JasonBotV4Test -n JasonBotV4Test --proj-file BasicBot.csproj --sdk-version v4

Expected behavior
Publish should be successful
[bug]
The command above returned error below:
az: error: unrecognized arguments: --proj-file BasicBot.csproj --sdk-version v4

@JasonXuMSCSS have you tried using --proj-name and --version?

Thanks –version worked. It also requires --resource-group too.
az bot publish -g JasonBotV4Test --resource-group ASPNetCoreJasonTestRG -n JasonBotV4Test --proj-file BasicBot.csproj --version v4
The document at https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-enterprise-template-deployment?view=azure-bot-service-4.0#deploy-to-azure is wrong then.
Thanks,
Jason
From: Steven Gum notifications@github.com
Sent: Monday, December 17, 2018 11:53 AM
To: Microsoft/botbuilder-tools botbuilder-tools@noreply.github.com
Cc: Jason Xu (CPR) huanchix@microsoft.com; Mention mention@noreply.github.com
Subject: Re: [Microsoft/botbuilder-tools] Name: Azure CLI's Bot Extension fails in publishing SDK V4 Bot (#861)
@JasonXuMSCSShttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FJasonXuMSCSS&data=02|01|huanchix%40microsoft.com|67438dd4928546463a7308d66448740f|72f988bf86f141af91ab2d7cd011db47|1|0|636806659677493501&sdata=%2FyMYJXToY9aEPbjAzRczTAav163oIhJ%2Blp8li5o0T6E%3D&reserved=0 have you tried using --proj-name and --version?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fbotbuilder-tools%2Fissues%2F861%23issuecomment-447936319&data=02|01|huanchix%40microsoft.com|67438dd4928546463a7308d66448740f|72f988bf86f141af91ab2d7cd011db47|1|0|636806659677503509&sdata=OBinct%2FDn6VGgk1CW31%2Fo1Ssnkk5MHl%2FSdpbphfCm8Q%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FArhZJoS3ZYVyUtURVCaeVKBLyOLqAB5kks5u59ntgaJpZM4ZUMRq&data=02|01|huanchix%40microsoft.com|67438dd4928546463a7308d66448740f|72f988bf86f141af91ab2d7cd011db47|1|0|636806659677503509&sdata=6ZtHiEIOcdLc9SOuqLB9%2B2FaAQ5YdAdzFKuUvWe%2BlO4%3D&reserved=0.

authors: JasonXuMSCSS stevengum

repo: Microsoft/botbuilder-tools


text:
Feature: copy values directly from history to clipboard using right-click

Problem Statement

The pain point is that in order to copy a previously-calculated number to the clipboard, you have to save the current number to memory, click on the history item, click copy on the display, then re-insert the item from memory. This is slow and tedious, and also erases the last item in the history as a side effect of restoring the value. Instead, I propose that items can be copied from the history directly using a similar interface as they are copied from the output from a normal calculation.
Evidence or User Insights

We should do this because it will allow users to find previous calculations and save them, or combine them together. macOS's paper-tape is essentially a text field which allows copying numbers directly to the clipboard. Also, the TI-83 series has the capability to add historical items to its own "clipboard" by setting a variable to it. This is similar to the memory function, but it allows at least 26 different variables to be used, vaguely similar to how a clipboard works.
Proposal

This solution will solve the problem by allowing right-clicks to be used to copy the value to the clipboard. This will reduce the number of clicks from seven to two.
Goals

The user will be able to copy any item from the history to their clipboard.
Non-Goals

We should not support pasting values into history because this would make calculator more like a spreadsheet.
Low-Fidelity Concept

Good idea! For your info, a recent pull request has also enabled text selection in the History, allowing users to copy the value (or a part of the value), a menu item can be a good addition to text selection!

Thanks for the feature suggestion! Let's keep this idea open for discussion so the community has the chance to provide feedback. Check out our New Feedback Process for more info on the user-centered process we follow for new feature development.

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

We reviewed the pitch and would love to move forward with it. Since the idea is fairly straightforward and is entirely captured by the pitch, we can move this straight into production. @Decagon, if you are interested in implementing this one, let us know, otherwise we can open it up to the rest of the community.

authors: Decagon MicrosoftIssueBot grochocki rudyhuyn

repo: Microsoft/calculator


text:
DPS support for ESP8266

I currently have a NodeMCU ESP8266 device which successfully connects to IoT Hub and receives messages from it, great!
My sketch hard codes the key in the connection string which I don't like, also, lets say I'm building 100s of devices and I don't want to be adding a new device in the portal each time but have the device authenticate and connect when it is turned on, in summary using DPS.
I've been looking for days and I've only found support for Azure's DevKit device. Do I need to change my device in order to consume DPS? If not, how can I get the SDK to work with my device?

ESP8266 don't have security chip and enough RAM to enable DPS, so can't support it.

repo: Microsoft/devkit-sdk


text:
$ExpectType did not unwrap the type alias

This is just a minimal repro, the real use case is for types/npm-ramda to generate DT compatible tests so that we could put them on DT, but we got problems.
Is there any reason we can't pass the enclosingDeclaration parameter to typeToString in the expect rule?
Code
(index.d.ts)
export type Or<T, U> = T | U;

(something-tests.ts)
import * as something from 'something';

declare const result: something.Or<string, number>;

// $ExpectType string | number
result;

Expected
no errors
Actual
ERROR: 6:1   expect   Expected type to be:
  string | number
got:
  Or<string, number>

Or even more ridiculous:
ERROR: 299:1  expect                      Expected type to be:
  'Point'
got:
  "Point"

The solution being to change single quotes to double quotes.
The root issue here is that dtslint just does a comparison on the string representation of the types:https://github.com/Microsoft/dtslint/blob/4539c93657ea93e96eff84aa835422f6eed3e3b7/src/rules/expectRule.ts#L297-L304
The solution is to change the check to use the type relationships API. It should at least be isIdenticalTo rather than a string comparison.

authors: danvk ikatyang

repo: Microsoft/dtslint


text:
Serialization issues on OneSdk

Fixes issues with Serialization. Also opens Key in Things to enable external apps setting it.

@gcorvera,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

:shipit:

authors: HATIMS gcorvera msftclas


text:
MSBuild TaskLoggingHelper is not respecting \r

Repro steps -
dotnet new console
dotnet add package newtonsoft.json
edit csproj to change the newtonsoft versionto 12.0.0
run msbuild /t:Restore on the project
Expected -
Shows errors
Actual -
Shows errors with \r at the end of the line
"C:\Users\anmishr\Source\Repos\ConsoleApp21\ConsoleApp21\ConsoleApp21.csproj" (restore target) (1) ->
(Restore target) ->
  E:\NuGet.Client\src\NuGet.Core\NuGet.Build.Tasks\NuGet.targets(102,5): error : TESTING restore\r [C:\Users\anmishr\Source\Repos\ConsoleApp21\ConsoleApp21\ConsoleApp21.csproj]
E:\NuGet.Client\src\NuGet.Core\NuGet.Build.Tasks\NuGet.targets(102,5): error : this is new line [C:\Users\anmishr\Source\Repos\ConsoleApp21\ConsoleApp21\ConsoleApp21.csproj]
  C:\Users\anmishr\Source\Repos\ConsoleApp21\ConsoleApp21\ConsoleApp21.csproj : error NU1102: Unable to find package newtonsoft.json with version (>= 12.0.0)\r
C:\Users\anmishr\Source\Repos\ConsoleApp21\ConsoleApp21\ConsoleApp21.csproj : error NU1102:   - Found 57 version(s) in nuget.org [ Nearest version: 10.0.3 ]\r

Notes -
Here NuGet is sending messages through TaskHelper.LogError. I have verified that the messages contain both \r\n as is. So it doesn't seem to be an issue with NuGet.
Versions -
dotnet cli - 2.0.0-preview2
msbuild - Microsoft (R) Build Engine version 15.3.406.54721 for .NET Framework

cc: @rainersigwald @emgarten

This happens because the log event (with an embedded CRLF) filters down to a point where CR is explicitly filtered out if the current log output device is a character device like the console. The filtering works by escaping \r to \\r.
That's a pain for a multi-line error message that wants to just use Environment.NewLine, because within the task that's emitting an error, you can't know what loggers are attached. You'd like to emit \r\n to be friendly to text logs, but it produces this artifact for console logs.

It's worse than I thought. There's code that splits the user message on newlines, reassembles it back using our preferred newlines, returns as a string, then splits again (using a different split method), and emits a log message for each line, possibly split across multiple lines.
So there's a bunch of unnecessary allocations happening and ALSO it would be totally fine to call LogError(stringWithEmbeddedCRLF).
I'm removing all of the escaping stuff, but not currently tackling the split-join-split problem.

@rainersigwald thanks for digging deeper in this. Do we have a timeline for fixing this?

@mishra14 I've got #2325 out to get this fixed but it's in our 15.5 branch. Based on mail, we don't think it's a good idea to take the change right now--I'm pretty sure I understand all the implications but we're pretty late in the cycle.

repo: Microsoft/msbuild

license: mit

license_source: bigquery


text:
Update NerdBank.GitVersioning

Update NerdBank.GitVersioning from 1.4.30 to 1.5.46. We have a problem
where VSTS builds don't properly recognize that they're producing
builds for public release and continue to add the commit ID (for example
"-g12345678") to NuGet package names, which is undesirable. So far we
haven't been able to track down what's going wrong, and I'm hoping a
newer version of GitVersioning will solve the problem.
Even if it doesn't, upgrading to a newer version doesn't hurt.

@rainersigwald @cdmihai @jeffkl @AndyGerlicher Would you be able to take a look at this, please?

I approve if the tests pass

:shipit:

authors: jeffkl rainersigwald tmeschter


text:
Refactor nnictl, show error message gracefully

Advisor and assessor could not be used simultaneously.
Refactor config file error message.
Support scientific notation, like 1e-2
Fix issue https://github.com/Microsoft/nni/issues/896

Good Job! Very useful enhancement~ Thanks :)

authors: PurityFan SparkSnail

repo: Microsoft/nni


text:
Support for a vibrating motor in controller

Support for an optional vibrating motor on a game controller (enabled if CFG_PIN_VIBRATION is defined).

ignored in simulator. we could add a visual effect like shaking the sim.
does not support native app scenarios, refactoring when that happens.

Doing it differently.

repo: Microsoft/pxt-common-packages


text:
When passing commands to a container, the commands are surrounded with single quotes?

When using this configuration in the ServiceManifest.xml file:
<CodePackage Name="Code" Version="1.0.0">
    <EntryPoint>
      <ContainerHost>
        <ImageName>sheyenrath/wiremock.net-nano</ImageName>
        <Commands>--AllowPartialMapping false,--x y</Commands>
      </ContainerHost>
    </EntryPoint>
</CodePackage>

(For the complete ServiceManifest.xm file, see https://gist.github.com/StefH/a3b01cba4496cace230d955ab2802e8a)
The commands are passed to the container as:
"./wiremock-net '--AllowPartialMapping false' '--x y'"

Note the extra single quotes ' around the command line parameters.
Is this a bug or by design ?

@StefH Did you get the output above from "docker inspect"? If not, where did you get it from?

I used docker ps -a --no-trunc:
CONTAINER ID                                                       IMAGE                                   COMMAND                                                                                CREATED             STATUS              PORTS                  NAMES
1ad2c8665d6845b486217269d113c95169787bf714f693dbbd510c023e333df4   sheyenrath/wiremock.net-nano:1.0.4.18   "./wiremock-net --Urls http://*:80 --ReadStaticMappings false '--AllowPartialMapping false' '--MaxRequestLogCount 9999'"   2 minutes ago       Up 2 minutes        0.0.0.0:9091->80/tcp   sf-3-dde1e72a-1bdc-44e8-86fc-c48ce2b194fe_dfc01169-78a9-42da-af9c-eb315a28baa2

repo: Microsoft/service-fabric


text:
Parent test result support for data driven tests

Mstest v2 adapter changes:

Created parent test result for mstest v1 data driven tests
passing execution id and parent exeuction id to test platform via test result’s properties.

Copy from PR https://github.com/Microsoft/testfx/pull/342

Add a RFC for this change and link RFC to this PR.

@dotnet-bot test Windows / Release Build

@abhishkk : Please push this in soon.

RFC is not required for this. So skipping.

This change should have been an opt-in because it breaks existing flows. For example, Visual Studio Online doesn't support displaying child tests (yet). So atm, if a child test fails, you only see the parent failing in the UI and there is now way (as far as I'm aware of) to get hold of the test attachments of the failing child.

@Elyseum

Visual Studio Online doesn't support displaying child tests (yet).

Support is enabled in visual studio online (vsts). You can use vstest v2 task along with

VS version >= 15.8 preview 4, or Using tools installer package.
Latest MSTest adapter version

So atm, if a child test fails, you only see the parent failing in the UI and there is now way (as far as I'm aware of) to get hold of the test attachments of the failing child.

The behavior of vstest v2 task was different for single agent and multi agent flows. For single agent, all child results were shown but for multi agent, only one result was shown. These changes not only enable hierarchical support but brings consistency in behavior of single and multi agent flows. Now in both cases, parent and child results are shown (where child results are in hierarchical form)

We don't have VS version >= 15.8 preview 4 yet, so that might be our issue. My mistake then :).

authors: Elyseum abhishkk jayaranigarg

repo: Microsoft/testfx


text:
run vcpkg.exe install sqlite3 get error

system os : Windows 10 Fall Creators Update
compiler & ide :  Visual Studio 2017 Community
When I run the command  vcpkg.exe install sqlite3 It return a error
like this:
PS D:\vcpkg\vcpkg> .\vcpkg.exe install sqlite3
The following packages will be built and installed:
sqlite3:x86-windows
Starting package 1/1: sqlite3:x86-windows
Building package sqlite3:x86-windows...
Warning: The following VS instances are exluded because the English language pack is unavailable.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community
Please install the English language pack.
Could not locate a complete toolset.
The following paths were examined:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\dumpbin.exe

You need to install the English language pack on Visual Studio. You can do thing by starting the Visual Studio Installer, going to language pack; make sure English is checked, and even if it is already checked, click Modify. See also: https://github.com/Microsoft/vcpkg/issues/2295

I modify the language pack unclick the English and click it.
after that it will install about 157MB size language packs.
Then run the vcpkg.exe install sqlite3. It can work well.
@alexkaratarakis  Thank you very much

repo: Microsoft/vcpkg


text:
Alphabetical file order in VS 15.5 Preview1 for sdk projects

Repro steps

git clone https://github.com/SAFE-Stack/SAFE-BookStore.git
cd SAFE-BookStore
open BookStore.sln

Expected behavior
File order as in fspro.
Actual behavior
File order is alphabetical,

Closing as a dupe of https://github.com/dotnet/project-system/issues/2793

authors: cartermp forki

repo: Microsoft/visualfsharp


text:
Cherrypick #5211

Clean up IntelliSense perf UI and flow options for IntelliSense

Tooltips, bindings, and removing redundant code

Change tooltip to include guidance and un-bind project options

@dotnet-bot test Ubuntu16.04 Release_default Build please

@dotnet-bot test Ubuntu16.04 Release_default Build please

@dotnet-bot test Ubuntu16.04 Release_default Build please

@dotnet-bot test Ubuntu16.04 Release_default Build please

Failure is unrelated.


text:
use appveyor build matrix

job build time limit is 60 minutes, but we are running only one job.
we can use the build matrix feature to split test suite in multiple jobs (each with 60min quota)

Every AppVeyor build consists of one or more jobs. A build is considered successful if all jobs are successful. A build immediately fails when any of its jobs fail.

without the env var TESTSUITE set, the old workflow is executed so no difference from command line.
We can discuss how to split better the matrix ( fsc/library/vs extension ) to use less time for compilation and more time for test suite.
I think we can run the full tests/fsharp suite in appveyor ( really good for community )
this pr add RunTests.cmd release of

coreunitportable7
coreunitportable47
coreunitportable78
coreunitportabl259

@KevinRansom if ok, i  can cleanup to compile only the test assemblies of the test suite ( for example build portable7 only in TESTSUITE=coreunitportable7 ).
maybe is better to use TARGETPROFILE vs TESTSUITE too

Changed a bit
I splitted the build in more profiles all, net40, portable47, portable7,portable78,portable259,vs,cambridge_suite,qa_suite
Each one compile the minimal required to run the tests ( so portable78 doesnt build core library 259 and unittests 259 )
the all argument run all tests, it's the default for appveyor-build.cmd without arguments so locally works like before plus profiles 7,47 and 78 ( where missing )
Done like that so we can have more time for testing, maybe we can run vs ide test suite or additional tests in fsharp/fsharpqa suites
Ideally we can run all tests inside appveyor
@KevinRansom i think you have the appveyor pro not the Premium right? because i see only one concurrent job

not bad
|| build profile | time |
| net40 |10 min 10 sec
| portable7 |10 min 32 sec
| portable47 | 8 min 51 sec
| portable78 |10 min 21 sec
| portable259 | 10 min 10 sec
| vs | 8 min 53 sec
| cambridge_suite | 18 min 42 sec
| qa_suite | 7 min 9 sec

so overall time went down?

overral not, is not going to, but:

i'll merge net40, portable 7, 47, 78 and 259 => < 50 min ( the proto compiler build is in common )
try to enable vside tests
add more tests to cambridge_suite and fsharpqa (i think full run should be ok)

:heart:

btw with this modify, locally i can do

appveyor-build.cmd portable7
appveyor-build.cmd all ( all profiles )
appveyor-build.cmd net40

a crappy bat build script :crying_cat_face:

ok, now appveyor-build.cmd support multiple profiles (comma separated) to run

appveyor-build.cmd /? -> help on usage ( /h /help )
appveyor-build.cmd (no args ) = appveyor-build.cmd all
appveyor-build.cmd portable7,vs,qa_suite run portable7 + vs + qa_suite

used that to merge net40 and all portable profile in one build job
minimal build is 7min per job (proto build etc)
about other test suite

tests/fsharpqa i'll try to run full suite next commit
tests/fsharp require fix in my other pr abount nunit3
vs ide next pull request i'll try to run tests, meanwhile i'll merge with net40+portable to lower build duration

profiles
time

net40,portable7,portable47,portable78,portable259
27 min 45 sec

vs
9 min 14 sec

cambridge_suite
20 min 7 sec

qa_suite
7 min 6 sec

Full fsharpqa suite
3172 tests passed (99.44%)
18 tests failed (0.56%)
0 tests were cascaded failures (0.00%)
0 tests returned "no result" (0.00%)
0 tests timed out (0.00%)
0 tests had test errors (0.00%)
========
3190 Total executed tests

25 tests were skipped
========
3215 Total tests (executed & skipped)

What are the test failures?

[00:08:35] CompilerOptions\fsc\highentropyva (CheckHighEntropyALSR - x64 highentropyva+)
[00:08:35]  -- failed
[00:08:35] CompilerOptions\fsc\highentropyva (CheckHighEntropyALSR - x86 highentropyva+)
[00:08:35]  -- failed
[00:08:35] CompilerOptions\fsc\highentropyva (CheckHighEntropyALSR - x64 highentropyva)
[00:08:35]  -- failed
[00:08:35] CompilerOptions\fsc\highentropyva (CheckHighEntropyALSR - x86 highentropyva)
[00:08:35]  -- failed
[00:08:35] CompilerOptions\fsc\highentropyva (CheckHighEntropyALSR - IA64 highentropyva)
[00:08:35]  -- failed
[00:09:30] CompilerOptions\fsc\subsystemversion (default is 4.00)
[00:09:30]  -- failed
[00:09:30] CompilerOptions\fsc\subsystemversion (explicit 4.00)
[00:09:30]  -- failed
[00:09:30] CompilerOptions\fsc\subsystemversion (explicit 5.01)
[00:09:30]  -- failed
[00:09:30] CompilerOptions\fsc\subsystemversion (explicit 6.00 - Vista)
[00:09:30]  -- failed
[00:09:30] CompilerOptions\fsc\subsystemversion (explicit 6.02 - Win8)
[00:09:30]  -- failed
[00:09:30] CompilerOptions\fsc\subsystemversion (explicit 6.01 - Win7 - winexe)
[00:09:30]  -- failed
[00:09:30] CompilerOptions\fsc\subsystemversion (explicit 6.01 - Win7 - exe)
[00:09:30]  -- failed
[00:09:30] CompilerOptions\fsc\subsystemversion (explicit 6.01 - Win7 - library)
[00:09:30]  -- failed
[00:09:30] CompilerOptions\fsc\subsystemversion (explicit 6.01 - Win7 - module)
[00:09:30]  -- failed
[00:09:30] CompilerOptions\fsc\subsystemversion (6.2)
[00:09:30]  -- failed
[00:09:30] CompilerOptions\fsc\subsystemversion (06.002)
[00:09:30]  -- failed
[00:09:30] CompilerOptions\fsc\subsystemversion (65535.65535)
[00:09:30]  -- failed
[00:15:49] Conformance\LexicalAnalysis\StringsAndCharacters (TripleQuoteStringInFSI02.fsx)
[00:15:49]  -- failed

i am running the suite locally, let me check if i can repro these

locally works, btw next time i need to check better the appveyor log
all errors are related to link.exe
POSTCMD: [CheckSubsystemVersion.bat dummy.exe 6.02]
link: extra operand 'dummy.exe'
Try 'link --help' for more information.
Fail to execute the POSTCMD. FAIL

ok found it, is using the wrong link.exe
where link
C:\Program Files\Git\usr\bin\link.exe

instead of
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe
what's the best solution for this? hardcode visual studio path in bat files like tests/fsharpqa/Source/CompilerOptions/fsc/subsystemversion/CheckSubsystemVersion.bat ?

About the failing tests:
i used VS140COMNTOOLS environment variable ( created by visual studio install ) to set correct path of link.exe, fixing all but one tests.
I disable fsharpqa test Conformance\LexicalAnalysis\StringsAndCharacters (TripleQuoteStringInFSI02.fsx) with NO_CI tag.
I dont know why it doesnt pass, i'll open an issue.
Btw there were others NO_CI inside the same env.lst so something is not right
If the next pr build is ok, the full fsharpqa suite will run within appveyor , each commit , I think is really nice

Great!!!!

ok, ready to review and merge :smile:
final stats

BUILD_PROFILE
time

net40,portable7,portable47,portable78,portable259,vs
30 min 46 sec

cambridge_suite,smoke_only
22 min 6 sec

qa_suite
24 min 30 sec

total: 1 hr 19 min
pls, i need that in the fsharp test suite pr to test it !! :smile:
The full fsharp suite is ~35min + 7 base = ~42, we can run that too i think

@KevinRansom if you dont want to use the build matrix, i can update this pr to use only one job like before, but i think the changes at appveyor-build.cmd are good, same functionality as before but also the various part can be run individually from command line.

Merged into master, vs2015 and coreclr.  I had to make a tiny change to the appveyor-cmd to run with F# 4.1

authors: KevinRansom dsyme enricosada forki


text:
Timing issue when starting remote debugging for Node apps that arent in debug mode

My theory: VS Code updates remoteDebuggingEnabled = true, and immediately after tries to attach the debugger, but the Node process hasn't been restarted yet, so the Tunnel is listening, but Node isn't running in debug mode.
This flow works:

Enable remote debugging from VS Code  (Site config gets remoteDebuggingEnabled = true)
VS Code debugger fails to attach. Times out
Cancel when VS Code wants to disable remote debugging.
Go to Portal, Restart App Service instance
Go to Portal, Restart App Service instance again.
Check App instance via WebSSH.

Node process is now started via --inspect
Try to start remote debugging from VS Code. It works!

What's causing this timing problem? Wasn't there something about us needing to wait for the instance to restart? @Michael Crane
Did you guys validate this workflow of enabling remote debugging on demand, or have you tested with an app that has it enabled it before hand?

Answer from Ranjith:
Yeah I added the GetStatus api to kudu that tells whether the debugger starts on the APPSVC_TUNNEL_PORT .. basically it returns success or failure..
It would be good if VSCODE can use this api to wait until the api returns success and the attach the debugger.
https://yoursite.scm.azurewebsites.net/AppServiceTunnel/Tunnel.ashx?GetStatus
If it returns SUCCESS:2222 .. that's the default ssh port .. when you enable remote debugging.. it will return SUCCESS:49494 or SUCCESS:$APPSVC_TUNNEL_PORT

repo: Microsoft/vscode-azureappservice


text:
deployment issue?

Repro steps:

Action: appService.Deploy
Error type: Error
Error Message: No matching resources found.
Version: 0.8.1
OS: darwin

What does the error mean? Error: no matching resources found.
Note: the resource in my discription displays as “nsg-site-tst (invalid).  Could that be part of the issue?

Hi @ryanjparke,
Thanks for reporting this issue.
Could you please answer these questions to help shed some light on the problem?

Is this a new subscription that you created?
Was it a F1 (Free) tier?
Is the resource new?  Did you create it in the extension or the portal?
Did the resource always display (invalid) or did that happen recently?

Sorry for the issues.  Hopefully, we can get to the bottom of this.

Hi
I have the same problem.

The subscription has been created by other, but is an App Service in a Basic App Service Plan.
The App Service has been created in the Portal.
The resource has been always (invalid) since I installed and logging in the extension.

If you know a possible solution, I'll thank you so much.
Regards

Hi @davidramirezv17
Thanks for answering my questions.  I created an app with similar settings, but it's not showing up as invalid for me.  Do you know exactly how your app is configured?

Is the App Service Plan Linux or Windows?
The runtime of your App Service if it's on a Linux ASP?
Any other unique configurations that you might have?

Sorry for the trouble-- I'll keep trying on my end to see what's going on here.
Thanks!

Hi @nturinski
It's a Windows App Service.
Only one aditional configuration:
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"slotSetting": false,
"value": "8.9.4"
}
I already deployed through Azure CLI and It works.
Even after the deployment, the App Service is still (invalid).
Regards

@davidramirezv17 I've tried to create an app with those settings without any luck.  But I'll keep investigating and trying to repro your issue.
I'm really sorry about the inconvenience and lack of resolution.  Please let me know if you can think of anything else that may have caused your app to appear as invalid.

Closing due to lack of info and since the extension has changed since last July. If you're still running into this issue please file a new issue with detailed repro steps

authors: EricJizbaMSFT davidramirezv17 nturinski ryanjparke


text:
Experimental Decorators error present with option set in config

Version 1.13.0-insider
Commit 3bb9b5314ef50bd8225aba0565cadc6ca19bc821
Date 2017-05-18T06:26:49.576Z
Shell 1.6.6
Renderer 56.0.2924.87
Node 7.4.0
Linux

This error appears even after adding the experimentalDecorators flag in .eslintrc
"parserOptions": {
    "ecmaVersion": 7,
    "ecmaFeatures": {
        "experimentalObjectRestSpread": true,
        "experimentalDecorators": true,
        "jsx": true
    },
    "sourceType": "module"
},

The error message comes from the JS support in VS Code (see [js] in the error message). ESlint errors are prefixed with [eslint].

This issue was moved to Microsoft/vscode#28097

authors: cfrank dbaeumer

repo: Microsoft/vscode-eslint


text:
search not working

VSCode Version: Code 1.4.0 (6276dcb0ae497766056b4c09ea75be1d76a8b679, 2016-08-04T16:41:29.513Z)
OS Version: Darwin x64 15.0.0

Steps to Reproduce:

search for something
2.always no result found

was not working, reopen the IDE and it is working now

still not working

Please, provide more details. Also try reproduce your problem without extensions (code . --disable-extensions).

@stinghz As requested, please provide more details. It could be a specific case/scenario if you as it is working in general for us.

I have also not working the search. It happens quite often I don't know what is the problem. Sometimes working sometimes not.
There was some error in the devtools windows but after delete and search again no error occurred.

@mysticman, In your case the search is enabled on the selected text.

And how did you know that. I cannot find the button or option that search just in the text. I am coming from the VS world and for CTRL + F always searched in the current doc. Am I doing something wrong?

@mysticman Is Find not working only with this search term or do you observe with other terms? Also can you provide us the error you see in the devtools?

@mysticman It is a little hard to notice, the little "text lines" buttons is active when it searches only in current selection, see screenshot.

Assuming that this is actually caused by the selected line setting outlined by @mrmlnc and @bgse.
@stinghz please ping if the issue is cause by something different with steps that demo the problematic behavior.

authors: bgse dbaeumer mrmlnc mysticman sandy081 stinghz

repo: Microsoft/vscode


text:
Bug in cursor location within user snippets

VSCode Version: 1.5.0 & 1.5.1
OS Version: OS X 10.11.6 (15G1004)

Steps to Reproduce:

Add the following snippet to the javascript.json user snippets file:

{
     "Print to console": {
        "prefix": "log",
        "body": [
            "console.log('$1');"
        ],
        "description": "Log output to console"
    }
}

Then open an .js file and type "log" ENTER to insert the snippet.

Before the update of 1.5.0 the cursor appeared at $1 console.log('|'); now at the end of the line  console.log('');|

@richardruiter I tried in OS X El Capitan 10.11.6 and Windows 10 with VS Code 1.5.1 and can't repro this. The cursor ends up in the right place.
Are you able to see this when extensions are disabled? Try running code --disable-extensions

same here - failing to reproduce. @richardruiter Please update your steps/sample

This very annoying bug happens on my machine too.
Recognised in markdown snippets.
Windows x64 since Version 1.5.0 up to 1.5.1.

@ITSecMedia It would help if you include reproducible steps and the snippet you are completing

Just to make sure are talking about the same thing. This is what I see and believe is proper

Sorry.
Just opened VSCode, started new markdown file using this snippet.
The tab-stops doesn't work anymore. When I have a text like this.
example [example](sc <-shortcode) example example example CURSOR HERE
The cursor is not placed at position $1 inside the place snippet but rather at the end of line.
{
	 "ShortCode": {
		"prefix": "sc",
		"body": [
			"{{% url_**$1** %}}"
		],
		"description": "Insert ShortCode"
	}
}

Thanks. I can reproduce now

As a workaround you can use tab completion (settings >  "editor.tabCompletion": true) which isn't affected by this.

On my machine the bug occurs no matter if
I press Enter after choosing the snippet
or if I use the tab-completion feature with enabled setting ( "editor.tabCompletion": true )
The cursor is always send far behind the defined $1 tab-stop-cursor-position inside the placed snippet.
But I can wait, until it's fixed.
Thank you, we all LOVE VSCode  :-)

Hello, i have the same issue, but on every snippets that I downloaded (angular 1, 2 html and my custom snippets).
Greetings

My above workaround isn't valid - this only works when you are at column: 1 or with multiline snippets. I have pushed a fix now

To verify

have a snippet like above
type foo foo sc and complete the snippet
make sure the cursor is between the **-characters

@jrieken, hmm, broken case:
{
    "after": {
        "prefix": "aftr",
        "body": [
            "afterEach((done) => {",
            "\t${1}test",
            "});"
        ],
        "description": "Mocha BDD: after() | afterEach()"
    }
}

@mrmlnc This is with version what?

@jrieken, with latest commit (9606db116ce9a23cad7c577e4d3f1c679ca6ecf4) in a release-1.5 branch.

I'll take a look

While fixing this I encountered a bigger underlying problem which is a more complex... Needs more thinking or we revert the change (simple snippets for multiple cursors) for 1.5 and revisit for Sept

Hello, I am still having the issue same with #11782, cursor is not between quotes after autocomplete on HTML. I just updated to VS Code version 1.5.1, and using Windows 7. I am new here so if you need additional information from me, please advice.

@cauldyclark15 You need to wait for 1.5.2 or built from source

@jrieken Thank you for your response, I understand now.

Since this fix for some reason snippets only work once

Still seeing the above issue

@dburles  I am able to confirm that the issue described above in https://github.com/Microsoft/vscode/issues/11742#issuecomment-245851307 and https://github.com/Microsoft/vscode/issues/11742#issuecomment-245932485 are working as expected.
Are you referring to these linked issues or your earlier comment of "snippets only work once" ?

Sorry yeah the issue with snippets only working once. It's a strange one and I just haven't had time to dig into it. Basically I'll be able to write 'log[tab]' and have it expand to console.log(...) just fine but only one time, until I restart vscode.

@dburles Can you create a new issue for that since this issue is more about the cursor position after snippet expansion?

Sure. Though I do recall that it wasn't a problem until this fix was released so it's possibly related.

@dburles In that case, do add a note about it in the new issue. Thanks!

This used to be an issue on osx, primarily with HTML files, this occurred right after a certain release of vscode, I think 1.7.0, but an update to 1.7.1 fixed it, I'm guessing Windows didn't get the same fix

I have the same problem too, snippets only work for $1 and the it skip all next to the end of the snippet, if you've set $0, it will be $1 -> $0, all others will be skipped too. Both on Windows( my version is enterprise 10) and Ubuntu ( 16.04.2).
Since this issue I've give up snippets for a long time. : (

authors: ITSecMedia alandawkins cauldyclark15 dburles jrieken mrmlnc ramya-rao-a rengare richardruiter unChartedZone


text:
Adjust cursor position on new line or don't emit empty spaces

VSCode Version: Code - Insiders 1.6.0-insider (67a46126c83aac8c715d4c318fcfd18a183658bf, 2016-09-13T11:09:28.863Z)
OS Version: Darwin x64 15.6.0

Steps to Reproduce:
TypeScript code
class Test {

    test() {

    }
}

Put cursor on line 2:0
Hit enter

Initial:

User presses Enter:

Notice how cursor is at 3:0 but there are spaces in front of cursor
Natural thing is to use tab to get to proper indent location which will leave empty spaces in front:

(Users might not be aware there are extra whitespaces if they dont have renderWhitespace)
So seems like it should put cursor at the end of that whitespaces or not append whitespaces
FYI - Both Atom and Sublime - do not append whitespaces

It seems like option editor.trimAutoWhitespace should do this automatically (unless I misunderstand what this option does). As a workaround you can use command editor.action.trimTrailingWhitespace (default ctrl+k ctrl+x) to do it manually. You could also try the option files.trimTrailingWhitespace that is supposed to automatically remove trailing whitespace when writing a file.

Thanks @Bill-Stewart
I do have "editor.trimAutoWhitespace": true and it does not affect it
files.trimTrailingWhitespace and editor.action.trimTrailingWhitespace do help - but still - it seems like an issue that should be addressed

Agree, it seems editor.trimAutoWhitespace should address this, unless (as I said) I don't understand what it does.

See #8145 (https://github.com/Microsoft/vscode/issues/8145) - "The editor.trimAutoWhitespace trims automatic whitespace inserted by the editor when you press Enter or Tab."

Wow, so it should work then but it doesn't. Thanks for finding that

I just tested your use case on the Windows platform and can't reproduce it.

Please try with editor.formatOnType: true - seems like the issue is related to that

Enabled editor.formatOnType in my settings. Still can't repro.

Thanks - maybe OSX issue - would appreciate if someone could test on OSX - both insiders and stable are having this issue with editor.formatOnType: true

It appears to be caused by the format on type TS language provider.

Migrated to TS repo. https://github.com/Microsoft/TypeScript/issues/11074

authors: Bill-Stewart alexandrudima waderyan wallverb


text:
Windows path not linked in debug console

VSCode Version: 1.5, 1.6 insider
OS Version: Windows 10

Paths from the stack trace are not clickable

Btw this also affects relative paths:

I would consider this more of a bug than a feature request, as it works correctly on the other OS. This is really slowing down productivity, please please consider this for the next iteration. I imagine it is just a wrong regexp somewhere.

Here is a code pointer
PRs that fix this are welcome. If it turns out to be too complex I can look into fixing this in the future

Thanks @isidorn I will take a look at this! Are there tests for this?

@felixfbecker no but adding tests would be even more super awesome.
It should be possible to create a ReplExpressionsRenderer with a MockEditorService and test out the link detection. If this seems unintersting I can look into adding tests in one of our debt weeks.

Also a bit related https://github.com/Microsoft/vscode/issues/6301

Fixed the regexp so that

relative paths are matched (the "root" path is optional now)
paths without a column are matched ("column" path is optional now, as PHP only reports line numbers)
no line breaks are allowed inside the path (otherwise change 2 would cause unintended matches)

I also noticed only group 1, 3 and 4 are used. Can I remove capturing of group 2 (root component)?

@felixfbecker I believe that group is there for a reason. Though @bpasero originally added it
Since you are now being less strict about link detection try to verify if you introduced false positives.
Once your change is in a good shape just create a PR and ping me on it

Well I checked this with Find all references and the regexp is only used in a single place, where only the capture groups I mentioned are used. But I'm gonna leave it out for now.

These regexes are literally taken from our Azure version I think and super old. Feel free to revisit them, but make sure to see the test cases and update them as well 👍

This is now not working in Insiders on MacOS, maybe from this change?
Stable, links underlined and clickable:

Insiders, highlighted in the error message but not the stack trace, and that one link tries to open as a path relative to the workspace, then shows an error message because it can't find the file:

Actually I see the same thing in Windows. I think it's just highlighting the first link it finds instead of all of them. On Windows the link is still clickable though.

Also no success for me. Shouldn't this work? No links for me (Windows 10)
console.error('C:\\Users\\aeschli\\workspaces\\samples\\main.js:1');
console.error('C:/Users/aeschli/workspaces/samples/main.js:1');
process.exit();

It seems like it's only supposed to work with paths in parens and with :#:# like you'd find in a stack trace

Yes, or line start / line end should work too. I have no idea though why only the first link is highlighted and don't have time currently to investigate

Investigated, and there are sort of two problems:

Clicking on an underlined link doesn't work in MacOS

https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/debug/electron-browser/replViewer.ts#L384
The link detection regex isn't capturing the leading '/', so that line sends it to toResource which concatenates it to the workspace root. I'm not sure what's wrong with the regex.

Only the first link in a log message is shown

I can't figure out where this came in, but I know it was introduced somewhere between
62ed382fad3b22dad2738d9d85f3b29bb969d4e9 (merging #15464)
and d2a4e2eace586dfacf8c13347e110904bcfb31cf (binary searching is getting too time-consuming)
But somewhere, we started parsing an entire message at a time for a link, instead of just one line at a time

Thanks @roblourens for a great investigation. The first issue is introduced by the last PR. The second issue is introduced by a refactoring on my end where we try to handle new lines in the debug console better.
I have pushed a safest fix that takes care of those two problems - reverted only the last PR and disabled the grouping together of the output. This should now bring us to the same behavior of the last stable release (with potentialy some improvements by the first two PRs).
Our link handling has many flaws and I plan to tackle this in the January release.

After testing this out it seems we have regressed a bit. Namely when there is one large output event we only detect the first link. This is practice means when a stack trace is printed that only the top stack trace element can be clicked.
If there are mutliple stack traces printed to the console then the first link in each stack trace will be detected.
I am not sure how big of a regression this is. This was working before becuase we were actually not handling the output events properly and we were separting them in new lines wrongly.
@weinand can decide if it is ok to ship with this limitation. If it is not ok to ship with this then I propose we go back to the old spliting each output per line.
In any case I plan to revisit how we do this whole link detection in January

Why not split it at the time the regexp is applied?

@felixfbecker yeah that is also an option. But when there are multiple links detected on one element than the formating / newlines get screwed up. So there would some additional changes required which are never smart to do in last minue fixes such as this one :)

@felixfbecker unforuntetly had to revert all your prs because we decided to go back to the behavior we had in vscode stable.
Since we have polluted the history of this bug I have created a new one and assigned it to January so we can properly fix this in the next release. Here is the issue https://github.com/Microsoft/vscode/issues/17085

For verification:
Verify vscode insiders is handling links in the repl the same way vscode stable is doing right now

Thanks, looks good to me on MacOS in master (needs verification in a real build)

authors: aeschli bpasero felixfbecker isidorn roblourens


text:
TypeScript formatter suddenly forgets about formatting rules

While developing on Code's source code, the following has happened to me twice: as I edit a file, the language service somehow forgets about the formatting rules and starts formatting everything with 4 spaces, instead of a tab.
@jrieken suggests that

yes - typescript has ‘forgotten’ to which project your file belongs and now uses default settings (from the default project)
this happens after a rebase/sync/etc
restart typescript server and you’ll be happy again

This happened during regular coding, I did not mess with rebase/sync. It literally changed mid-edit. Reloading the TypeScript didn't fix it. Only reloading the window did.

I also saw this issue. I do following steps

Reload window
Convert to tabs manually

I felt it was my git config but do not know if it is related to it

Happens to me too on v1.7.1 on OSX.

@jedfonner do you have any reproducible steps ?

it happens to me too in javascript, I cant reproduce it, because it happens occasionally after paste some code and format it. I use format on save.

@mhegazy @vladima any idea why this happens.
The bug came in with our update to tsserver 2.0.3. We use the formatter by setting the format options to use per file using the configure request. It looks like these settings can get lost in the tsserver.

@mhegazy @vladima after our discussion today I have an idea what might cause this. Will look into fixing this on our end.

So what I think happens is as follows:

all files of a TS project are close
tsserver unloads the project

However the formatter provide doesn't unload the fact that it needs to resent the formatting options. I added code to remove that info on file close.

I have not seen this happening now. Hence marking this as verified.


text:
Add links to MarkedString

In case of an exception while debugging code you have the chance to jump to the line of the source code by clicking on the underlined text in red.
That feature is not available in a hove message but it might be a good idea to allow the user to click on a link in a hover message and "do something" like opening the link on a side editor instead of in the current editor.
In order to easily implement the following proposal might work:

extend the MarkedString to allow links (using the markdown syntax would be fine)
add an event to MarkedString to be notified when the user clicks on a link inside the rendered text. the link uri shall be received as the event parameter

I agree - tho it won't be a special event but invoking a command

OK, As far as the command knows where the user has clicked

We will pass the link itself to the command

Looking forward to test it ;)

stretch for Jan

wrt to links it's this: [label](commandId) to run a command

authors: IgnacioHR jrieken


text:
Document links not very high contrast in high contrast mode

Testing #19089

This does not seem to be markdown specific. I see the same styling in other document types as well

Detected links are now cyan:

authors: mjbvz mousetraps


text:
International characters in regular expression literal breaks highlighting for JS

The syntax highlighter for JS doesn't understand international letters in character lists/literal character list in JavaScript's regular expression literal. First image displays the error, the second shows it works otherwise.

Doesn't work

Works fine

@aeschli This seems to be solved by 0.10.8


text:
Could Not Determine References inside @typedef

/**
 * @typedef Product
 * @property {string} title
 * @property {boolean} high-top
 */

/**
 * @type {Product}
 */
const product = null

The root cause seems to be this https://github.com/Microsoft/TypeScript/issues/14397

Closing as upstream


text:
Project Centennial version of VSC

VSCode Version: 1.13.0
OS Version: Windows 10 1067 15063.332

Hi! I can know if a version of VSC (With Desktop Bridge, Project Centennial)for Windows Store ever comes?
Thanks.

This is being tracked in #10759
Please follow the discussion there


text:
Error message box doesn't show complete message

VSCode Version: 1.15.0 Insider
OS Version: MacOS 10.12.5

Steps to Reproduce:

Try to check for updates
Get error message

Reproduces without extensions: Yes
I get the same error as in #27928. But I don't want to report that issue. What I want to submit is that it's not possible to read the full error message.

It would be better if the message box would show multiple lines.

We are working on improving our notification UX and you can find issues about this in our repository.
Closing as duplicate of the notifaction work

authors: isidorn nonameolsson


text:
Ctrl + Click is not working VS Code  Editor(Javascript file)

VSCode Version: 1.14.2
OS Version: Ubuntu 14.04 LTS

Steps to Reproduce:

create a Javascript function
invoke that function
Do a Ctrl + click -> earlier it used to go to that definition. But after recent update it is not going to that definition. BTW, F12 is working.

Reproduces without extensions: Yes/No

A few questions to help investigate:

Does running the go to definition command work?
If you disable all extensions by starting code with the --disable-extensions command line flag, do you still see the issue

Also, please share some sample code

Following are my answers to your questions

Does running the go to definition command work?

Yes, it's working.

If you disable all extensions by starting code with the --disable-extensions command line flag, do you still see the issue?

Yes, I'm still seeing the issue after disabled extensions. F12 is working as expected, but not Ctrl + Click.

Example code in Javascript:
Function Definition:
var myfunction = function () {//function definition goes here // ..};
Function Invocation:
myfunction();
In my function invocation myfunction(), If I use F12 it's navigating to the function definition. But If I use the combination Ctrl + Click (Mouse click) it's not navigating to that definition.
In earlier version I used with this combinations Ctrl + Click, it was working fine, but now it's not working.

Thanks @rajeshsivananth. Since the command works, the issue is probably with the click binding. On linux, I believe that ctrl + click may be bound to add cursor instead. Try setting:
 "editor.multiCursorModifier": "alt",

Here's more info about this behavior: https://code.visualstudio.com/updates/v1_13#_add-multiple-cursors-with-ctrl-cmd-click

@rajeshsivananth as @mjbvz notes, ctrl + click is something the OS eats up in order to move windows by default. So I'm not sure how this stopped working from one VS Code version to another, unless there were some other changes in your environment.

Thanks @mjbvz and @alexandrudima . Just seen the settings.json file.
And I can see the following property,

"editor.multiCursorModifier": "ctrlCmd".

After removing "editor.multiCursorModifier": "ctrlCmd" from settings.json it is working as expected.

authors: alexandrudima mjbvz rajeshsivananth


text:
new VS Code icon doesn't look right in Windows Open dialog

ref #33272:
When double clicking on workspace file on Windows I get this dialog:

The icon doesn't look right in this context.

Probably fixable via https://github.com/Microsoft/vscode/issues/33362

duplicate of #33433

authors: bpasero weinand


text:
Editor is scrolling on its own

VSCode Version: Code 1.16.1 (27492b6bf3acb0775d82d2f87b25a93490673c6d, 2017-09-14T16:26:20.018Z)
OS Version: Linux x64 4.10.0-35-generic
Extensions:

Extension
Author (truncated)
Version

vscode-docker
Pet
0.0.18

vscode-eslint
dba
1.3.2

githistory
don
0.2.3

tslint
eg2
1.0.9

code-runner
for
0.7.2

vscode-icons
rob
7.14.0

sass-indented
rob
1.4.2

Steps to Reproduce:

Scroll in an application while visual studio code is open
Alt-Tab into visual studio code and start scrolling
The amount of scroll you did in the previous application focused will suddenly happen in visual studio code

I am using Ubuntu 17.04 with GNOME

Reproduces without extensions: Yes/No

It's a problem with my system


text:
Code Insiders constantly prompts authorization on MacOS

VSCode Version: 1.18.0-insider
OS Version: 10.13.1 Beta

Steps to Reproduce:

Open some project that I have downloaded with Sourcetree and leave it open with some file opened.
Sometimes when alt+tab-ing back into code insiders, it prompts popup asking to put in computer credentials to give access to bitbuckets credentials I think.

Even if I click 'Always allow', it still happens again and again and again...

Reproduces without extensions: Yes/No

You can disable auto fetch with "git.autofetch": false. It will be disabled by default soon.

authors: joaomoreno rogerkerse


text:
Call stack is not showing the right frames

I see this consistently when I debug the adapter. The call stack shows the frames jumbled up, or it doesn't update when the debugger pauses, or it shows multiple "Load more frames" entries in the wrong places. The devtools console is full of this error from vscode, Cannot read property 'id' of null: TypeError: Cannot read property 'id' of null. Its stack is:
e.onInsertItems (treeViewModel.ts:70)
t.onItemChildrenRefreshed (treeView.ts:944)
e.fire (event.ts:144)
e.fire (event.ts:144)
(anonymous) (event.ts:212)
e.fire (event.ts:142)
(anonymous) (treeModel.ts:516)
then (winjs.base.raw.js:1566)
a (treeModel.ts:516)
(anonymous) (treeModel.ts:106)
n.Class.derive._oncancel (winjs.base.raw.js:1641)
e.run (treeModel.ts:98)
e.refreshChildren (treeModel.ts:519)
e.doRefresh (treeModel.ts:529)
e.refresh (treeModel.ts:533)
e.refresh (treeModel.ts:982)
e.refresh (treeImpl.ts:158)
(anonymous) (callStackView.ts:78)
e.onTimeout (async.ts:646)

@roblourens Marking this as verified as you have already done so

authors: ramya-rao-a roblourens


text:
search regexp "$" don't works on closed CRLF end-of-line file

VSCode Version: 1.20.1
OS Version: Windows 10

Steps to Reproduce:

Create CRLF end-of-line file
Close the file
Search at left pain with regexp contains "$" that may match 1.'s file
No results found

When the file is opened or the file is LF end-of-line file, it works fine

Does this issue occur when all extensions are disabled?: Yes

/duplicate of https://github.com/Microsoft/vscode/issues/36309

authors: roblourens wtnbgo