Coder Social home page Coder Social logo

Comments (11)

FGasper avatar FGasper commented on April 26, 2024 1

I pushed a fix for the array_buf issue.

from zmodemjs.

FGasper avatar FGasper commented on April 26, 2024

Hi, thanks for the bug report!

Can you please attach the file you were trying to send via sz and the sz command that you used to send the file? And, are you saying that the CRC check does work, or doesn’t work, with the -e flag?

(I mean, there’s not much point to the CRC check since it’s all over TCP anyway.)

from zmodemjs.

yumaojun03 avatar yumaojun03 commented on April 26, 2024

In my case, i use xtermjs to connect my backend Linux server through websocekt, xtermjs use this lib to implement zmodem

this my backend server distribution information:

root@xcpc:~# cat /etc/issue
Ubuntu 18.04.2 LTS \n \l

github can't attach file to issue, i will record my operate below:

  1. i touch a new file, nothing in it, sz file failed:
root@ecs-52a0:~/sz_test# touch a
root@ecs-52a0:~/sz_test# sz a
3445316036 100644 0 1 0kØ&M

in my browser's developer tool console:

zmodem.js:1 Uncaught Error: CRC check failed! (got: 97,48,32,49; expected: 99,203,3,169)
    at a (zmodem.js:1)
    at Object.verify32 (zmodem.js:1)
    at i (zmodem.js:1)
    at Function.parse (zmodem.js:1)
    at r.Session.Receive._parse_and_consume_header (zmodem.js:1)
    at r.Session.Receive._consume_first (zmodem.js:1)
    at r.Session.Receive.consume (zmodem.js:1)
    at t.Sentry.consume (zmodem.js:1)
    at WebSocket.handleWSMessage (zmodem.ts:75)
  1. but use sz -e can receive server file success:
root@ecs-52a0:~/sz_test# sz -e a
**B00000000000000

in my browser developer tool console, has two exception, but file can receive success:

zmodem.js:1 Uncaught ReferenceError: array_buf is not defined
    at r.Session.Receive._consume_first (zmodem.js:1)
    at r.Session.Receive.consume (zmodem.js:1)
    at t.Sentry.consume (zmodem.js:1)
    at WebSocket.handleWSMessage (zmodem.ts:75)

zmodem.js:1 Uncaught ReferenceError: array_buf is not defined
    at r.Session.Receive._consume_first (zmodem.js:1)
    at r.Session.Receive.consume (zmodem.js:1)
    at t.Sentry.consume (zmodem.js:1)
    at WebSocket.handleWSMessage (zmodem.ts:75)

from zmodemjs.

FGasper avatar FGasper commented on April 26, 2024

Thank you for this! I’ll have a look at this later.

Two other questions:

  1. Does the same problem happen with lrzsz 0.12.20?

  2. Does the xtermjs test suite pass on your machine, with lrzsz 0.12.21rc?

from zmodemjs.

FGasper avatar FGasper commented on April 26, 2024

Also, in your xtermjs installation, are you using binary or text WebSocket messages? (zmodemjs requires binary.)

from zmodemjs.

yumaojun03 avatar yumaojun03 commented on April 26, 2024
  1. same problem with lrzsz version is 0.12.21rc(on ubuntu18.04), not 0.12.20, i will test 0.12.20 later

  2. xtermjs demo for zmodem is pass, i can use sz send file success, my mac book's lrzsz version is 0.12.20

i develop an proxy use golang, which use ssh over websocket, It's a little different from demo.

from zmodemjs.

yumaojun03 avatar yumaojun03 commented on April 26, 2024

my proxy server transfer data with binary, not use text.

from zmodemjs.

FGasper avatar FGasper commented on April 26, 2024

I just tried Ubuntu 18.10’s lrzsz (which reports as version 0.12.21rc) against the test suite, and it passed.

If the demo works but your implementation doesn’t, then notwithstanding the array_buf bug, this sounds like it might be a problem in your implementation.

from zmodemjs.

yumaojun03 avatar yumaojun03 commented on April 26, 2024

ok, thanks, I'll check my implementation again.

from zmodemjs.

yumaojun03 avatar yumaojun03 commented on April 26, 2024

it's my problem, i found, it's ok now, thanks!!!

from zmodemjs.

FGasper avatar FGasper commented on April 26, 2024

@yumaojun03 As it happens, while digging into this I realized that there were no tests that actually flex the “happy path” in receive transfers. Worse, I realized that some of tests I did have failed reliably but weren’t even running because of a bug in another test.

So, I’ll roll fixes for all of these into a new release.

from zmodemjs.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.