Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash using lib ssh2-sftp-client : "missing symbol called" #8228

Closed
nanocom opened this issue Jan 17, 2024 · 5 comments
Closed

crash using lib ssh2-sftp-client : "missing symbol called" #8228

nanocom opened this issue Jan 17, 2024 · 5 comments
Labels
bug Something isn't working crash An issue that could cause a crash

Comments

@nanocom
Copy link

nanocom commented Jan 17, 2024

What version of Bun is running?

1.0.23

What platform is your computer?

Darwin 23.2.0 arm64 arm

What steps can reproduce the bug?

bun run

import SftpClient from 'ssh2-sftp-client'
console.log('Hello world')
async function b() {
  const client: SftpClient = new SftpClient()
  try {
    await client.connect('ddd')

    const buffer = await client.get('ddd')

    console.log(buffer.toString('utf-8'))
  } finally {
    client.end()
  }
}
b()

What is the expected behavior?

No error message

What do you see instead?

with just the code above =>

dyld[46751]: missing symbol called
[1]    46751 killed     bun run ddd.ts

with the code inside a nestjs app launched with bun --bun start:dev =>

dyld[43856]: missing symbol called
57 |                 killProcess(childProcessRef.pid);
58 |             }
59 |             else {
60 |                 childProcessRef = this.spawnChildProcess(entryFile, sourceRoot, debugFlag, outDirName, binaryToRun);
61 |                 childProcessRef.on('exit', (code) => {
62 |                     process.exitCode = code;
                         ^
TypeError: exitCode must be a number
      at /Users/nanocom/aura/api/node_modules/@nestjs/cli/actions/start.action.js:62:21
      at emit (node:events:154:95)
      at #handleOnExit (node:child_process:537:31)
54 |     find(pid);
55 |     return result;
56 | }
57 | function killPid(pid, signal) {
58 |     try {
59 |         process.kill(pid, signal);
             ^
SystemError: kill() failed
   errno: 3
 syscall: "kill"

      at killPid (/Users/nanocom/aura/api/node_modules/@nestjs/cli/lib/utils/tree-kill.js:59:9)
      at treeKillSync (/Users/nanocom/aura/api/node_modules/@nestjs/cli/lib/utils/tree-kill.js:14:5)
error: script "start:dev" exited with code 1

Additional information

No response

@nanocom nanocom added the bug Something isn't working label Jan 17, 2024
@nanocom nanocom changed the title ssh2-sftp-client missing symbol ssh2-sftp-client missing symbol called Jan 17, 2024
@Electroid Electroid added the crash An issue that could cause a crash label Jan 17, 2024
@nanocom nanocom changed the title ssh2-sftp-client missing symbol called crash using lib ssh2-sftp-client : "missing symbol called" Feb 1, 2024
@Brown000
Copy link

Brown000 commented Feb 22, 2024

Same issue for bun v1.0.28 inited project when using ssh2. As I am using macOS 14 M1 Pro chip, I tried same code on this CodeSandBox project, and that worked. So this is maybe a problem related to the OS.

@jdgriffith
Copy link

jdgriffith commented Mar 14, 2024

I believe* one of the projects I work on is encountering the exact same thing related to this package on MacOS. This blocks our team from using bun because everyone has a mac. Any chance the underlying issue will be investigated some more? I know it might* not be a bun issue but I'm really pushing to get our enterprise team fully on bun with nestjs.

@bjesuiter
Copy link

Same error on M3 Max MacBookPro 2023, with Bun 1.1.3

@Jarred-Sumner
Copy link
Collaborator

Duplicate of #4290

@Jarred-Sumner Jarred-Sumner marked this as a duplicate of #4290 Aug 8, 2024
@Jarred-Sumner
Copy link
Collaborator

@190n is actively working on supporting V8 C++ APIs in Bun

Please follow along in #4290. It will be fixed

@Jarred-Sumner Jarred-Sumner closed this as not planned Won't fix, can't repro, duplicate, stale Aug 8, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working crash An issue that could cause a crash
Projects
None yet
Development

No branches or pull requests

6 participants