Code change:
} private async checkAndGetCompatible(extension: IGalleryExtension, includePreRelease: boolean): Promise<IGalleryExtension> { <del> const compatible = await this.galleryService.getCompatibleExtension(extension, includePreRelease, await this.getTargetPlatform()); if (compatible) { if (includePreRelease && !compatible.properties.isPreReleaseVersion && extension.hasPreReleaseVersion) { </del> <ins> const targetPlatform = await this.getTargetPlatform(); let compatibleExtension: IGalleryExtension | null = null; if (extension.hasPreReleaseVersion && extension.properties.isPreReleaseVersion !== includePreRelease) { compatibleExtension = (await this.galleryService.getExtensions([{ ...extension.identifier, preRelease: includePreRelease }], { targetPlatform, compatible: true }, CancellationToken.None))[0] || null; } if (!compatibleExtension && await this.galleryService.isExtensionCompatible(extension, includePreRelease, targetPlatform)) { compatibleExtension = extension; } if (!compatibleExtension) { compatibleExtension = await this.galleryService.getCompatibleExtension(extension, includePreRelease, targetPlatform); } if (compatibleExtension) { if (includePreRelease && !compatibleExtension.properties.isPreReleaseVersion && extension.hasPreReleaseVersion) { </ins> throw new ExtensionManagementError(localize('notFoundCompatiblePrereleaseDependency', "Can't install pre-release version of '{0}' extension because it is not compatible with the current version of {1} (version {2}).", extension.identifier.id, this.productService.nameLong, this.productService.version), ExtensionManagementErrorCode.IncompatiblePreRelease); } } else {

Related discussion:
text: And yes, if I uninstall the extension, install release, try to switch, the same happens over and over again. I discovered another bug: switch back to stable is not possible [2022-05-24 12:03:11.208] [remoteagent] [warning] Overwriting user extension with It always pushes me back to the pre-release. I think this may be related to keep local/remote on the same version/track. EDIT: Okay, actually this blocks everyone using insiders with the jupyter and/or other plugins in combination with remote ssh. Since insiders are updated daily, the "vs code server" is updated daily and the plugin is revert/installed again in the non preview version. So my hotfix has to applied daily which is really annoying. EDIT 2: I realised that the current (release today) stable "jupyter" version also has the latest insiders api implemented. So for now and for me that is solved - but the actual bug is still there, I can't switch to pre-release versions in a remote ssh setup.
Sorry that you are having this annoying issue and glad that you are able to reproduce it so that we can investigate. If you don't mind, can you please summarise your repro steps?
So, I now understand why it's a bit complex to reproduce this - I guess... I was even confused myself. So, currently the only way to reproduce it was for me: 1) deinstall the server (rm -rf .vscode-insiders-server) 2) connect/install + install jupyter extensions (local: pre-release) -pre-release installation successful 3) switch to release on remote 4) reload window -I am then on release try to switch to pre-release -issue appears. And now the important part: I realised that I still had the setting because within our company we had restrictions before... setting this to false also fixes the issue - even when it appeared before.
Thanks for the steps. I can reproduce it now and fixed. To verify: Open a remote window and set setting Install pre-release of ESLint extension Reload window Switch to release version of ESLint extension Reload window Switch to pre-release version of ESLint extension Make sure switch happens