Closed Bug 1319053 Opened 9 years ago Closed 9 years ago

Upload of folder with non-ASCII files fails with error NS_ERROR_FILE_NOT_FOUND

Categories

(Core :: DOM: Core & HTML, defect, P2)

50 Branch
x86_64
Windows 10
defect

Tracking

()

RESOLVED DUPLICATE of bug 1323935

People

(Reporter: santiago.garcia, Assigned: baku)

References

()

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0 Build ID: 20161104212021 Steps to reproduce: I tried to upload a folder containing a file with a non-ASCII filename (äöüß.html, the actual file was empty). Actual results: Nothing is uploaded. The console logs an NS_ERROR_FILE_NOT_FOUND error. If I break on exceptions in the Firefox DevTools, I can see that the filename has been mangled to "äöüß.html". I can upload the file by itself just fine, it is only when I upload a folder containing the file that the error occurs. Expected results: File should be uploaded without a problem
I have a self-contained example I used for another bug report (https://bugzilla.mozilla.org/show_bug.cgi?id=1303999) that can also be used to reproduce this bug. 1. Clone the repo at https://github.com/sgarcialaguna-mms/FirefoxUploadCrash 2. Install Python 2.7 3. Run python webserver.py 4. Open the browser console with F12 5. Create an empty file named äöüß.html 6. Drop the folder containing the file into the dropzone => An NS_ERROR_FILE_NOT_FOUND exception is logged, no files are uploaded. Note that I use https://github.com/blueimp/jQuery-File-Upload to handle file uploads, I haven't yet checked if the error occurs without using any libraries. A colleague using Ubuntu 14.04 reports that the bug does not occur on her machine
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=974cfc 29c1e30561d40882c051f07724eff99491&tochange=5785e6e80c6696b6e941edcbc06583864d95 ae95 The issue appears after webkitdirectory enabled in bug 1288683. I think there is an issue with this simple testcase too: https://codepen.io/anon/pen/yVMKPp I you upload a folder with the file äöüß.html, it's bad displayed: http://i.imgur.com/NfDfqPl.png Andrea, as Olli is on vacation during this week, could you check this issue, please.
Blocks: 1288683
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM
Ever confirmed: true
Flags: needinfo?(amarchesini)
Product: Firefox → Core
I cannot reproduce it. I suspect it's a charset issue. Can you reproduce this error if you force UTF-8 in the test?
Flags: needinfo?(amarchesini) → needinfo?(epinal99-bugzilla2)
testupload.html (with the file dropzone) has already <meta charset="UTF-8">.
Flags: needinfo?(epinal99-bugzilla2)
Like I said, it fails on Windows, but works on Ubuntu, so maybe it depends on the filesystem's encoding?
On NTFS partitions, filenames are encoded in Unicode: https://msdn.microsoft.com/en-us/library/windows/desktop/dd317748(v=vs.85).aspx
Yeah, you're right. Still, I asked a colleague using Mac and he can't reproduce the issue either, so the OS definitely is playing some role here.
Santiago, you are right. On linux the encoding of the file names, when written on disk, is taken from LC_ALL and/or LANG environment (plus Gtk/Glib always uses UTF-8).
baku, can you take a look?
Flags: needinfo?(amarchesini)
Priority: -- → P2
(I mean more than take a look; I mean take this :)
> Nothing is uploaded. The console logs an NS_ERROR_FILE_NOT_FOUND error. Can you tell me exactly what throws this error? I don't have winNT. Loic, do you see this error message as well? Can you maybe answer this question too. Thanks! Which version of windows do I need to use to reproduce this bug?
Flags: needinfo?(santiago.garcia)
Flags: needinfo?(epinal99-bugzilla2)
Flags: needinfo?(amarchesini)
Assignee: nobody → amarchesini
> Can you tell me exactly what throws this error? I don't have winNT. That happens inside the jquery fileupload library when trying to access file.size. I get the same error with the Codepen Loic linked when accessing the size property of the äöüß.html file. The file name is already mangled at that point, so that just looks like a follow-up error. (of course it cannot find äöüß.html) Update codepen to access the size property: https://codepen.io/anon/pen/MbmBGE > Which version of windows do I need to use to reproduce this bug? I have Windows 10 x64 myself, I know the problem also occurs on Windows 7 x64 at the very least.
(In reply to Andrea Marchesini [:baku] from comment #11) > > Nothing is uploaded. The console logs an NS_ERROR_FILE_NOT_FOUND error. > > Can you tell me exactly what throws this error? I don't have winNT. > Loic, do you see this error message as well? Can you maybe answer this > question too. Thanks! > > Which version of windows do I need to use to reproduce this bug? The testcase provided by the reporter throws this error, it's in some JS libs. I joined a log of the error with the dependencies to the JS libs. But you can test with the codepen too, in Windows VM eg.
Flags: needinfo?(epinal99-bugzilla2)
Flags: needinfo?(santiago.garcia)
Summary: Upload of folder with non-ASCII files fails → Upload of folder with non-ASCII files fails with error NS_ERROR_FILE_NOT_FOUND
What is the status on this issue? Is anyone actively working with this? I am experiencing the same problems in windows 7 and 10. I have no problems in my Linux Mint environment. This is quite a problem, since all of my clients run Firefox in windows.
This is a bad problem. baku, do you have time to look at this or find someone who does work on Windows?
Flags: needinfo?(amarchesini)
Flags: needinfo?(amarchesini) → needinfo?(sshih)
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(sshih)
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: