iarsystems / iar-vsc-build

Visual Studio Code extension for developing and building IAR projects
https://marketplace.visualstudio.com/items?itemName=iarsystems.iar-build
Mozilla Public License 2.0
38 stars 5 forks source link

Error initiating IAR toolchain backend. Some functionality may be unavailable: Service registry exited prematurely, code: 1 #82

Closed Anc9 closed 3 months ago

Anc9 commented 4 months ago

Describe the bug: This error occurs when I open the iar project on vscode, resulting in the files directory in iAR-build not being displayed. I have looked up some other bugs, but no similar problem has occurred, please help me confirm what is the problem?I tried to reinstall iar and vscode, but it still didn't work. The iar version is 9.30.1 The following is the output of IarServiceslauncher c830a8f83dfb5f2a4b3792ea88487dd image

mario-pi commented 4 months ago

Thanks for reporting this issue. There seems to be a problem with how the .json files are read from the service launcher utility. Could you please provide more details about your system configuration (including the system OS and its version, language and locale settings), so that we can try to reproduce this?

Anc9 commented 4 months ago

Thank you for your reply. My system is win10 and the language is Chinese. I would like to add that every time I reinstall iar, the file view can be displayed normally when I open an iar project using vscode for the first time, but when I close vscode, I open the same iar project again. The above problems arise. Thanks for your reply and have a great weekend. Below is my version of windows:(By the way, both my vscode and iar-build extensions are the latest versions) image

HampusAdolfsson commented 3 months ago

Hi,

Could you please post the contents of the file C:/Program Files/IAR Systems/Embedded Workbench 9.2/common/bin/projectmanager.json? The error message in the first screenshot indicates that the file is invalid or corrupt. It should contain a valid JSON object, like this:

{
    "services":[
      {
        "name":"com.iar.ProjectManager",
        "libraryName":"ProjectManagerHandler", 
        "spawnNewProcess":false,
        "startupEntryPoint":"StartProjectManager",
        "shutdownEntryPoint":"StopProjectManager",
        "registerInLauncher":false
      }
    ]
}
Anc9 commented 3 months ago

Thanks for your reply, I think I found the problem, due to the company, after I open this json file, the computer I work on encrypts the json file, which causes the next time I open the vscode again, it looks like the iar expansion plugin can't read this file, so this problem occurs!

mario-pi commented 3 months ago

Thanks for following up on this. As the issue is not directly related to the VSCode plugins, you should either report this to your IT department or to the IAR technical support, so that we can know more details about your configuration.

Closing.