Closed Bug 1730361 Opened 4 years ago Closed 1 year ago

Unclear "Not implemented" error when using a file dialog to open word file stored on OneDrive which is open in word

Categories

(Core :: Widget: Win32, defect, P3)

Firefox 92
defect

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: miner.harry567, Assigned: rkraesig)

Details

Attachments

(7 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0

Steps to reproduce:

Works with many websites with file upload; for example: have a word document open in word desktop app, open Google Drive, import file, navigate to the open document, and click okay.

Actual results:

An error dialog box opens that says "Error: Not Implemented" with a blank description

Expected results:

In other browsers this says "Error: file open in another program. please close the file and try again." When I close the open word document the error does not occur

Hi,

I am not able to replicate the issue. I've tried on windows 10 pro, latest nightly build
Can you confirm I followed the steps to reproduce accurately on my video above?
I've assigned a component in order to get the dev team involved.

Thanks for the report.
Best regards, Clara.

Flags: needinfo?(miner.harry567)
Component: Untriaged → DOM: File
Product: Firefox → Core
Component: DOM: File → File Handling
Product: Core → Firefox

Interesting, it seems to only happen when trying to upload a file from a onedrive folder. (I keep basically everything in onedrive, so all my tests reproduced the error). When I upload an open file from an offline location, I see the behavior in the video; when I'm uploading an open file from a onedrive folder, it gives the 'not implemented' error.

Flags: needinfo?(miner.harry567)

What about now?
(feel free to submit your own video for me to try replicate the issue on my end)
Best,
Clara

Flags: needinfo?(miner.harry567)

Sorry, I think I was unclear. I've attached a recording of the problem - first, I show that a document stored locally works correctly, and then that a document from onedrive gives the 'not implemented' error.

Flags: needinfo?(miner.harry567)
Attached video drive.webm

Got it now!
I still cannot reproduce on my end.
1- Does this issue happen with a new profile? Here is a link on how to create a new profile: https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles
2- Are you using add-ons? (you can try the issue while in Safe Mode. You can find helpful info here : https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode .) Can you attach your about:support information?

Best,
Clara

Flags: needinfo?(miner.harry567)
Attached file about:support raw data

-happens with new profile
-happens in safe mode (my only add-on is an external password manager, just reads & fills passwords)
-support information attached

Flags: needinfo?(miner.harry567)

The severity field is not set for this bug.
:Gijs, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(gijskruitbosch+bugs)

Without being able to reproduce (I don't have a OneDrive, and just now Windows told me it couldn't log in to my MS account when I started the machine, so that's... fun.) it's hard to be 100% sure, but I expect that the error dialog is coming from Windows. We show a Windows filepicker (IFileDialog, with CLSID_FileOpenDialog). Perhaps the difference in message is because the other browsers handle OnShareViolation callbacks (cf this doc) and we don't? It's hard to tell, especially because the message shown by the other browsers (see comment 0) is also a standard Windows message, and a quick search in the Chromium codebase also does not show a meaningful OnShareViolation implementation (but maybe I missed it, I'm not that familiar with their code; or maybe it lives in the non-open-source bits...).

Anyway, this is an issue in our Windows widget layer implementation, so moving over there.

Component: File Handling → Widget: Win32
Flags: needinfo?(gijskruitbosch+bugs)
Product: Firefox → Core
Summary: "Not implemented" error when using a file dialog to open word file which is open in word → Unclear "Not implemented" error when using a file dialog to open word file stored on OneDrive which is open in word

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)
Severity: -- → S4
Flags: needinfo?(jmathies)
Priority: -- → P3

We ran into this issue today, at first I was not able to reproduce it (did not have an OneDrive sync setup), but I have found a reproduction path using a PowerShell script:

$filePath = "C:\path/to/file.ext"
$fileStream = [System.IO.File]::Open($filePath, 'Open', 'Read', 'None')
Write-Host "File $filePath is now locked. Press Enter to release the lock."
Read-Host
$fileStream.Close()

This script will lock the file until you manually unlock it. With this, you can consistently reproduce file locking and follow the steps from the original bug report.

As suggested in comment 12, the error is indeed coming from Windows... but it appears to still be our fault: https://searchfox.org/mozilla-central/rev/f09e3f9603a08b5b51bf504846091579bc2ff531/widget/windows/nsFilePicker.cpp#625

    fos |= FOS_SHAREAWARE | FOS_OVERWRITEPROMPT | FOS_FORCEFILESYSTEM;

We're providing the FOS_SHAREAWARE flag, but not supplying an IFileDialogEvents object. (Use of this flag seems to date back to the original Vista-era implementation of the IFileDialog-based file-picker in bug 661991.) Thus, when a sharing violation occurs, we don't handle it despite telling Windows that we'll handle it; and Windows then dutifully reports that we didn't implement the thing we said we would implement.

The obvious solution is, of course, to stop saying that. Patch incoming.


(In reply to Leon from comment #14)

This script will lock the file until you manually unlock it. With this, you can consistently reproduce file locking and follow the steps from the original bug report.

Thanks!

Assignee: nobody → rkraesig
Status: UNCONFIRMED → NEW
Ever confirmed: true

Remove the FOS_SHAREAWARE flag, which tells Windows that we'll be
providing it with an IFileDialogEvents object with .OnShareViolation()
implemented. (We do no such thing, nor ever have.)

Pushed by rkraesig@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9fcec695f4cb [1/1] remove unnecessary flag from IFileDialog r=win-reviewers,handyman
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: