Skip to content

Extension never loads on folder synced to GIT #3738

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

Closed
scottstaffiere opened this issue Dec 18, 2018 · 11 comments
Closed

Extension never loads on folder synced to GIT #3738

scottstaffiere opened this issue Dec 18, 2018 · 11 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@scottstaffiere
Copy link

Environment data

  • VS Code version: 1.30.0
  • Extension version 2018.12.1
  • OS and version: Windows 7
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: N/A

Expected behaviour

Open Python file and Python extension loads.

Actual behaviour

I am opening a Python file under a folder that is cloned from a Git repo. The "Python Extension Loading" message appears forever in the bottom. If I run as Administrator, it loads immediately. If I open a regular Python file that is not in the Git repo, it loads immediately. I'm using Git for Windows to do my cloning/checkouts.

Steps to reproduce:

  1. Clone a Git repository
  2. Open a Python file that is versioned. If it does not load, open as administrator.

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

N/A - No output

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

Here is the error stack: Error: spawn EPERM
at _errnoException (util.js:1024:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at exports.spawn (child_process.js:514:9)
at v.module.exports.v.keys (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:182883)
at module.exports.l.getKeys.Promise (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:1:227142)
at new Promise ()
at C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:1:227113
at Generator.next ()
at module.exports.i (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:1:226828)
at new Promise ()
at module.exports.i (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:1:226605)
at C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:1:227073
at l. (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:1:227251)
at Generator.next ()
at module.exports.i (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:1:226828)
at new Promise ()
at module.exports.i (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:1:226605)
at l.getKeys (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:1:227014)
at v. (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:555425)
at Generator.next ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:554302)
at new Promise ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:554079)
at v.getCompanies (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:555371)
at v. (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:554854)
at Generator.next ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:554302)
at new Promise ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:554079)
at v.getInterpretersFromRegistry (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:554757)
at v.getInterpretersImplementation (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:554690)
at v. (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:1:110539)
at Generator.next ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:1:109873)
at new Promise ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:1:109650)
at v.getInterpreters (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:1:110310)
at f. (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:524298)
at Generator.next ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:523721)
at new Promise ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:523498)
at module.exports.f.getInterpreters.t.getLocators.map.t (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:524256)
at Array.map ()
at f. (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:524249)
at Generator.next ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:523721)
at new Promise ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:523498)
at f.getInterpreters (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:524189)
at v. (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:517121)
at Generator.next ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:515818)
at new Promise ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:515595)
at v.getInterpreters (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:83:517061)
at C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:9:68009
at C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:9:68043
at Generator.next ()
at module.exports.r (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:9:65576)
at new Promise ()
at module.exports.r (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:9:65353)
at module.exports.t.activate (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:9:66372)
at Function.t._callActivateOptional (c:\Users\brodie11\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:759:329)
at Function.t._callActivate (c:\Users\brodie11\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:759:6)
at c:\Users\brodie11\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:758:173
at

@d3r3kk d3r3kk added the triage label Dec 18, 2018
@d3r3kk d3r3kk self-assigned this Dec 18, 2018
@d3r3kk
Copy link

d3r3kk commented Dec 18, 2018

Thanks for the report.

Could you please do the following to give us a bit more information?

  1. Enable source map support: in the command bar of VS Code type 'enable source map support' and hit enter.

image

  1. Reload the workspace and capture the logs.

Thanks!

@d3r3kk d3r3kk added bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster feature-* labels Dec 18, 2018
@d3r3kk d3r3kk assigned d3r3kk and unassigned d3r3kk Dec 18, 2018
@scottstaffiere
Copy link
Author

Strangely trying to enable that produces its own error:

vs_python

@scottstaffiere
Copy link
Author

I tried again this morning and I was able to get it enabled. Here's the log:

Here is the error stack: Error: spawn EPERM
at _errnoException (util.js:1024:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at exports.spawn (child_process.js:514:9)
at v.spawn [as keys] (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\node_modules\winreg\lib\registry.js:525:1)
at item (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\common\platform\registry.ts:73:1)
at new Promise ()
at C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\common\platform\registry.ts:73:1
at Generator.next ()
at webpack_require (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\common\platform\registry.ts:20:17)
at new Promise ()
at value (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\common\platform\registry.ts:11:1)
at Array (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\common\platform\registry.ts:70:1)
at l. (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\common\platform\registry.ts:34:1)
at Generator.next ()
at webpack_require (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\common\platform\registry.ts:20:17)
at new Promise ()
at value (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\common\platform\registry.ts:11:1)
at l.getKeys (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\common\platform\registry.ts:68:1)
at v.getKeys (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\services\windowsRegistryService.ts:84:1)
at Generator.next ()
at next (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\services\windowsRegistryService.ts:16:1)
at new Promise ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\services\windowsRegistryService.ts:12:1)
at v.__awaiter [as getCompanies] (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\services\windowsRegistryService.ts:83:1)
at v.getCompanies (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\services\windowsRegistryService.ts:57:1)
at Generator.next ()
at next (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\services\windowsRegistryService.ts:16:1)
at new Promise ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\services\windowsRegistryService.ts:12:1)
at v.__awaiter [as getInterpretersFromRegistry] (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\services\windowsRegistryService.ts:53:1)
at v.getInterpretersFromRegistry [as getInterpretersImplementation] (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\services\windowsRegistryService.ts:50:1)
at v.cacheInterpreters (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\services\cacheableLocatorService.ts:54:1)
at Generator.next ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\services\cacheableLocatorService.ts:26:25)
at new Promise ()
at value (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\services\cacheableLocatorService.ts:16:1)
at v.get [as getInterpreters] (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\services\cacheableLocatorService.ts:46:1)
at f.getInterpreters (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\index.ts:68:103)
at Generator.next ()
at next (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\index.ts:16:1)
at new Promise ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\index.ts:12:1)
at __awaiter (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\index.ts:68:1)
at Array.map ()
at f.map (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\index.ts:68:1)
at Generator.next ()
at next (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\index.ts:16:1)
at new Promise ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\index.ts:12:1)
at f.__awaiter [as getInterpreters] (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\locators\index.ts:66:1)
at v.getInterpreters (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\interpreterService.ts:64:1)
at Generator.next ()
at next (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\interpreterService.ts:16:1)
at new Promise ()
at module.exports.o (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\interpreterService.ts:12:1)
at v.__awaiter [as getInterpreters] (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\interpreter\interpreterService.ts:63:1)
at getInterpreters (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\extension.ts:228:1)
at initializeServices (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\extension.ts:86:1)
at Generator.next ()
at next (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\extension.ts:7:1)
at new Promise ()
at module.exports.r (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\extension.ts:3:1)
at __awaiter (C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1\src\client\extension.ts:78:1)
at Function.t._callActivateOptional (c:\Users\brodie11\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:759:329)
at Function.t._callActivate (c:\Users\brodie11\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:759:6)
at c:\Users\brodie11\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:758:173

