Closed Bug 1753819 Opened 3 years ago Closed 3 years ago

Attachments not opening properly TB 97.0b2 on Windows: Open an attachment prompt to Save the file instead of opening it or prompting to choose action

Categories

(MailNews Core :: Attachments, defect)

Thunderbird 97
defect

Tracking

(thunderbird_esr91 unaffected)

RESOLVED FIXED
100 Branch
Tracking Status
thunderbird_esr91 --- unaffected

People

(Reporter: richard.leger, Assigned: darktrojan)

References

Details

Attachments

(2 files)

+++ This bug was initially created as a clone of Bug #1751441 +++ following request in Bug 1751441 Comment 6.

Steps to reproduce:

In TB 97.0b2 > Mail > Message Preview Pane > Msg with attachment... double clicking an attachment (or right click > Open)

Actual results:

File is not opening and end-user not prompted to choose action.

Instead a prompt windows appears to choose a location to Save the file, the windows has no title and the attachment name is missing in the File Name field.

Expected results:

File is opening or at least prompted to choose action Open With or Save File as seen in previous version of TB like 91.5.1 (64-bit).

Side Note:

When pressing Save button in attachment panel, a prompt windows appears to choose a location to save the file, the windows has Save Attachment title and the attachment name is present in the File Name field.

It seems indeed that somehow the default action for attachment was changed to "Save File" within the TB general settings for all attachments type!

See more details in Bug 1751441 Comment 1 and and its attachment (https://bugzilla.mozilla.org/attachment.cgi?id=9260417&action=edit)

The current faulty behaviour seems to be linked to the default action setting Always Ask for file type being changed to Save File. It seems to have happened during the upgrade process somehow.

Indeed, if I change the action back to Always Ask, a Double Click or Right Click > Open on attachment prompt me to choose the action like before.

So both of those event trigger the default action set for the file type as per the settings but if I change the default action back to Save File, then this bug is triggered again.

So two issues here:

  • The Save File default action buggy when triggered via Double Click or Right Click > Open on an attachment

  • The fact that end-users settings were changed during an upgrade against user choices

Component: Untriaged → Attachments
Product: Thunderbird → MailNews Core
See Also: → 1747360

Thunderbird 91.6.0

I have a problem with . DWG attachments. I cannot open when i click on it - i can only save them on disk and then I have open it.

(In reply to marcin from comment #3)

Thunderbird 91.6.0

I have a problem with . DWG attachments. I cannot open when i click on it - i can only save them on disk and then I have open it.

The .dwg attachmemt issue seems to have been fixed in a separate bug that patch has yet to land in stable version of TB see details in Bug 1747360 Comment 23.

No longer depends on: 1751441

I'm fairly sure that bug 1736924 caused this. It doesn't really apply to Thunderbird and we need to figure out a good way to stop it happening before it reaches release. You'll notice that in handlers.json (in your profile folder), the file types have "ask": false whereas they used to be "ask": true.

I think as a work-around you can remove existing handlers and Thunderbird will ask again next time you open an attachment of that type. Or just modify the handlers.json file and restart.

(In reply to Geoff Lankow (:darktrojan) from comment #6)

I'm fairly sure that bug 1736924 caused this. It doesn't really apply to Thunderbird and we need to figure out a good way to stop it happening before it reaches release. You'll notice that in handlers.json (in your profile folder), the file types have "ask": false whereas they used to be "ask": true.

I think as a work-around you can remove existing handlers and Thunderbird will ask again next time you open an attachment of that type. Or just modify the handlers.json file and restart.

FYI, issue still happening after upgrade to 98.0b3 (64-bit) for example if I double click on a .png image attachment or .docx file attached, the browse location windows still appears with title "title" and "File Name" field empty... so I still cannot open attachment directly from within TB.

My handlers.json shows:

"...
,"extensions":["3"]},"image/png":{"action":0,"handlers":[{"name":"PhotoViewer.dll","path":"C:\Program Files (x86)\Windows Photo Viewer\PhotoViewer.dll"}],"extensions":["png"]},
(...)
"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"action":0,"ask":false,"extensions":["docx"]},
..."

The "ask" attribute is simply missing for .png, set to false for office documents.

I can confirm that adding manually "ask":true, within the .png handler in the hanlders.json file following by a TB restart did fix the issue. When double clicking .png attachment, I am again prompted to choose open or save the file :-)

In my 91 ESR profile I see:

"...
,"image/png":{"action":4,"ask":true,"handlers":[{"name":"PhotoViewer.dll","path":"C:\Program Files (x86)\Windows Photo Viewer\PhotoViewer.dll"}],"extensions":["png"]},
(...)
,"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"action":4,"ask":true,"extensions":["docx"]},
..."

Though I would expect Thunderbird to:

  • fix the problem directly at next update without applying a manual workaround when it is encountered; I am happy to test anything if that can help deploy a fix
  • prevent this bug to land in ESR; because this is really critical and will be much bigger issue then especially for the reputation of TB if end-users massively encounter this bug :-) Let me know if there is anything I can do to help further to prevent it.
Flags: needinfo?(vseerror)
Flags: needinfo?(geoff)

Here is a rough comparison of changes observed between 98 Beta and 91 ESR handlers.json file...

(In reply to Richard Leger from comment #7)

Though I would expect Thunderbird to:

  • fix the problem directly at next update without applying a manual workaround when it is encountered; I am happy to test anything if that can help deploy a fix
  • prevent this bug to land in ESR; because this is really critical and will be much bigger issue then especially for the reputation of TB if end-users massively encounter this bug :-) Let me know if there is anything I can do to help further to prevent it.

I agree, but currently I haven't got time to look at it.

Assignee: nobody → geoff
Status: NEW → ASSIGNED
Flags: needinfo?(geoff)

The migration from "always ask" to "save to disk" is not wanted in Thunderbird.

Rather than flip the preference (which may have further side effects and will go away some day), I would rather just stop the migration code from running in Thunderbird.

Pushed by geoff@darktrojan.net: https://hg.mozilla.org/integration/autoland/rev/2de6d3521bdc Prevent download improvements migration in Thunderbird. r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch

For those like me affected by this bug before the fix was implemented (that only prevent the issue but does not fix it!) and that are looking for a quick one time fix for the issue itself, the simple solution it to:

  • Go to TB > Settings > General
  • Scroll down to Files & Attachments section
  • Type Save in the Filter content types and actions field to show only file type that are set with Save File option
  • For each file type listed, change the Save File option into Always Ask via the drop down menu

This would allow you to revert back manually the settings and be able to choose the action next time you try to Open related attachments...

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: