microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
747 stars 245 forks source link

Unable to run VSCode after F5 #34

Closed kine closed 7 years ago

kine commented 7 years ago

Hi, do not know if it is connected to AL or not, but on the VPC I have opened the PageExtensionMethod sample, pressed F5. The extension was correctly deployed. Than I closed the VSCode, and after I tried to run VSCode again I get this error and I cannot open the VSCode anymore: [Window Title] Error

[Main Instruction] A JavaScript error occurred in the main process

[Content] Uncaught Exception: Error: Cannot find module 'C:\Program Files (x86)\Microsoft VS Code\resources\app\out\main' at Module._resolveFilename (module.js:455:15) at Function.Module._resolveFilename (C:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\common\reset-search-paths.js:35:12) at Function.Module._load (module.js:403:25) at Object. (C:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\browser\init.js:171:8) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.runMain (module.js:590:10)

[OK]

Again, I am not sure if it is connected to AL compiler or anything. What I remember is, that VSCode gives me error about "encoding" extensions which cannot be found or something like that before I closed the VSCode. I am filing this issue for you to see, if it will happen to someone else too...

If you want access to the machine, no problem. If not, I will discard it and create new one. Just tell me...

StanislawStempin commented 7 years ago

Hi, I doesn't look related to AL extension and we haven't experienced it before. I suggest reinstalling VSCode on the machine or getting a new VM. We will keep this issue open for a while to see if this is a more common problem.

DavidRoys commented 7 years ago

I had exactly the same problem. In the end I needed to configure a new VM as I could not even get the reinitialise scripts to work.

Koubek commented 7 years ago

Hi, when watching the call stack and thinking about the error I can remember "packageFileName": "${command.resolvePackageFileName}" parameter in launch.json file. Can you change the behavior of VSCode by setting some specific filename instead of using the automatic resolver and so avoid the error message? Maybe it is a bad idea but...

freddydk commented 7 years ago

If you encounter an error like this, then please embed the installation status (c:\demo\status.txt) from the machine? This can maybe tell us if something wasn't installed properly on the machine. Thanks.

defr0std commented 7 years ago

@Koubek Could you please clarify which call stack led you to thinking about ${command.resolvePackageFileName}? If it's the one posted in the original comment, then it should not be related to the command in the launch.json. The problem in the original comment is that somehow some VSCode source files got deleted from disk and therefore it could not start. Could be related to some unsuccessful upgrade or something like this.

By the way, you can change the ${command.resolvePackageFileName} in the launch.json to the static file name if you wish. We just use this dynamic resolution because the name of the navx file is generated based on app publisher/name, etc.

StanislawStempin commented 7 years ago

Closing this issue as there was no activity for two weeks.