@scottstaffiere
Copy link
Author

So for full disclosure, I had switched over to a "user" installation and this all started happening. I uninstalled it and reinstalled the system-wide one and it works now.

I had found that if I opened up a file in my users directory, it worked without an issue. Anything else outside my own directory would not activate the Python extension.

@scottstaffiere
Copy link
Author

It's back to not working in the system wide installation. Once I open up a folder that's outside of my user root, the Python extension never loads unless I run as admin.

If I open a file directly it seems to work fine, but not when I open a folder.

@d3r3kk
Copy link

d3r3kk commented Dec 28, 2018

Interesting! So, are you in the Administrators group on your machine, or are you simple a User or Power User on your machine?

I always put myself in the Administrators group on Windows (not that I am endorsing such behaviour, mind you, but I have found it to be helpful as a developer).

I can try and reproduce this on a VM next week and see if I can get a local reproduction.

@scottstaffiere
Copy link
Author

Sorry for the delay - just got back from vacation!

I can see myself in the actual Administrators group. That being said, our machines are locked down with a lot of GPOs, so it's possible something else has been deployed to my machine that's actively preventing it from connecting. I have it set on auto-update - I can't recall this being an issue earlier, but unfortunately I can't pinpoint when it stopped working.

@d3r3kk
Copy link

d3r3kk commented Jan 18, 2019

After re-reading the conversation in this thread, I see some opportunities to help sort this out.

1. User folder doesn't contain the correct path to the typical location of the .vscode/extensions folder.

I see from the logs above now that there are a lot of entries that look like so:

C:\Users\brodie11.vscode\extensions\ms-python.python-2018.12.1

That looks incorrect! VS Code normally installs the extensions folder to this path on Windows:

C:\Users\brodie11\.vscode\extensions\ms-python.python-2018.12.1

Perhaps this is a glitch of some sort to do with log-sanitization for this issue, or maybe it's truly where things are located on your machine.

Try uninstalling VS Code, then removing the C:\Users\brodie11.vscode folder altogether. Then re-install VS Code (verify the folder is now under C:\Users\brodie11\.vscode) and try again.

2. Permissions may actually be locked down outside of the user folder due to GPO.

...I had found that if I opened up a file in my users directory, it worked without an issue. Anything else outside my own directory would not activate the Python extension.

and

...our machines are locked down with a lot of GPOs...

Tells me that there may be a correlation here.

Can you try this:

  1. Clone a git repo someplace within your user folder, preferrably one you've seen this behaviour on before.
  2. Clone that same repo but place the clone outside of your user folder.
  3. Load up the Python extension and open the first user-dir repo clone and try to reproduce the issue.
  4. Load up the Python extension and open the second non-user-dir repo clone and try to reproduce the issue.

Then please do save the logs from both runs and report them here.

@scottstaffiere
Copy link
Author

It is actually installed in the correct directory and this was as a result of the bad find/replace to scrub my actual directory before posting here. Somehow I missed the forward slash - but it is in c:/users/<username/.vscode as it should be.

I'll give #2 a shot today and see how things roll! Thanks for the help :)

@d3r3kk
Copy link

d3r3kk commented Jan 21, 2019

Awesome, looking forward to seeing the result - I hope we can sort out a way to better notify the user of an issue, if not provide a way to fix the problem altogether.

@scottstaffiere
Copy link
Author

Sorry for the delay - This is so across the board that I can't reliably even submit a debug log. I just upgraded to Windows 10 the other day and so far, it seems like it's working. I'm going to close this because it's so inconsistent, but I'm sure it's related to my particular setup here. Thank you for the help and I absolutely love the extension - top notch!

@ghost ghost removed info-needed Issue requires more information from poster triage labels Feb 11, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 11, 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
Projects
None yet
Development

No branches or pull requests

2 participants