Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught (in promise) TypeError: Cannot read property '10' of null when attempting to stage files in specific repo #2257

Open
Moonchopper opened this issue Aug 21, 2019 · 3 comments

Comments

@Moonchopper
Copy link

commented Aug 21, 2019

Prerequisites

Description

In one specific repository, Drag-dropping repository files from one folder to another and attempting to stage both delete and add of file renders Git unsuable in Atom for specific repository. At one point in time, this somehow made Atom save .git file to root project repository, causing Atom to read all projects as part of affected repository.

Steps to Reproduce

  1. Fork this repository: https://github.com/Moonchopper/Atom-Broken-Temp
  2. Open Atom in safe mode and use File -> Open Folder -> <Select the Atom-Broken-Temp repository>
  3. Move ui-actions\em_alert\form_actions\copy_to_clipboard\copy_to_clipboard.js to ui-actions\em_alert\form_actions\copy_to_clipboard.js
  4. Attempt to stage both the delete and add change
  5. Atom will now be in a broken state, and is not fixed by restarting Atom or reinstalling it.

Expected behavior:

Atom should stage the add and delete changes and remain properly operational as if you had created or deleted any other file.

Actual behavior:

  • Atom will seemingly remain responsive - you can still click around and edit/make changes to files, but they will not be reflected in the Git tab.
  • When clicking on whatever the second file you attempted to stage was (does not matter which file), the Atom icon will hang and never load the Git diff.
  • The changes you initially tried to stage will never stage, and the Git tab will remain broken any time you attempt to load this specific repository.
  • Neither restarting or reinstalling Atom will solve the problem. The only fix is to delete the repository in its entirety and re-clone it.
  • Manually creating a new file in the directory you desire the code to be in, copying code over to the new file, and deleting the old file exhibits the same broken behavior.
  • Running atom in safe mode and using --clear-state-store does not resolve the trouble.

Reproduces how often:

100% of the time

Additional Information

Developer console indicates the following error at time of breaking Atom, and for every load of the project thereafter:

Uncaught (in promise) TypeError: Cannot read property '10' of null
    at parseUnmergedEntry (C:\Users\Moonchopper\AppData\Local\atom\app-1.40.1\resources\app\static\<embedded>:14:3098719)
    at parseLine (C:\Users\Moonchopper\AppData\Local\atom\app-1.40.1\resources\app\static\<embedded>:14:3099129)
    at Stream.<anonymous> (C:\Users\Moonchopper\AppData\Local\atom\app-1.40.1\resources\app\static\<embedded>:14:3099518)
    at Stream.emit (events.js:182:13)
    at drain (C:\Users\Moonchopper\AppData\Local\atom\app-1.40.1\resources\app\static\<embedded>:14:3585711)
    at Stream.d.queue.d.push (C:\Users\Moonchopper\AppData\Local\atom\app-1.40.1\resources\app\static\<embedded>:14:3585929)
    at emit (C:\Users\Moonchopper\AppData\Local\atom\app-1.40.1\resources\app\static\<embedded>:14:3502657)
    at next (C:\Users\Moonchopper\AppData\Local\atom\app-1.40.1\resources\app\static\<embedded>:14:3502844)
    at Stream.<anonymous> (C:\Users\Moonchopper\AppData\Local\atom\app-1.40.1\resources\app\static\<embedded>:14:3502876)
    at Stream.d.write (C:\Users\Moonchopper\AppData\Local\atom\app-1.40.1\resources\app\static\<embedded>:14:3585839)
    at Readable.ondata (_stream_readable.js:672:20)
    at Readable.emit (events.js:182:13)
    at Readable.read (_stream_readable.js:492:10)
    at flow (_stream_readable.js:920:34)
    at emitReadable_ (_stream_readable.js:553:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Versions

OS: Windows 10
Version: 10.0.17134 Build 17134

Version:
C:\Users\Moonchopper>atom --version

Atom    : 1.40.1
Electron: 3.1.10
Chrome  : 66.0.3359.181
Node    : 10.2.0
C:\Users\Moonchopper>apm --version
apm  2.4.3
npm  6.2.0
node 10.2.1 x64
atom 1.40.1
python
git 2.11.0.windows.3
visual studio
@Moonchopper Moonchopper changed the title Uncaught (in promise) TypeError: Cannot read property '10' of null when Uncaught (in promise) TypeError: Cannot read property '10' of null when attempting to stage files in specific repo Aug 21, 2019
@rsese rsese transferred this issue from atom/atom Aug 21, 2019
@aculbertson-bw

This comment has been minimized.

Copy link

commented Aug 21, 2019

Work around that I found (which is fairly cumbersome) is to stage one of the file actions (i.e. 'delete' file or 'add' file), commit it, and then stage the other file action. This is the only way I can get it to work without crashing and messing up the rest of my Atom environment.

@Resethel

This comment has been minimized.

Copy link

commented Aug 26, 2019

I was also able to reporduce this error with ubuntu 18.04.3 LTS with version:

raph@DevStation: ~$ atom --version
Atom    : 1.36.1
Electron: 2.0.18
Chrome  : 61.0.3163.100
Node    : 8.9.3

raph@DevStation: ~$ apm --version
apm  2.1.3
npm  6.2.0
node 8.9.3 x64
atom 1.36.1
python 2.7.15+
git 2.17.1

. Another work around is to run git reset to unstage all changes which seem to make git working again, but whenever the problematic file is staged again the git becomes unavailable again

@rsese

This comment has been minimized.

Copy link
Member

commented Aug 27, 2019

Thanks for the detailed repro steps and test repo 👍 Reproduced on macOS 10.14.6 with 1.42.0-nightly4.

@rsese rsese added the triaged label Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.