FTPClient.jl icon indicating copy to clipboard operation
FTPClient.jl copied to clipboard

ASCII download tests fail with libcurl error #78 - all platforms

Open mjram0s opened this issue 4 years ago • 5 comments

  • https://github.com/invenia/FTPClient.jl/runs/3082576957?check_suite_focus=true
  • https://github.com/invenia/FTPClient.jl/runs/3091197661?check_suite_focus=true
binary_ascii: Error During Test at /home/runner/work/FTPClient.jl/FTPClient.jl/test/non_ssl.jl:205
  Got exception outside of a @test
   :: LibCURL error #78
  Stacktrace:
    [1] macro expansion
      @ ~/work/FTPClient.jl/FTPClient.jl/src/FTPC.jl:62 [inlined]
    [2] ftp_perform(ctxt::ConnContext{Bool})
      @ FTPClient ~/work/FTPClient.jl/FTPClient.jl/src/conn_context.jl:298
    [3] ftp_get(ctxt::ConnContext{Bool}, file_name::String, save_path::String; mode::FTP_MODE)
      @ FTPClient ~/work/FTPClient.jl/FTPClient.jl/src/conn_context.jl:152
    [4] ftp_get(options::RequestOptions, file_name::String, save_path::String; mode::FTP_MODE, verbose::Bool)
      @ FTPClient ~/work/FTPClient.jl/FTPClient.jl/src/request_options.jl:114
    [5] macro expansion
      @ ~/work/FTPClient.jl/FTPClient.jl/test/non_ssl.jl:231 [inlined]
    [6] macro expansion
      @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1151 [inlined]
    [7] top-level scope
      @ ~/work/FTPClient.jl/FTPClient.jl/test/non_ssl.jl:207
    [8] include(fname::String)
      @ Base.MainInclude ./client.jl:444
    [9] macro expansion
      @ ~/work/FTPClient.jl/FTPClient.jl/test/runtests.jl:41 [inlined]
   [10] macro expansion
      @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1151 [inlined]
   [11] macro expansion
      @ ~/work/FTPClient.jl/FTPClient.jl/test/runtests.jl:40 [inlined]
   [12] macro expansion
      @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1151 [inlined]
   [13] top-level scope
      @ ~/work/FTPClient.jl/FTPClient.jl/test/runtests.jl:29
   [14] include(fname::String)
      @ Base.MainInclude ./client.jl:444
   [15] top-level scope
      @ none:6
   [16] eval
      @ ./boot.jl:360 [inlined]
   [17] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:261
   [18] _start()
      @ Base ./client.jl:485

mjram0s avatar Jul 19 '21 14:07 mjram0s

  • https://github.com/invenia/FTPClient.jl/runs/3095482965?check_suite_focus=true
  • https://github.com/invenia/FTPClient.jl/runs/3100034141?check_suite_focus=true
  • https://github.com/invenia/FTPClient.jl/runs/3110060219?check_suite_focus=true

TylerLoewen avatar Jul 20 '21 18:07 TylerLoewen

https://github.com/invenia/FTPClient.jl/runs/3120011044?check_suite_focus=true

TylerLoewen avatar Jul 21 '21 14:07 TylerLoewen

The problem behind this is that the FTP get function is failing when using ASCII mode. This happens whether we use CURLOPT_TRANSFERTEXT or @ce_curl curl_easy_setopt CURLOPT_URL full_url * ";type=a" to set the mode.

I think the problem may be in LibCURL_jll v7.73.0+0. The issue does not appear to be happening in julia 1.5 which can only use up to v7.70.0+2. I haven't been able to verify though.

Doing some digging it appears to be related to this https://github.com/curl/curl/issues/6564. FTPServer.jl uses pyftpdlib which does not support SIZE for ASCII transfers. I'm not sure how the error is being triggered.

Verbose output from failing call:

*   Trying ::1:52090...
* Connected to localhost (::1) port 52090 (#0)
< 220 pyftpdlib 1.5.6 ready.
> USER user4252
< 331 Username ok, send password.
> PASS <password>
< 230 Login successful.
> PWD
< 257 "/" is the current directory.
* Entry path is '/'
* Request has same path as previous transfer
> EPSV
* Connect data stream passively
* ftp_perform ends with SECONDARY: 0
< 229 Entering extended passive mode (|||52093|).
*   Trying ::1:52093...
* Connecting to ::1 (::1) port 52093
* Connected to localhost (::1) port 52090 (#0)
> TYPE A
< 200 Type set to: ASCII.
> SIZE test_byte_file
< 550 SIZE not allowed in ASCII mode.
* The file does not exist
* Remembering we are in dir ""
* Connection #0 to host localhost left intact

morris25 avatar Aug 19 '21 19:08 morris25

I will silence the tests with the @test_skip macro for now since it isn't a high priority. If we need to fix this in future we could find a different FTP test server implementation or figure out how to avoid checking the size when performing an ASCII download.

morris25 avatar Aug 20 '21 19:08 morris25

Has this ever been fixed? I am still receiving this error when testing on > Julia 1.5

jo-fleck avatar Mar 14 '24 20:03 jo-fleck