bit icon indicating copy to clipboard operation
bit copied to clipboard

getting `fatal: unable to connect to a remote legacy SSH server from Harmony client'`after renaming my scope to point to an existing scope in bit.cloud

Open odedre opened this issue 3 years ago • 1 comments

Describe the bug

I created a few components and changed the scope name to point to an older scope I have in bit.cloud. now for every bit command I get the following error:

fatal: unable to connect to a remote legacy SSH server from Harmony client

even after renaming to a different scope, I keep getting this error on bit status etc

Steps to Reproduce

see tar corrupted-ws.tar.gz

Expected Behavior

A clear and concise description of what you expected to happen.

Screenshots, exceptions and logs

when I run bit status --log

*** Loading Bit *** argv:
/Users/oded/.bvm/nodejs/16.16.0/bin/node
/Users/oded/.bvm/versions/0.0.856/bit-0.0.856/node_modules/@teambit/bit/bin/bit
s
--log
⢀⠀ loading aspects...teambit.workspace/workspace, [888] loadAspects, loading 0 aspects.
ids:
needed-for: workspace.cli.registerOnStart
[*] started a new command: "status" with the following data:
    args: []
    flags: {
      "log": true
    }
⡀⠀ fetching statusComponentLoader, loading consumer-components from the file-system, ids: my-button, my-react
ComponentLoader, the following 0 components have been already loaded, get them from the cache.
failed finding a component my-button with hash: 38c2a923af37a684d75fa409236de49072fe8102
failed finding a component my-button with hash: 38c2a923af37a684d75fa409236de49072fe8102
componentConfigLoad, running on load even for component my-button
teambit.scope/scope, ScopeComponentLoader.get, loading odedr.test/my-button
failed finding a component my-button with hash: 38c2a923af37a684d75fa409236de49072fe8102
failed finding a component repro/my-button with hash: 9061fcde489880559ac8a7b4566e32450c0191c7
teambit.workspace/workspace, [671] loadAspects, loading 1 aspects.
ids: bla.bla/my-react
needed-for: odedr.test/my-button
importMany, cache true, throwForDependencyNotFound: false. ids: bla.bla/my-react, lanes:
sources.getMany, 1 Ids
failed finding a component bla.bla/my-react with hash: 8d3ddd8c556ff0dd4e92035d689f6a1f22a043b5
total missing externals: 1
ScopeComponentsImporter.getExternalMany, fetching from remote scope. Ids: bla.bla/my-react, Lanes:
enrich context from global config
[-] Running fetch on 1 remote(s), to get 1 id(s), with the following options
    type: "component"
    withoutDependencies: false
    includeArtifacts: false
    allowExternal: false
    onlyIfBuilt: false
⠄⠀ fetching statusthe next network configuration is used in network.http: [object Object]
⢋⠀ fetching statusEstablishing a new SSH connection to ssh://[email protected]:bla.bla
ssh, trying to connect using token
⡋⢀ fetching statusssh, authenticated successfully using token
ssh: going to run a remote command _fetch , path: bla.bla
⠀⢐ fetching statusssh: got an error, {"payload":{"name":"Error","message":"Please update your Bit client.\nFor additional information: https://docs.bit.dev/docs/installation#latest-version","stack":"Error: Please update your Bit client.\nFor additional information: https://docs.bit.dev/docs/installation#latest-version\n    at checkVersionCompatibilityOnTheServer (/usr/local/lib/node_modules/bit-bin/dist/scope/network/check-version-compatibility.js:166:11)\n    at Fetch.action (/usr/local/lib/node_modules/bit-bin/dist/cli/commands/private-cmds/_fetch-cmd.js:110:75)\n    at /usr/local/lib/node_modules/bit-bin/dist/extensions/cli/legacy-command-adapter.js:88:35\n    at Generator.next (<anonymous>)\n    at Generator.tryCatcher (/usr/local/lib/node_modules/bit-bin/node_modules/bluebird/js/release/util.js:16:23)\n    at PromiseSpawn._promiseFulfilled (/usr/local/lib/node_modules/bit-bin/node_modules/bluebird/js/release/generators.js:97:49)\n    at /usr/local/lib/node_modules/bit-bin/node_modules/bluebird/js/release/generators.js:201:15\n    at LegacyCommandAdapter.action (/usr/local/lib/node_modules/bit-bin/dist/extensions/cli/legacy-command-adapter.js:103:7)\n    at /usr/local/lib/node_modules/bit-bin/dist/extensions/cli/legacy-command-adapter.js:110:41\n    at Generator.next (<anonymous>)\n    at Generator.tryCatcher (/usr/local/lib/node_modules/bit-bin/node_modules/bluebird/js/release/util.js:16:23)\n    at PromiseSpawn._promiseFulfilled (/usr/local/lib/node_modules/bit-bin/node_modules/bluebird/js/release/generators.js:97:49)\n    at /usr/local/lib/node_modules/bit-bin/node_modules/bluebird/js/release/generators.js:201:15\n    at LegacyCommandAdapter.report (/usr/local/lib/node_modules/bit-bin/dist/extensions/cli/legacy-command-adapter.js:115:7)\n    at /usr/local/lib/node_modules/bit-bin/dist/cli/command-runner.js:183:43\n    at Generator.next (<anonymous>)"},"headers":{"version":"14.8.8","compressed":false}}
ssh: exit. Exit code: 126
⠀⠠ fetching statusssh: returned with code: 126, signal: undefined.
component-loader.loadOne, failed loading my-button from the file-system
got an error from command status: GeneralError
GeneralError
    at SSH.errorHandler (/Users/oded/.bvm/versions/0.0.856/bit-0.0.856/node_modules/@teambit/legacy/dist/scope/network/ssh/ssh.js:592:14)
    at Channel.<anonymous> (/Users/oded/.bvm/versions/0.0.856/bit-0.0.856/node_modules/@teambit/legacy/dist/scope/network/ssh/ssh.js:563:51)
    at Channel.emit (node:events:539:35)
    at Channel.doClose (/Users/oded/.bvm/versions/0.0.856/bit-0.0.856/node_modules/ssh2/lib/utils.js:97:21)
    at Object.onceWrapper (node:events:641:28)
    at Channel.emit (node:events:539:35)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
fatal: unable to connect to a remote legacy SSH server from Harmony client
[+] CLI-OUTPUT: fatal: unable to connect to a remote legacy SSH server from Harmony client
[*] the command "status" has been terminated with an error code 1

Specifications

  • Bit version: 856
  • Workspace type: (harmony)
  • Node version: v16.15.1
  • npm / yarn version:
  • Platform: macos

for harmony workspace

  • relevant env
  • relevant aspects

for leagacy

  • Bit compiler (include version):
  • Bit tester (include version):

Additional context

Add any other context about the problem here.

odedre avatar Sep 15 '22 10:09 odedre

@odedre , this scope you changed to, is it a legacy scope? Do you have such a scope in the legacy?

davidfirst avatar Sep 16 '22 16:09 davidfirst