evidence-dev/evidence-vscode

Extension is not activitated

archiewood opened this issue · 6 comments

Steps To Reproduce

Download the VSCode extension and create a new project

Environment

VSCode Ext version: 1.3.39
OS: Mac OS Sonoma, but I have seen this on other OS's too

Expected Behavior

The extension should be activated and show the "Start Evidence" button in the status bar

Actual Behaviour

The Start Evidence button is not shown, and most Evidence commands (eg Start Server) are not accessible via the command palette.

Workarounds

Open a new window in VSCode and reopen the repository

@archiewood Did you create the new project from within an exciting window (I.e. you had a project opened already?)

Think I may have found the issue - able to reproduce some error in activation, but the error messsage is not entirely helpful:

CleanShot 2023-12-05 at 20 30 44@2x

Ok I tracked this down - this wouldn't be the issue in the production one since I don't think this has been released, but @csjh this portion of the code in extension.ts in activate() is throwing an error when I try to activate the extension - I assume because it can't find the Uri and then is trying to check the Uri scheme:

    const manifestUri = await getManifestUri();
    const manifest = await getManifest(manifestUri);
    // if there's no manifest, either the project is unbuilt, or it's legacy - either way there's nothing to show
    if (manifest) {
      const schemaViewProvider = new SchemaViewProvider(manifestUri);
      window.registerTreeDataProvider('schemaView', schemaViewProvider);
    }
    commands.executeCommand(Commands.SetContext, Context.isNonLegacyProject, !!manifest);
csjh commented

I can't reproduce the error @hughess, what how were you reproducing? Create new project doesn't do it for me it seems

I was just hitting F5 to run the test environment and on activation for that, it showed an error pop up in the bottom right corner

@hughess i can't remember.

However I also had this happen while opening an existing project at one point (we also saw this on a demo IIRC)