0

Emacs fails to open some files with Tramp (ssh), I get the error "invalid base64 data", although not always visibly.

I have seen this, but no solution.

Example with tramp debug ((setq tramp-verbose 6), buffer *debug tramp/ssh pudu*) on a file that works:

14:23:17.032391 tramp-do-file-attributes-with-perl (5) # file attributes with perl: /Users/gauthier/src/airglow_app/README.md
14:23:17.032481 tramp-send-command (6) # tramp_perl_file_attributes /Users/gauthier/src/airglow_app/README.md integer 2>/dev/null; echo tramp_exit_status $?
14:23:17.056629 tramp-wait-for-regexp (6) # 
(nil 1 502 20 (25137 48410) (25137 48407) (25137 48407) 46.0 33188 t (25 . 49828) -1)
tramp_exit_status 0
///354d40bc54e29ed72bf0c1c6eef9e4a2#$

and on a file that fails:

14:25:43.478449 tramp-send-command (6) # tramp_perl_file_attributes /Users/gauthier/src/airglow_app/AirGlow_App/AirGlow_App.Android/AirGlow_App.Android.csproj integer 2>/dev/null; echo tramp_exit_status $?
14:25:43.501418 tramp-wait-for-regexp (6) # 
(nil 1 502 20 (25162 53915) (25162 53914) (25162 53914) 19177.0 33188 t (38 . 43118) -1)
tramp_exit_status 0
///354d40bc54e29ed72bf0c1c6eef9e4a2#$
14:25:44.659348 tramp-do-file-attributes-with-perl (5) # file attributes with perl: /Users/gauthier/src/airglow_app/AirGlow_App/AirGlow_App.Android/AirGlow_App.Android.csproj
14:25:44.659644 tramp-send-command (6) # tramp_perl_file_attributes /Users/gauthier/src/airglow_app/AirGlow_App/AirGlow_App.Android/AirGlow_App.Android.csproj integer 2>/dev/null; echo tramp_exit_status $?
14:25:44.681739 tramp-wait-for-regexp (6) # 
(nil 1 502 20 (25162 53915) (25162 53914) (25162 53914) 19177.0 33188 t (38 . 43118) -1)
tramp_exit_status 0

This other question seems to say that it is dependent on file size.

What can I do to open all files through Tramp?


This works if I start emacs with -Q. Also, *Messages* shows this:

Tramp: Decoding local file ‘/tmp/tramp.5ggoOL.csproj’ with ‘(lambda (beg end) (base64-decode-region beg end) (let ((coding-system-for-write (quote binary)) (coding-system-for-read (quote binary))) (apply (quote tramp-call-process-region) (quote (tramp-file-name ssh nil nil pudu nil /Users/gauthier/src/airglow_app/AirGlow_App/AirGlow_App/AirGlow_App.csproj nil)) (point-min) (point-max) (car (split-string env GZIP= gzip -d)) t t nil (cdr (split-string env GZIP= gzip -d)))))’...failed
3
  • Hard to say with the given information. Does it also happen if you start emacs -Q only? If yes, pls report a bug via M-x tramp-bug and add the traces as explained in the Tramp manual. Apr 5, 2022 at 7:25
  • It does not! It's working with -Q. I thought I tested that, so sorry.
    – Gauthier
    Apr 6, 2022 at 8:15
  • And now... I changed the tramp verbose level to 8, tried to open the file again (no -Q) and it worked. Turning back verbose level to 6 and now I can open the file! And unset after a new emacs restart, I can still open the file.
    – Gauthier
    Apr 6, 2022 at 8:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.