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

Conflict with tree-view-autoresize package #580

Closed
jerrykal opened this issue Apr 5, 2017 · 29 comments
Closed

Conflict with tree-view-autoresize package #580

jerrykal opened this issue Apr 5, 2017 · 29 comments
Assignees
Labels
bug Confirmed defect in package logic, deprecation notices, and PRs which fix them.

Comments

@jerrykal
Copy link

jerrykal commented Apr 5, 2017

Problem as the title, here's an example:

Before disable file-icons:

2017-04-05 07_59_28

After disable file-icons:

2017-04-05 08_00_29

@Alhadis
Copy link
Member

Alhadis commented Apr 5, 2017

I don't understand what the problem is.

@jerrykal
Copy link
Author

jerrykal commented Apr 5, 2017

@Alhadis In the gif-1 you can see I close tree-view before I close atom, but after I open atom, the tree-view show up again.

@jerrykal
Copy link
Author

jerrykal commented Apr 5, 2017

It should be closed when I restart atom.

@Alhadis
Copy link
Member

Alhadis commented Apr 5, 2017

Ah, I see.

Run this in your dev console:

atom.config.set("file-icons.revealTreeView", false);

Then restart. Better?

@jerrykal
Copy link
Author

jerrykal commented Apr 5, 2017

@Alhadis Thank you 😘 , It's now work very well for me now 🎉

@jerrykal jerrykal closed this as completed Apr 5, 2017
@Alhadis
Copy link
Member

Alhadis commented Apr 5, 2017

My pleasure!

I'll update the readme's troubleshooting section to include this, because you're not the first person to bring this up.

@jerrykal
Copy link
Author

jerrykal commented Apr 5, 2017

@Alhadis But there is a new 🐛 spawned after run atom.config.set("file-icons.reavelTreeView", fales); I it post on the other packages call tree-view-autoresize, can you look at it ? maybe you can fix it.

@Alhadis
Copy link
Member

Alhadis commented Apr 5, 2017

I'll look once I'm in front of a desktop computer again.

@Alhadis
Copy link
Member

Alhadis commented Apr 5, 2017

@ooJerryLeeoo Does this still happen after disabling the tree-view-autoresize package?

I also need to stress one important fact: the code I gave you is a hack. In fact, it's a hack to fix a hack that I needed to do because people were complaining about the tree-view not opening automatically.

Thankfully, they're all temporary issues. Assuming the Atom team decide to merge atom/tree‑view#1009.

@jerrykal
Copy link
Author

jerrykal commented Apr 5, 2017

@Alhadis tree-view-autoresize is a package that while auto adjust the tree-view width when you expand folder, so my problem here is that after disable revealTreeView, the tree-view-autoresize package cannot auto adjust the tree-view width.

@jerrykal
Copy link
Author

jerrykal commented Apr 5, 2017

@Alhadis If you still don't understand what I'm saying here's a gif to reproduce the 🐛:

2017-04-05 18_19_10

@Alhadis
Copy link
Member

Alhadis commented Apr 5, 2017

I'm not asking you to disable tree-view-autoresize permanently. Just disable it once, and restart Atom. I want to be 100% sure there's nothing else that's causing problems here.

Once confirmed, you can re-enable the package again. Then I'll work on a fix.

@jerrykal
Copy link
Author

jerrykal commented Apr 5, 2017

@Alhadis I've found the problem 😄
The problem here is that the tree-view-autoresize will not start running after restart atom, because after I disable and enable the package, the tree-view will start autoresize again.

2017-04-05 18_31_41

@Alhadis
Copy link
Member

Alhadis commented Apr 5, 2017

