remote-ftp icon indicating copy to clipboard operation
remote-ftp copied to clipboard

Uncaught TypeError: The "path" argument must be of type string. Received type undefined

Open Abdulfattah715 opened this issue 4 years ago • 1 comments

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.58.0 x64 Electron: 9.4.4 OS: ??Microsoft Windows 11 Pro Thrown From: remote-ftp package 2.2.4

Stack Trace

Uncaught TypeError: The "path" argument must be of type string. Received type undefined

At internal/validators.js:112

TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:112:11)
    at Object.join (path.js:375:7)
    at Client.toRemote (/packages/remote-ftp/lib/client.js:620:17)
    at ConnectorFTP.put (/packages/remote-ftp/lib/connectors/ftp.js:629:32)
    at /packages/remote-ftp/lib/client.js:748:24)
    at Client._next (/packages/remote-ftp/lib/client.js:650:39)
    at /packages/remote-ftp/lib/client.js:696:16
    at tryApply (/packages/remote-ftp/lib/connectors/ftp.js:12:14)
    at /packages/remote-ftp/lib/connectors/ftp.js:153:9
    at final (/packages/remote-ftp/node_modules/@icetee/ftp/lib/connection.js:515:11)
    at Object.cb (/packages/remote-ftp/node_modules/@icetee/ftp/lib/connection.js:552:11)
    at /packages/remote-ftp/node_modules/@icetee/ftp/lib/connection.js:122:20)
    at Parser.emit (events.js:228:7)
    at Parser.write (/packages/remote-ftp/node_modules/@icetee/ftp/lib/parser.js:78:12)
    at Socket.ondata (/packages/remote-ftp/node_modules/@icetee/ftp/lib/connection.js:295:20)
    at Socket.emit (events.js:223:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:181:23)

Commands

     -3:00.9.0 git-plus:copy (input.hidden-input)
     -3:00.9.0 core:copy (input.hidden-input)
     -2:58.2.0 editor:newline (input.hidden-input)
     -2:56.5.0 core:paste (input.hidden-input)
  2x -2:39 core:move-right (input.hidden-input)
  5x -2:03.8.0 core:backspace (input.hidden-input)
     -1:43.1.0 core:save (input.hidden-input)
     -1:31.6.0 remote-ftp:connect (atom-notification.info.icon.icon-info.native-key-bindings.has-close)
  4x -1:08.8.0 core:backspace (input.hidden-input)
  2x -1:06.1.0 core:save (input.hidden-input)
     -0:51.3.0 remote-ftp:connect (input.hidden-input)
  4x -0:38.7.0 core:backspace (input.hidden-input)
     -0:36.4.0 core:save (input.hidden-input)
     -0:33.3.0 core:backspace (input.hidden-input)
     -0:16.8.0 core:save (input.hidden-input)
     -0:11.5.0 remote-ftp:connect (input.hidden-input)

Non-Core Packages

atom-beautify 0.33.4 
atom-liquid-snippets 0.3.0 
autoclose-html-plus 0.27.2 
emmet 2.4.3 
file-icons 2.1.47 
ftp-remote-edit-plus 1.3.1 
git-blame 1.8.0 
git-plus 8.7.1 
pigments 0.40.6 
remote-ftp 2.2.4 

Abdulfattah715 avatar Sep 09 '21 17:09 Abdulfattah715

I'm getting this error, too. It doesn't appear to affect anything. As far as I can tell, the plugin is working as expected.

Here's my config:

{
  "protocol": "sftp",
  "host": "10.0.1.222",
  "user": "klaatu",
  "privatekey": "/home/klaatu/.ssh/mykey"
}

EDIT: I didn't realise the error report was a template for a bug report...

Here's the error report copy pasta:

<!--
Have you read Pulsar's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/atom/.github/blob/master/CODE_OF_CONDUCT.md

Do you want to ask a question? Are you looking for support? The Pulsar message board is the best place for getting support: https://discuss.atom.io
-->

### Prerequisites

None of these atom.io links work:

* [ ] Put an X between the brackets on this line if you have done all of the following:
    * Reproduced the problem in Safe Mode: <https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode>
    * Followed all applicable steps in the debugging guide: <https://flight-manual.atom.io/hacking-atom/sections/debugging/>
    * Checked the FAQs on the message board for common solutions: <https://discuss.atom.io/c/faq>
    * Checked that your issue isn't already filed: <https://github.com/issues?q=is%3Aissue+user%3Aatom>
    * Checked that there is not already an Pulsar package that provides the described functionality: <https://atom.io/packages>

### Description

Remote-ftp plugin renders an error when I save a local file.

### Steps to Reproduce

1. Login to a remote machine using Remote-Ftp plugin
2. Edit a local file (NOT a remote file)
3. Save the local file locally 

**Expected behavior:**

No interaction from Remote FTP, because in this instance I've only been editing local files.

**Actual behavior:**

Remote Ftp renders an error.

### Versions

**Pulsar**: 1.108.0 x64
**Electron**: 12.2.3
**OS**: linux 6.4.13-200.fc38.x86_64
**Thrown From**: [remote-ftp](https://github.com/icetee/remote-ftp) package 2.2.4


### Stack Trace

Uncaught TypeError: The "path" argument must be of type string. Received undefined

At internal/validators.js:124

TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at validateString (internal/validators.js:124:11) at Object.join (path.js:1039:7) at Client.toRemote (client.js:620:17) at ConnectorSFTP.put (sftp.js:603:32) at Client. (client.js:748:24) at Client._next (client.js:650:39) at client.js:696:16 at callCompleted (sftp.js:173:44) at oneDirCompleted (sftp.js:177:25) at sftp.js:258:36 at Array.forEach () at sftp.js:193:12 at /packages/remote-ftp/node_modules/ssh2-streams/lib/sftp.js:1631:13 at SFTPStream._transform (/packages/remote-ftp/node_modules/ssh2-streams/lib/sftp.js:389:17) at SFTPStream.Transform._read (internal/streams/transform.js:205:10) at SFTPStream._read (/packages/remote-ftp/node_modules/ssh2-streams/lib/sftp.js:183:15) at SFTPStream.Transform._write (internal/streams/transform.js:193:12) at writeOrBuffer (internal/streams/writable.js:358:12) at SFTPStream.Writable.write (internal/streams/writable.js:303:10) at Channel.ondata (internal/streams/readable.js:719:22) at Channel.emit (events.js:315:20) at addChunk (internal/streams/readable.js:309:12) at readableAddChunk (internal/streams/readable.js:284:9) at Channel.Readable.push (internal/streams/readable.js:223:10) at /packages/remote-ftp/node_modules/ssh2/lib/Channel.js:167:15) at SSH2Stream.emit (events.js:315:20) at parsePacket (/packages/remote-ftp/node_modules/ssh2-streams/lib/ssh.js:3191:10) at SSH2Stream._transform (/packages/remote-ftp/node_modules/ssh2-streams/lib/ssh.js:701:13) at SSH2Stream.Transform._read (internal/streams/transform.js:205:10) at SSH2Stream._read (/packages/remote-ftp/node_modules/ssh2-streams/lib/ssh.js:253:15) at SSH2Stream.Transform._write (internal/streams/transform.js:193:12) at writeOrBuffer (internal/streams/writable.js:358:12) at SSH2Stream.Writable.write (internal/streams/writable.js:303:10) at Socket.ondata (internal/streams/readable.js:719:22) at Socket.emit (events.js:315:20) at addChunk (internal/streams/readable.js:309:12) at readableAddChunk (internal/streams/readable.js:284:9) at Socket.Readable.push (internal/streams/readable.js:223:10) at TCP.onStreamRead (internal/stream_base_commons.js:188:23)


### Commands

5x -3:06.1.0 core:backspace (input.hidden-input) 9x -3:04.9.0 core:move-right (input.hidden-input) -2:59.9.0 core:move-left (input.hidden-input) -2:59.4.0 core:backspace (input.hidden-input) -2:59 core:move-right (input.hidden-input) -2:58.5.0 core:move-down (input.hidden-input) -2:58.2.0 core:backspace (input.hidden-input) -2:57.6.0 core:move-right (input.hidden-input) 5x -2:57.1.0 core:select-down (input.hidden-input) -2:55.8.0 core:select-left (input.hidden-input) -2:55.4.0 core:backspace (input.hidden-input) -2:55 editor:newline (input.hidden-input) -2:54.2.0 core:save (input.hidden-input) -2:36.2.0 remote-ftp:disconnect (ol.ftptree-view.full-menu.list-tree.has-collapsable-children.focusable-panel) -1:12.5.0 remote-ftp:create-sftp-config (div.tool-panel.tree-view) -0:42.2.0 settings-view:view-installed-packages (input.hidden-input)


### Non-Core Packages

git-plus 8.7.1 platformio-ide-terminal 2.10.1 remote-ftp 2.2.4


### Additional Information

<!-- Any additional information, configuration or data that might be necessary to reproduce the issue. -->

notklaatu avatar Sep 05 '23 07:09 notklaatu