atom / github

:octocat: Git and GitHub integration for Atom
https://github.atom.io
MIT License
1.11k stars 392 forks source link

Uncaught TypeError: Path must be a string. Received undefined #1015

Open bennyborn opened 7 years ago

bennyborn commented 7 years ago

This only seems to happen when saving files located on a NFS share.

  1. Create a git repository in a NFS share
  2. Add a new file
  3. Do some changes and save the file

Atom: 1.18.0 ia32 Electron: 1.3.15 OS: Windows 10 1607 (Build 14393.1358) Thrown From: github package 0.3.3

Stack Trace

Uncaught TypeError: Path must be a string. Received undefined

At path.js:7

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.join (path.js:466:7)
    at events.map.e (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/github/lib/models/workdir-context.js:127:77)
    at Array.map (native)
    at WorkdirContext.subs.add.observer.onDidChange.events (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/github/lib/models/workdir-context.js:127:34)
    at Function.module.exports.Emitter.simpleDispatch (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at FileSystemChangeObserver.didChange (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/github/lib/models/file-system-change-observer.js:67:24)
    at _this3.currentFileWatcher.debounceMS (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/github/lib/models/file-system-change-observer.js:103:26)

Commands

     -1:22.2.0 editor:select-to-first-character-of-line (input.hidden-input)
     -1:22 intentions:highlight (input.hidden-input)
     -1:21.9.0 core:copy (input.hidden-input)
  2x -1:21.8.0 core:move-down (input.hidden-input)
     -1:21.4.0 editor:move-to-end-of-screen-line (input.hidden-input)
  2x -1:21.2.0 core:move-left (input.hidden-input)
     -1:20.7.0 intentions:highlight (input.hidden-input)
     -1:20.6.0 core:paste (input.hidden-input)
     -1:10.1.0 editor:move-to-end-of-screen-line (input.hidden-input)
  2x -1:09.8.0 editor:select-to-first-character-of-line (input.hidden-input)
     -1:09.5.0 core:select-up (input.hidden-input)
  2x -1:09.1.0 core:delete (input.hidden-input)
     -1:08.8.0 intentions:highlight (input.hidden-input)
     -1:08.6.0 core:save (input.hidden-input)
     -0:08.0 intentions:highlight (input.hidden-input)
     -0:07.8.0 core:save (input.hidden-input)

Non-Core Packages

atom-beautify 0.30.3 
atom-material-ui 2.0.4 
atom-minify 0.8.0 
atom-pair 2.0.10 
atom-password-generator 0.2.2 
autocomplete-php 0.3.7 
block-comment-plus 0.5.1 
build 0.68.0 
build-grunt 0.4.0 
build-npm-apm 0.12.0 
busy 0.7.0 
busy-signal 1.4.3 
color-picker 2.2.5 
docblockr 0.10.5 
file-icons 2.1.8 
firewatch-syntax 1.1.1 
git-plus 7.9.3 
highlight-selected 0.13.1 
intentions 1.1.2 
language-apache 1.7.0 
language-jade 0.7.2 
language-pug 0.0.21 
language-twig 1.6.3 
linter 2.2.0 
linter-coffeescript 1.0.0 
linter-jshint 3.1.5 
linter-jsonlint 1.3.0 
linter-php 1.3.2 
linter-pug 1.3.1 
linter-pylint 2.1.0 
linter-ui-default 1.6.2 
livereload 0.4.4 
markdown-pdf 1.5.4 
markdown-scroll-sync 2.1.2 
minimap 4.28.2 
pdf-view 0.59.0 
pigments 0.39.1 
project-manager 3.3.5 
random 1.3.0 
rest-client 1.3.1 
sass-autocompile 0.13.3 
script 3.15.0 
simple-drag-drop-text 0.3.4 
sort-lines 0.14.0 
string-looper 0.1.2 
sync-settings 0.8.2 
terminal-panel 1.14.1 
text-manipulation 0.6.0 
todo-show 1.11.0 
unique-code 0.3.1 
uuidgen 1.2.1 
BlaM commented 7 years ago

Just happened for me:

Rather "complicated" situation:

The error occured when I installed some files via commandline in Linux, using other credentials than the Windows machine (a.k.a. new subfolders were added where the Windows-Machine has only read permissions).

My best guess is that Atom was confused by not being able to write - maybe?

abunimeh commented 7 years ago

[Enter steps to reproduce:]

  1. edit a project/file on a remote share

This is how the path looks like X:\epix10ka\epix\software\epixRogue\scripts\acquire.py It translates to \afs\slac.stanford.edu\u\re\abunimeh\epix10ka\epix\software\epixRogue\scripts\acquire.py

Atom: 1.18.0 x64 Electron: 1.3.15 OS: Microsoft Windows 10 Enterprise Thrown From: github package 0.3.3

Stack Trace

Uncaught TypeError: Path must be a string. Received undefined

At path.js:7

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.join (path.js:466:7)
    at events.map.e (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/github/lib/models/workdir-context.js:127:77)
    at Array.map (native)
    at WorkdirContext.subs.add.observer.onDidChange.events (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/github/lib/models/workdir-context.js:127:34)
    at Function.module.exports.Emitter.simpleDispatch (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at FileSystemChangeObserver.didChange (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/github/lib/models/file-system-change-observer.js:67:24)
    at _this3.currentFileWatcher.debounceMS (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/github/lib/models/file-system-change-observer.js:103:26)

Commands

Non-Core Packages

aligner-vhdl 0.1.0 
atom-beautify 0.30.4 
autocomplete-python 1.9.1 
busy-signal 1.4.3 
editorconfig 2.2.2 
highlight-column 0.5.4 
highlight-selected 0.13.1 
hyperclick 0.1.2 
intentions 1.1.2 
language-spice 2.1.4 
language-verilog 0.4.0 
language-vhdl 0.7.2 
linter 2.2.0 
linter-flake8 2.2.1 
linter-ui-default 1.6.3 
linter-verilog 0.7.0 
minimap 4.29.0 
minimap-find-and-replace 4.5.2 
minimap-highlight-selected 4.6.1 
minimap-split-diff 0.3.7 
script 3.15.0 
split-diff 1.4.3