I'm sorry, I'm still confused... :( I feel there's a language barrier here.

Anyway, I'll just assume you don't have any other packages installed which are causing complications. I see the error in my console, so I'll work on fixing that, I guess.

@Alhadis Alhadis reopened this Apr 5, 2017
@Alhadis Alhadis changed the title [Bug] Tree view auto expand after restart atom. Conflict with tree-view-autoresize package Apr 5, 2017
@Alhadis Alhadis self-assigned this Apr 5, 2017
@Alhadis Alhadis added the bug Confirmed defect in package logic, deprecation notices, and PRs which fix them. label Apr 5, 2017
@jerrykal
Copy link
Author

jerrykal commented Apr 5, 2017

@Alhadis Sorry, my english is terrible.

Okay, I will try to explain this issue as well as I can.
Here's how the tree-view-autoresize work before I run atom.config.set("file-icons.revealTreeView", false);

2017-04-05 18_56_10

and my problem is after I run atom.config.set("file-icons.revealTreeView", false); and restart Atom, the tree-view-autoresize not working anymore, until I re-enable the tree-view-autoresize package.

2017-04-05 18_59_44

@Alhadis
Copy link
Member

Alhadis commented Apr 5, 2017

@ooJerryLeeoo Don't worry. =) I understand that English isn't your first language, so you don't have to apologise.

I'm having troubles reproducing this, even when following your steps.

Could you please do the following for me?

  1. Copy+paste the contents of ~/.atom/config.cson. I need to see what your exact settings are.
  2. Run the following command in your Terminal: apm ls -i. Copy+paste its output - this shows us what packages and themes are installed and active.

@jerrykal
Copy link
Author

jerrykal commented Apr 5, 2017

@Alhadis Okay, here's my config repository.

@Alhadis
Copy link
Member

Alhadis commented Apr 5, 2017

谢谢!That's perfect, thank you. =)

@jerrykal
Copy link
Author

jerrykal commented Apr 5, 2017

@Alhadis By the way, that's simplified chinese, I'm using traditional chinese 😄 謝謝!

@Alhadis
Copy link
Member

Alhadis commented Apr 5, 2017

Oh whoops, I noticed you're from Taiwan. Haha, sorry... I must've confused you with another recent reporter who's from Beijing.

By the way, does this error still happen when you start Atom in dev-mode?

@jerrykal
Copy link
Author

jerrykal commented Apr 5, 2017

@Alhadis Yes, it still happen when dev-mode.

And I've found another new problem: I cannot scroll past end after run atom.config.set("file-icons.revealTreeView", false);

@Alhadis
Copy link
Member

Alhadis commented Apr 5, 2017

Are errors being emitted to your dev-console?

Also, does the error happen when you deactivate EVERY package EXCEPT for file-icons and tree-view-autoresize? I noticed there's quite a few things installed... sometimes one package does something that causes another package to behave badly. So it might be the fault of some third package...

@jerrykal
Copy link
Author

jerrykal commented Apr 5, 2017

@Alhadis I get this console message ~/.atom/packages/file-icons/lib/consumers/tree-view.js:38 Uncaught (in promise) TypeError: Cannot read property '0' of null(…)

and, It still happened when I disable all package except file-icons and tree-view-autoresize...

@Alhadis
Copy link
Member

Alhadis commented Apr 5, 2017

I was writing a reply when a wolf spider decided to crawl across my keyboard... and after catching it and releasing it outside, I returned to find my message gone. :\ Guess the spider snuck in to eat what I was typing.

Anyway, it was something along the lines of asking you to check if this is what you see when you enter _FileIcons.treeView in the dev-console, but it doesn't matter. I managed to get the full stack trace:

Uncaught (in promise) TypeError: Cannot read property '0' of null(…) @ tree-view.js:38
    activate                                                         @ tree-view.js:38
    updateStatus                                                     @ consumer.js:206
    disposables.add.atom.packages.onDidActivatePackage               @ consumer.js:84
    module.exports.Emitter.simpleDispatch                            @ emitter.js:25
    module.exports.Emitter.emit                                      @ emitter.js:129
    (anonymous function)                                             @ package-manager.coffee:469

... and with a little editing, I noticed treeView really is null when it shouldn't be null...
Figure 2

So far, zero luck! I'm probably going to kludge this one, and pray to God that @50Wliu accidentally slips, falls and presses the Merge button on atom/tree-view#1009. 😁

@jerrykal
Copy link
Author

jerrykal commented Apr 5, 2017

@Alhadis Here's what I get when I run _FileIcons.treeView in the dev console:

screen shot 2017-04-06 at 00 40 26

@Alhadis
Copy link
Member

Alhadis commented Apr 5, 2017

Wait, you're using Atom Beta? Okay, this changes everything.

When filing a bug report, please make sure to include all possible version information. Maintainers prefer to have too much information instead of not enough.

I'll have to recheck everything using Beta... sigh :(

EDIT: Copy+pasting Atom Beta's stack trace for my own future reference:

TypeError: Cannot read property '0' of null
	at TreeView.activate (~/Labs/file-icons/lib/consumers/tree-view.js:38:33)
	at TreeView.updateStatus (~/Labs/file-icons/lib/consumers/consumer.js:206:9)
	at disposables.add.atom.packages.onDidActivatePackage (~/Labs/file-icons/lib/consumers/consumer.js:84:50)
	at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
	at Emitter.module.exports.Emitter.emit (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
	at /Applications/Atom Beta.app/Contents/Resources/app.asar/src/package-manager.js:555:29
	at process._tickCallback (internal/process/next_tick.js:103:7)

@Alhadis
Copy link
Member

Alhadis commented Apr 5, 2017

@ooJerryLeeoo I've pushed a fix for this, but I need you to tell me it really works.

Could you please clone the latest changes to file-icons locally? Run this in your terminal:

cd ~/.atom/dev/packages
git clone https://github.com/file-icons/atom.git file-icons && cd file-icons
apm install .

Then restart Atom in dev mode and tell me if the error vanishes.

@jerrykal
Copy link
Author

jerrykal commented Apr 6, 2017

@Alhadis It fixed 🎉 very thanks 👊

@Alhadis
Copy link
Member

Alhadis commented Apr 6, 2017

Thank fuck for that. 😀 Thank you so much for your patience and help with all of this.

@Alhadis Alhadis closed this as completed Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed defect in package logic, deprecation notices, and PRs which fix them.
Projects
None yet
Development

No branches or pull requests

2 participants