Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tasks not running after update #75774

Closed
WardDurossette opened this issue Jun 19, 2019 · 26 comments
Closed

Tasks not running after update #75774

WardDurossette opened this issue Jun 19, 2019 · 26 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority tasks Task system issues verified Verification succeeded

Comments

@WardDurossette
Copy link

CopyCurrentFileToDev.txt

Issue Type: Bug

I have a task that copies the current editor window file to a remote file share. The output window is blank, the task does not seem to run, the destination does not contain the file. The attached file CopyCurrentFileToDev.txt is the .ps1 task, with a renamed extension.

VS Code version: Code - Insiders 1.36.0-insider (6520c22, 2019-06-19T05:19:10.147Z)
OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz (8 x 3600)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 63.88GB (48.69GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (6)
Extension Author (truncated) Version
xml Dot 2.5.0
gitlens eam 9.8.2
mssql ms- 1.6.0
csharp ms- 1.20.0
powershell ms- 2019.5.0
vscodeintellicode Vis 1.1.7
@sarahkittyy
Copy link

I am also having this issue- after updating the insiders build, some tasks won't start. No output, no response at all.

@sarahkittyy
Copy link

I've managed to consistently reproduce it.

  • VSCode Version:
1.36.0-insider
6520c22b83c0b6f168ba7de3309ffab42281e905
x64
  • OS Version: 5.1.11-arch1-1-ARCH GNU/Linux

Current Behavior

Tasks run_notworking1 and run_notworking2 do nothing when run in the latest vscode-insiders version. No feedback, no output window, no error.
Task run_working does what's expected - prints 'Hello, World!' to the task output box.

Relevant Files

tasks.json

{
	// See https://go.microsoft.com/fwlink/?LinkId=733558
	// for the documentation about the tasks.json format
	"version": "2.0.0",
	"tasks": [
		{
			"type": "shell",
			"label": "run_notworking1",
			"command": "python",
			"args": [
				"Program.py"
			],
			"problemMatcher": []
		},
		{
			"type": "shell",
			"label": "run_notworking2",
			"command": "python ${relativeFile}",
			"problemMatcher": []		
		},
		{
			"type": "shell",
			"label": "run_working",
			"command": "python Program.py",
			"problemMatcher": []
		}
	]
}

Program.py

print('Hello, World!')

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

@alexr00
Copy link
Member

alexr00 commented Jun 20, 2019

@WardDurossette I used your task and made a ps1 file that just prints hello. The parameters are all passed in correctly:
image

Do you have any other repro steps?

@alexr00
Copy link
Member

alexr00 commented Jun 20, 2019

@sarahkittyy I also cannot reproduce what you're seeing. I tested on Windows and Ubuntu 18, and all three of your tasks worked for me. We don't have an official Arch Linux release, so I'm guessing there's something wrong with that.

@alexr00 alexr00 added the info-needed Issue requires more information from poster label Jun 20, 2019
@sarahkittyy
Copy link

sarahkittyy commented Jun 20, 2019

Still not working after the latest update, even after clearing all settings and running with extensions disabled. It might be noted that I'm using fish as my default shell, though I don't know if it's relevant with settings cleared & some tasks working while others aren't.

1.36.0-insider
c3fe2d8acde04e579880413ae4622a1f551efdcc
x64

Video of this issue

@sarahkittyy
Copy link

Update: If I put the run_notworking1 or run_notworking2 tasks as the preLaunchTask in a launch.json debugger configuration, I get the same error as referenced in issue #75777.

.vscode/launch.json

{
	// Use IntelliSense to learn about possible attributes.
	// Hover to view descriptions of existing attributes.
	// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
	"version": "0.2.0",
	"configurations": [
		{
			"name": "Python: Current File",
			"type": "python",
			"request": "launch",
			"program": "Program.py",
			"console": "integratedTerminal",
			"preLaunchTask": "run_notworking1"
		}
	]
}

Running the configuration:

image

@WardDurossette
Copy link
Author

WardDurossette commented Jun 20, 2019 via email

@WardDurossette
Copy link
Author

@WardDurossette I used your task and made a ps1 file that just prints hello. The parameters are all passed in correctly:
image

Do you have any other repro steps?
@alexr00

So the terminal window displayed at the bottom of your screenshot is not what I see. I used to see that.
But now when I "F1" "Run Task", and then select my task from the drop down list, I don't have a "1: Task - " in my drop down terminal window choices. I edited my task to just output a "Hello World" as the first line, commenting out all the rest, and no output was given.

Even the output in your screenshot where you see "> Executing task:" that's not there.

I looked in the "C:\Users\rdurossette\AppData\Roaming\Visual Studio Code - Insiders\logs" but there are not any files there.

@wbuck
Copy link

wbuck commented Jun 21, 2019

I'm seeing the same issue with version 1.36.0-insider.
I have some custom tasks for running makefile targets which have been working for weeks which are no longer working. When I attempt to run them via my custom key bindings or from the command palette nothing happens. I should note though that the default build task still works, but my custom rebuild and clean tasks do nothing.

alexr00 added a commit that referenced this issue Jun 21, 2019
@alexr00
Copy link
Member

alexr00 commented Jun 21, 2019

I still can't reproduce any of this, but I have a guess about which change caused the issue. I have pushed a potential fix.

Please everyone in this thread update to the next version of VS Code insiders when it release (it will be the version after 9ff8ae0 and have a date after Jun 21). I will add the commit number of the insiders build here, but you might see the update before I can add it here.

@sarahkittyy
Copy link

I am waiting for the update but I decided to test a little more and it might have something to do with the shell?
If I create a new task:

"tasks": [
		{ // Previously this task wouldn't provide any output at all, now I've added the "options" section
			"type": "shell",
			"label": "run_kindaworking",
			"command": "python",
			"args": [
				"Program.py"
			],
			"options": {
				"shell": {
					"executable": "/bin/bash" //Default shell for me is /usr/bin/fish
				}
			},
			"problemMatcher": []
		}
]

Instead of nothing being outputted / shown at all, I now see this:

image

Setting the shell to /usr/bin/fish simply does nothing- vscode gives no feedback whatsoever.

Also, in the image above, it seems that the command & args are wrapped in single quotes -- it's trying to launch /bin/bash 'python Program.py' which isn't valid anyway. If I set the "executable" parameter in options.shell to /bin/bash -c I again get absolutely no feedback whatsoever.

@yanghanlin
Copy link

I have received and installed the update.

This time tasks cannot still be executed; there appears a error message that reads Cannot read property 'strong' as undefined. I opened the developer tools and collected the output of the console into
this log file. It seems another internal error.

@alexr00
Copy link
Member

alexr00 commented Jun 24, 2019

Thank you @yanghanlin, that is very helpful! I'm not sure how it could have happened, but I think we are detecting your platform incorrectly. Would you be able to set a couple breakpoints? You should be able to open the developer tools, go to the sources tab, and ctrl+p to find the file.

This one happens when you reload VS Code. I am curious if _isNative gets set in this if statement. https://github.com/Microsoft/vscode/blob/master/src/vs/base/common/platform.ts#L50

This one will hit when you try to run a task. What is the value of the platform argument?
https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts#L1123

@sarahkittyy
Copy link

I am also experiencing the same error: Cannot read property 'strong' of undefined

1.36.0-insider
6a7020dd4a11e0f33b157b3df4baeec90d85701b
x64
uname -a
# Linux sarahkitty 5.1.12-arch1-1-ARCH #1 SMP PREEMPT Wed Jun 19 09:16:00 UTC 2019 x86_64 GNU/Linux

The window log gives this trace:

[2019-06-24 11:00:04.990] [renderer1] [error] Cannot read property 'strong' of undefined: TypeError: Cannot read property 'strong' of undefined
    at l (file:///opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.main.js:3162:703)
    at d (file:///opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.main.js:3163:444)
    at x.buildShellCommandLine (file:///opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.main.js:3163:662)
    at x.<anonymous> (file:///opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.main.js:3158:611)
    at Generator.next (<anonymous>)
    at r (file:///opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.main.js:35:293)
    at process._tickCallback (internal/process/next_tick.js:68:7)

@wbuck
Copy link

wbuck commented Jun 24, 2019

I'm also experiencing the "Cannot read property 'strong' of undefined". I can attempt to debug after work tonight.

@yanghanlin
Copy link

yanghanlin commented Jun 24, 2019

@alexr00 I have set the breakpoints according to your instruction, and here is what I find:

(I'm sorry that I am not familiar with front-end development, therefore I may have done it incorrectly)

The first breakpoint

I set the first breakpoint in Line 50 of platform.ts and found that, as VSCode hit the breakpoint on reloading, the variable _isNative was false.

Screenshot 1

Then I stepped through the if block, and when the program finally got through the block, it could be seen that _isNative had been set to true.

Screenshot 2

The second breakpoint

When the second breakpoint was hit, it could be seen that the value of the platform argument was 3.

Screenshot 3

@wbuck
Copy link

wbuck commented Jun 25, 2019

I should also note that I'm launching VSCode from my Ubuntu WSL distro.

@yanghanlin
Copy link

I have also launched VSCode from my Ubuntu WSL (Version 1) distro for several times to try out VSCode Remote when it was released. However, I was not using it when the problem occurred.

@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority tasks Task system issues and removed info-needed Issue requires more information from poster labels Jun 25, 2019
@alexr00
Copy link
Member

alexr00 commented Jun 25, 2019

Thank you for your help! I now see the problem and I've pushed a fix. It will be in the next insiders!

kiku-jw added a commit to kiku-jw/vscode that referenced this issue Jun 26, 2019
* beautify macos keyboard layout label

* Open folders and workspaces in new windows

* Basic file opening via Open File command

* Update auto detect layout info.

* Respect openFoldersInNewWindow setting for folders/workspaces

* Make openWindow function resolve at right time

* keyboard layout status bar item tooltip

* Move workspace menu and action to fileActions.contribution

* Add clarifying comment on instance service request events

* Fullscreen change event.

* Remove unneeded margin on settings editor scrollbar
Fix microsoft#75724

* fix: microsoft#72626

* Remove extra register of automatic tasks

Fixes microsoft#75758

* remove trailing '/' from repo url for baseFolderName

* handle style-attribute modifications, cache requests in addition to results, microsoft#75061

* fix microsoft#75818

* fix bad tree guide indentation

* remove TODO

* update eslint

* update distro

fixes microsoft#73872

* Revert "Revert "Merge pull request microsoft#75695 from orange4glace/master""

This reverts commit a05e05c.

* Revert "Revert "explorero: file actions disablment no longer needed""

This reverts commit b634152.

* more code insets API tweaks, microsoft#66418

* Alpine build

* Update distro hash

* Remove duplicate cp

* shellscript: Add folding markers

* fixes microsoft#75829

* show setting on windows only

* add ExtensionKind and remoteName propsed APIs, microsoft#74188

* debt - use file service based configuration file service

* fix tests

* debt create configuration file service inside configuration service

* First cut of file service based user data service

* Use user data service for reading settings

* Update distro hash

* add diagnostic tool for git file event issues

* 💄

* Update distro hash

* introduce VSCODE_STEP_ON_IT

* remove env scripts

fixes microsoft#74792

* Update xterm.css

Fixes microsoft#75827

* check if file exists

* remove alert, aria-live will read the content even with no focus

fixes microsoft#41356

* win code.sh fix

* 🧀 Fix microsoft#75831

* Add proposed api check for shell API

Part of microsoft#75091

* launch ext host window internally

* EH debugging: support multiple files and folders

* Update distro

* [email protected]

Diff: xtermjs/xterm.js@846a189...96eafd3

Changes:

- Publish improvements
- Layering/strict updates

* Fire onDidChangeMaximumDimension when dimensions are set

Fixes microsoft#73496

* Fix potential race

* Delete cached service worker entries after a short timeout

* Fix webview developer command not being registered

* Re-queue canceled geterr requests before remaining buffers

We should give higher priority to files that have previously had geterr triggered on them but did not have their request completed

* Remove log uploader

Fixes microsoft#75748

* Use localized name for macOS keyboard layout

* fixes microsoft#75856

* User keyboard layout

* simplify common keymap layer

* load user keyboard layout after initialization

* US Standard keyboard info

* better score for layout

* fast return keyboard layout if 48-keymap matches

* a single keyboard event can be a keymap

* switch to user selected keyboard layout

* Have `.get` return promise directly

* Make sure we wait until service worker is ready before creating content

* Add version check to service worker

Try to make sure our page is talking to the expected version of the service worker

* Don't use clone as much

* Move host javascript to own file

* Update distro

* Remove icon explorations before shipping stable

* Move listener to window service.

* Minimap: Render find match decorations, fixes microsoft#75216

* Fix `navigator.serviceWorker.ready` is a Promise, not a function

* Use update instead of manually tring to re-register

* Extract ITypeScript server interface

* extract server error to own file

* Extract server spanwer to own file

* Renames

* Move getQueueingType into class

* Add experimental dual TS server

Fixes microsoft#75866

* Enable "typescript.experimental.useSeparateSyntaxServer" for VS Code workspace

* Remove trailing comma

* Include server id in TS server errors

* Make execute command a configuration object

* Also include format in the syntax commands

* Fix method name

* Renames

* Better encapsulate logic of spawning different server kinds

* some fixes for mac web

* New test runner API for microsoft#74555

* update doc, microsoft#74188

* build: release only iff all builds succeed, introduce VSCODE_RELEASE env

* first version of vscode.workspace.fs

* 💄

* Tasks registration + the local ext host now has an autority

Part of microsoft/vscode-remote-release#757

* Add platform override to getDefaultShellAndArgs in terminal

Part of microsoft/vscode-remote-release#757

* Ensure no trailing path separtor on URIs from file picker

Part of microsoft#75847

* data tree view state should store scrollTop, microsoft#74410

* fix microsoft#75564

* Change promise structure of creating terminal in tasks

Potential fix for microsoft#75774

* do not allow additionalProperties

microsoft#75887

* explorer: roots forget children on new file system provider registration

microsoft#75720

* Update max tokenization limit without reload

* Use interfaces for keyboard layout registration

* Separate keyboard layout loading logic for testing

* Test browser keymapper

* unused standard keyboard event.

* Make sure we dismiss the zoom status bar entry when switching editors

* Reduce state

* Added strictly typed telemetry function (microsoft#75915)

* Added strictly typed telemetry function

* cleanup publicLog2 signature

* Extract port mapping helper function

* Re-use extractLocalHostUriMetaDataForPortMapping for openUri

* Also map 127.0.0.1 in webviews and forward it for openExternal

Fixes microsoft/vscode-remote-release#108

* use empty model when content is empty

* 💄

* Update keyboard layout file comments

* Delete breadcrumbs.filterOnType unused setting. Fixes microsoft#75969

* Add quick open/input color registrations (fixes microsoft#65153)

* Update API

* implements ExtHostEditorInsetsShape

* use divs for tree indent guides

fixes microsoft#75779

* comment out more (for microsoft#74898)

* Quick Open > Quick Input (microsoft#65153)

* build - enable language server tests again (for microsoft#74898)

* use polish for wsl1

* move extension kind to Extension-interface

* init log level of remote log service

* Open/Save local commands should not show in the command palette

Fixes microsoft#75737

* chockidar: use polling

* fix build conditions

* xterm fixes for cglicenses

* oss 1.36.0

* workaround for microsoft#75830

* update distro commit

* electron - still call setBounds() as workaround for first window

* fixes microsoft#75753

* [email protected]

* remove user data service

* use posix.join

* update doc

* Add -1 tab index to status bar entries

This keeps them out of the tab order, but allows them to be read with a screen reader

Fixes microsoft#41406

* empty view polish labels for remote case

microsoft/vscode-remote-release#511

* send remote watcher error to file service (fixes microsoft/vscode-remote-release#329)

* update distro

* better error handling in case of loader error in tests

* fix win 32 bits unit tests

* [email protected] (microsoft#76020)

* Code-insiders started from WSL doesn't return to console/ doesn't connect. Fixes microsoft/vscode-remote-release#780

* Group decorations by line before rendering

* disable support for simple fullscreen (microsoft#75054)

* telemetry - add window.nativeFullScreen

* move API to stable,  microsoft#74188

* build - add and use --disable-inspect for integration tests (microsoft#74898)

* 💄

* bump distro

* Report workspace stats in shared process

* Make return undefined explicit

* Add missing return

* Use explicit window.createWebviewManager

* gdpr comments

* webkit fullscreen detection

* Fix file name spelling

* update distro

* add logging

* disabling installing extension from gallery when not enabled

* status.workbench.keyboardLayout

* Move Inspect Keyboard Layout JSON to workbench

* return local extension after install

* install deps and packs while installing from gallery

* Fix default shell selector outside of Windows

Fixes microsoft#76040

* Add explicit win32 gheck for using user specific temp folder

* Always use settings UI when querying online services, fixes microsoft#75542

* Disable conpty in terminal when accessibility mode is on

Fixes microsoft#76043

* Move the webviewResourceRoot property to be set on each webview instead of as a global property

For microsoft#72155

This allows  us to potentially change the resource root per webview

* Make RelativeWorkspacePathResolver  a static class

* Use openExternal

* Auto restart when changing  typescript.experimental.useSeparateSyntaxServer

* Fix regular expression for rewriting iframe webview html replacing quotes

* Telemetry Command (microsoft#76029)

* Added telemetry command

* Initial Build support

* Added build logic for telemetry

* Linux Builds

* Windows builds sort of work

* Remove arm telemetry extraction

* Remove alpine telemetry extraction

* Remove accidental s

* More try catch

* Use full resource uri for transforming webview resources

This ensures we still work even if there is no base uri set

* Use outerHtml to make sure we write `<html>` element from extensions too

* Use a regexp that works across browsers

* Implement reload on iframe based webview Elements

* fix various nls issues

* 💄

* add debug output (microsoft#76024)

* Fix tasks platform for quoting

Fixes microsoft#75774

* fix hockeyapp symbols and report errors (fix microsoft#76024)

* update distro

* fix bad watch

* update distro

* Fix drive letter casing on typescript tasks

Occurs when opening by double clicking on workspace file. Fixes microsoft#75084

* update distro

* update distro

* Test remoteName and extensionKind (for microsoft#76028)

* MainThreadFileSystem does not await

* Fix microsoft#76096

* Rename runInBackground to hideFromUser

See microsoft#75278

* Update distro

* Fix minimap decoration rendering on horizontal scroll, fixes microsoft#76128

* Handle windows paths correctly when loading webvie resources

* Fix standard link handler for iframe based webviews

* Mark extensions.all as readonly

This iteration, we marked a few other arrays as readonly. We should do the same for extensions.all

* Fix microsoft#75927.

* Register mouse down on container dom node.

* Make sure we never cancel a request to just one of the ts servers

Fixes microsoft#76143

* Show document link tooltip first and put click instructions in parens

Fixes microsoft#76077

This change also update our standard link hovers to follow this format

* reset listener once users choose a dedicated keyboard layout

* switch to a new layout only when the score is higher.

* Fix kb unit test

* fix microsoft#76149

* web - document some API

* 💄 workbench API

* disable arm and alpine for stable

fixes microsoft#76159

* Fix extra auto complete on fast delete (microsoft#74675)

Fixes #vscode-remote-release/4

* use yarn --frozen-lockfile for builds

* remove `update.enableWindowsBackgroundUpdates` from online settings

* fix microsoft#76076

* revert the change

* prevent product.json containing gallery

* fix microsoft#76074

* fixes microsoft#54084

* Fix microsoft#76105

* fix microsoft#75904

* workaround for  microsoft#74934
@sarahkittyy
Copy link

Can confirm it's fixed in version 41691474e5fa22a279d49fc4b58af66bc11ce41b

@wbuck
Copy link

wbuck commented Jun 26, 2019

My tasks are correctly running again after update. Thanks

@yanghanlin
Copy link

Everything works perfectly now. Thank you!

@alexr00
Copy link
Member

alexr00 commented Jun 27, 2019

Thank you all for verifying!

@alexr00 alexr00 added the verified Verification succeeded label Jun 27, 2019
@nicolas-oliveira
Copy link

I can't run tasks in 1.36.1 Manjaro/Arch Linux
I downgraded to 1.30.2 and everything goes fine
This is the task:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "debug",
            "type": "shell",
            "command": "",
            "args": [
                "g++",
                "-g",
                "${relativeFile}",
                "-o",
                "a.exe"
            ]
        },
        {
            "label": "Compile and run",
            "type": "shell",
            "command": "",
            "args": [
                "g++",
                "-g",
                "${relativeFile}",
                "-o",
                "${fileBasenameNoExtension}.out",
                "&&",
                "clear",
                "&&",
                "./${fileBasenameNoExtension}.out"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": {
                "owner": "cpp",
                "fileLocation": [
                    "relative",
                    "${workspaceRoot}"
                ],
                "pattern": {
                    "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
                    "file": 1,
                    "line": 2,
                    "column": 3,
                    "severity": 4,
                    "message": 5
                }
            }
        }
    ]
}

@alexr00
Copy link
Member

alexr00 commented Jul 30, 2019

@NickCageNick this is, sadly, expected right now. When 1.37.0 release you will have the fix. Or, you can try insiders and get the fix now.

@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority tasks Task system issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants