brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] WebDAV empty folders cause inability to create new files #4297

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by axxidental Saturday Aug 03, 2013 at 03:45 GMT Originally opened as https://github.com/adobe/brackets/issues/4649


Using a WebDAV network drive, if you select an empty folder in the tree, it gives the error message:

image

After dismissing the message, if you right click in the tree and try to create new file or new folder anywhere in the tree, nothing happens.

A refresh of the tree (right click->refresh from within the tree) does not resolve it, but refreshing the application (F5) does, so long as you don't click an empty folder.

As a note, this behavior does not occur using local disks. The webdav is mapped/mounted as a local disk via NetDrive.

core-ai-bot commented 3 years ago

Comment by RaymondLim Sunday Aug 04, 2013 at 05:23 GMT


@axxidental It seems like you don't have read access to that specific folder. Have you tried to open that folder in Windows Explorer?

core-ai-bot commented 3 years ago

Comment by axxidental Sunday Aug 04, 2013 at 05:30 GMT


Yep, all works well in Windows Explorer, and if I create a file in that folder in Windows Explorer, after the refresh, selecting the folder does not produce the error.

Seems strange that it should act this way. I'll try it from another computer on Monday and see if it has the same results on a different machine.

On Sat, Aug 3, 2013 at 11:23 PM, Raymond Lim notifications@github.comwrote:

@axxidental https://github.com/axxidental It seems like you don't have read access to that specific folder. Have you tried to open that folder in Windows Explorer?

— Reply to this email directly or view it on GitHubhttps://github.com/adobe/brackets/issues/4649#issuecomment-22067068 .

core-ai-bot commented 3 years ago

Comment by RaymondLim Tuesday Aug 06, 2013 at 05:44 GMT


@axxidental Can you reproduce the issue on another machine? Do you remember how (and when) you created the problematic folder?

core-ai-bot commented 3 years ago

Comment by axxidental Tuesday Aug 06, 2013 at 14:42 GMT


I was overly busy yesterday, I'll try it now give me an hour to set up the webdav on this machine.

On Mon, Aug 5, 2013 at 11:45 PM, Raymond Lim notifications@github.comwrote:

@axxidental https://github.com/axxidental Can you reproduce the issue on another machine? Do you remember how (and when) you created the problematic folder?

— Reply to this email directly or view it on GitHubhttps://github.com/adobe/brackets/issues/4649#issuecomment-22159604 .

core-ai-bot commented 3 years ago

Comment by axxidental Tuesday Aug 06, 2013 at 15:59 GMT


Happens on both of my other computers here, in both Sprints 27 and 28.

Steps to reproduce:

  1. Connect to a WebDAV drive, map to a drive letter (used N:\, P:\, and Y:)
  2. Launch Brackets and do file->open folder, locating a folder on the drive.
  3. Select any empty folder within that folder in the tree and receive the error message. (any empty folder, even a brand new created one)
  4. Attempt to right click->new file in the tree and nothing happens (no error message, nothing at all)
  5. Right click->refresh and ability to create new files returns
  6. Clicking empty folder again would recreate the problem again, requiring another refresh.

Each PCs is quite different too, one is a custom built box running Windows 8 Ultimate, one is an HP laptop running Win7 Enterprise, the last is an older HP desktop running Windows XP.

Hope this helps, let me know if I can provide any other information.

On Tue, Aug 6, 2013 at 8:42 AM, Chris Riedel cdriedel@gmail.com wrote:

I was overly busy yesterday, I'll try it now give me an hour to set up the webdav on this machine.

On Mon, Aug 5, 2013 at 11:45 PM, Raymond Lim notifications@github.comwrote:

@axxidental https://github.com/axxidental Can you reproduce the issue on another machine? Do you remember how (and when) you created the problematic folder?

— Reply to this email directly or view it on GitHubhttps://github.com/adobe/brackets/issues/4649#issuecomment-22159604 .

core-ai-bot commented 3 years ago

Comment by RaymondLim Tuesday Aug 06, 2013 at 16:40 GMT


@axxidental Thanks for your testing and providing more info. One question to clarify that I understand your steps correctly. Are you done with "Open Folder" dialog after step 2 or after step 3? In other words, your selection of an empty folder in step 3 is in the "Open Folder" dialog or do you mean clicking on an empty folder in the side bar?

Also, can you try with sprint 26 build and see you can reproduce with it?

core-ai-bot commented 3 years ago

Comment by axxidental Tuesday Aug 06, 2013 at 17:32 GMT


Sorry, that was vague. I am done with open folder dialog after step 2, the error occurs upon selecting an empty folder in the brackets tree, not the open folder dialog.

Same problem in Sprint 26.

To make it more interesting, if you select an empty folder in the open folder dialog, the error happens upon selecting folder, and then the tree shows only the dropdownlist and a "Loading..." label below it.

On Tue, Aug 6, 2013 at 10:41 AM, Raymond Lim notifications@github.comwrote:

@axxidental https://github.com/axxidental Thanks for your testing and providing more info. One question to clarify that I understand your steps correctly. Are you done with "Open Folder" dialog after step 2 or after step 3? In other words, your selection of an empty folder in step 3 is in the "Open Folder" dialog or do you mean clicking on an empty folder in the side bar?

Also, can you try with sprint 26 build and see you can reproduce with it?

— Reply to this email directly or view it on GitHubhttps://github.com/adobe/brackets/issues/4649#issuecomment-22192817 .

core-ai-bot commented 3 years ago

Comment by peterflynn Tuesday Aug 06, 2013 at 22:45 GMT


It seems like there's a generic issue here with the tree code not being very robust to file IO errors, also. If there's an error lazy-loading a subfolder of a larger project (as seems to be the case here), the tree shouldn't get into a borked state where subsequent operations silently fail with no feedback...

core-ai-bot commented 3 years ago

Comment by RaymondLim Wednesday Aug 21, 2013 at 21:13 GMT


@axxidental I think I have a fix for you, but since I can't reproduce with our network drive I need you to get my version of Brackets.exe to test with your WebDAV drive. You can get my private version from https://dl.dropboxusercontent.com/u/101232385/4649/Brackets.exe Since my version is based on the new CEF used in sprint 30, you may also need to get a sprint 30 first and then replace the .exe with mine. There is a sprint 30 build posted here.

core-ai-bot commented 3 years ago

Comment by axxidental Thursday Aug 22, 2013 at 14:56 GMT


The bug that was preventing new files from being created without a refresh seems to be fixed, however, it still throws an error if you select an empty folder when using "open folder" or when selecting an empty folder in the tree.

If you select an empty folder from the "open folder" dialog, after dismissing the error, the tree displays "Loading..." until a refresh is performed on the tree, despite the fact that it has in fact loaded the folder (you can create new files/folders while it still says "Loading..."). If the folder is still empty when doing the refresh, it will throw the error again, and continue to display "Loading...". If you create a new folder, it will also throw the error, because it will select the folder after it is created.

Not sure why the behavior only occurs on empty folders on a WebDAV drive, even when mapped to a drive letter. The error clearly states that the errors was from reading the CONTENTS of the directory and not the directory itself, but empty directories are perfectly valid, obviously. Could it have something to do with file system differences? The WebDAV drive is on a Red Hat (4.4.6-4) server, and I am using the Windows brackets client.

A 'df -T' on the Linux box is showing fakeroot and fakefs for file systems, which I am unfamiliar with. The Windows boxes are all NTFS.

I will try to provide more info if needed, just let me know!

On Wed, Aug 21, 2013 at 3:14 PM, Raymond Lim notifications@github.comwrote:

@axxidental https://github.com/axxidental I think I have a fix for you, but since I can't reproduce with our network drive I need you to get my version of Brackets.exe to test with your WebDAV drive. You can get my private version from https://dl.dropboxusercontent.com/u/101232385/4649/Brackets.exe Since my version is based on the new CEF used in sprint 30, you may also need to get a sprint 30 first and then replace the .exe with mine. There is a sprint 30 build posted herehttps://github.com/adobe/brackets/releases/tag/0.30.0-8785 .

— Reply to this email directly or view it on GitHubhttps://github.com/adobe/brackets/issues/4649#issuecomment-23050819 .

core-ai-bot commented 3 years ago

Comment by axxidental Thursday Aug 22, 2013 at 15:14 GMT


brackets1 brackets2 brackets3

core-ai-bot commented 3 years ago

Comment by RaymondLim Sunday Feb 09, 2014 at 22:50 GMT


@axxidental We have a big change in Brackets file system. Can you check with sprint 36 build and let us know whether you are still having any issue?

core-ai-bot commented 3 years ago

Comment by axxidental Monday Feb 10, 2014 at 15:13 GMT


Hate to say it, but its actually worse. It's giving the error now for many folders, regardless of whether or not they are empty. It is the same with both secure and unsecured protocols (HTTP/HTTPS)

core-ai-bot commented 3 years ago

Comment by RaymondLim Monday Feb 10, 2014 at 18:28 GMT


@axxidental Sorry to hear that it's getting worse. Not sure we will be able to fix it on our end since we don't have a similar network to test with.

@jasonsanjose and@iwehrman This is similar to #6029. Do you have any suggestion of how to fix this in the new file system?

core-ai-bot commented 3 years ago

Comment by iwehrman Monday Feb 10, 2014 at 18:32 GMT


I am skeptical that it is related to #6029. This is on Windows, right? Are there any errors or message in the console?

core-ai-bot commented 3 years ago

Comment by axxidental Monday Feb 10, 2014 at 18:34 GMT


Nope, nothing in the console.

core-ai-bot commented 3 years ago

Comment by iwehrman Monday Feb 10, 2014 at 18:52 GMT


I wonder if we can narrow down the problem within the filesystem. What happens if you enter the following in the console?

  1. FS = require("filesystem/FileSystem")
  2. d = FS.getDirectoryForPath("N:/your/empty/webdav/folder")
  3. d.stat(console.log.bind(console))
  4. d.getContents(console.log.bind(console))
core-ai-bot commented 3 years ago

Comment by axxidental Monday Feb 10, 2014 at 18:59 GMT


brackets

core-ai-bot commented 3 years ago

Comment by iwehrman Monday Feb 10, 2014 at 19:14 GMT


Great! This is really helpful. My guess is that this bug lies somewhere within the native shell that performs the actual I/O. If you have a chance, could you do one more follow-up test in the console to help confirm this?

  1. appshell.fs.stat("N:/your/empty/webdav/folder", console.log.bind(console))
  2. appshell.fs.readdir("N:/your/empty/webdav/folder", console.log.bind(console))

@RaymondLim or@JeffryBooher or@bchintx: it seems like there is now enough info here to try to reproduce and track down this issue with empty WebDAV-mounted directories on Windows. In particular, I think we've ruled out any relationship to #6029, which is about path normalization.

core-ai-bot commented 3 years ago

Comment by axxidental Monday Feb 10, 2014 at 20:05 GMT


Glad I can help. Here is the next set. Let me know if you need any more!

brackets2

core-ai-bot commented 3 years ago

Comment by RaymondLim Monday Feb 10, 2014 at 22:28 GMT


@axxidental Thanks for your help with@iwehrman's instructions. I think I know the real cause in the native code readdir function. It seems that we should be calling FindFirstFile with native paths (ie. using \\ path separator instead of unix file path separator /) in order to read network drive correctly.

core-ai-bot commented 3 years ago

Comment by axxidental Tuesday Feb 11, 2014 at 14:40 GMT


@RaymondLim That is great news! If you want me to test an executable again, just let me know!

core-ai-bot commented 3 years ago

Comment by JeffryBooher Wednesday Feb 12, 2014 at 20:22 GMT


@axxidental we've fixed this issue which is available to build from master now or test in the next release of Brackets. Thanks for finding!