www.linkedin.com - PDF file upload fails when creating a new post
Categories
(Core :: DOM: Core & HTML, defect, P1)
Tracking
()
People
(Reporter: bfarkas, Assigned: emilio)
References
()
Details
(Keywords: webcompat:platform-bug, webcompat:site-report, Whiteboard: [webcompat-source:web-bugs][webcompat:sightline][webcompat:core])
User Story
user-impact-score:2400 platform:windows,mac,linux,android impact:workflow-broken configuration:general affects:all branch:release diagnosis-team:dom
Attachments
(2 files, 2 obsolete files)
Environment:
Operating system: Mac OS X 10.15 / Windows 10
Firefox version: Firefox 148.0 / Firefox Nightly 150a1 (2026-03-11)
Preconditions:
Valid user credentials
Steps to reproduce:
- Access: https://www.linkedin.com/
- Log in to reach the Homepage
- Click on "Start a post"
- Select "Add a document" icon
- Click on "Choose file" and select any PDF file
- Observe the page
Expected Behavior:
The PDF file is not uploaded
Actual Behavior:
The PDF file is uploaded accordingly and can be previewed in order to proceed further with the post
Notes:
- Reproduces regardless of the status of ETP
- Reproduces in firefox-nightly, and firefox-release
- Does not reproduce in chrome
Created from https://github.com/webcompat/web-bugs/issues/211734
| Reporter | ||
Updated•3 months ago
|
| Reporter | ||
Comment 1•3 months ago
|
||
Comment 2•3 months ago
|
||
Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.
Updated•3 months ago
|
Updated•3 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Comment 3•2 months ago
•
|
||
It's about the realm of event.target.files[0]. The input element is inside the main page, but created from an iframe, so e.target instanceof Element is true inside iframe. But as we transplant the element to the parent page, we also change the prototype of the element (see bug 1470017).
We call the event listener within the iframe realm. The problem is that Chrome makes the realm of event.target and event.target.files[0] be same (using the realm of the iframe page) but on Firefox we use the realm of the main page. So instanceof check in the iframe fails against instanceof File.
| Assignee | ||
Comment 4•2 months ago
|
||
Should probably be in bug 1470017.
| Assignee | ||
Comment 5•2 months ago
|
||
Updated•2 months ago
|
Comment 6•2 months ago
|
||
Comment on attachment 9553656 [details]
WIP: Bug 2022763 - Don't reparent prototype chains.
Revision D288165 was moved to bug 1470017. Setting attachment 9553656 [details] to obsolete.
Updated•2 months ago
|
| Assignee | ||
Comment 7•2 months ago
|
||
After the previous commit it doesn't need a browsing context argument.
Comment 8•2 months ago
|
||
It doesn't build:
18:43.43 W In file included from D:/firefox-2/widget/windows/nsFilePicker.cpp:6:
18:43.44 E D:/firefox-2/widget/windows\nsFilePicker.h(72,14): error: 'Init' marked 'override' but does not override any member functions
18:43.44 E 72 | NS_IMETHOD Init(mozilla::dom::BrowsingContext* aBrowsingContext,
18:43.44 E | ^
18:43.45 W D:/firefox-2/widget/windows\nsFilePicker.h(72,14): warning: 'nsFilePicker::Init' hides overloaded virtual function [-Woverloaded-virtual]
18:43.45 W D:/firefox-2/widget\nsBaseFilePicker.h(28,14): note: hidden overloaded virtual function 'nsBaseFilePicker::Init' declared here: different number of parameters (4 vs 3)
18:43.46 W 28 | NS_IMETHOD Init(mozilla::dom::BrowsingContext* aBrowsingContext,
18:43.46 W | ^
18:44.57 js/xpconnect/shell
18:46.38 E D:/firefox-2/xpcom/components\../../widget/windows/nsFilePicker.h(72,14): error: 'Init' marked 'override' but does not override any member functions
18:46.38 E 72 | NS_IMETHOD Init(mozilla::dom::BrowsingContext* aBrowsingContext,
18:46.39 E | ^
18:46.39 W D:/firefox-2/xpcom/components\../../widget/windows/nsFilePicker.h(72,14): warning: 'nsFilePicker::Init' hides overloaded virtual function [-Woverloaded-virtual]
18:46.39 W D:/firefox-2/xpcom/components\../../widget\nsBaseFilePicker.h(28,14): note: hidden overloaded virtual function 'nsBaseFilePicker::Init' declared here: different number of parameters (4 vs 3)
18:46.39 W 28 | NS_IMETHOD Init(mozilla::dom::BrowsingContext* aBrowsingContext,
18:46.39 W | ^
18:50.95 W In file included from D:/firefox-2/widget/windows/nsWidgetFactory.cpp:23:
18:50.95 E D:/firefox-2/widget/windows\nsFilePicker.h(72,14): error: 'Init' marked 'override' but does not override any member functions
18:50.95 E 72 | NS_IMETHOD Init(mozilla::dom::BrowsingContext* aBrowsingContext,
18:50.95 E | ^
18:50.95 W D:/firefox-2/widget/windows\nsFilePicker.h(72,14): warning: 'nsFilePicker::Init' hides overloaded virtual function [-Woverloaded-virtual]
18:50.95 W D:/firefox-2/widget\nsBaseFilePicker.h(28,14): note: hidden overloaded virtual function 'nsBaseFilePicker::Init' declared here: different number of parameters (4 vs 3)
18:50.96 W 28 | NS_IMETHOD Init(mozilla::dom::BrowsingContext* aBrowsingContext,
18:50.96 W | ^
18:50.96 W 1 warning and 1 error generated.
18:51.14 E mozmake[4]: *** [D:/firefox-2/config/rules.mk:668: StaticComponents.obj] Error 1
18:51.16 E mozmake[3]: *** [D:/firefox-2/config/recurse.mk:72: xpcom/components/target-objects] Error 2
18:51.17 E mozmake[3]: *** Waiting for unfinished jobs....
18:53.40 E D:/firefox-2/widget/windows/nsFilePicker.cpp(114,64): error: too few arguments to function call, expected 4, have 3
18:53.40 E 114 | return nsBaseFilePicker::Init(aBrowsingContext, aTitle, aMode);
18:53.40 E | ~~~~~~~~~~~~~~~~~~~~~~ ^
18:53.40 E D:/firefox-2/widget\nsBaseFilePicker.h(28,14): note: 'Init' declared here
18:53.40 E 28 | NS_IMETHOD Init(mozilla::dom::BrowsingContext* aBrowsingContext,
18:53.40 E | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18:53.40 E 29 | const nsAString& aTitle, nsIFilePicker::Mode aMode,
18:53.41 E | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18:53.41 E 30 | nsISupports* aGlobal) override;
18:53.41 E | ~~~~~~~~~~~~~~~~~~~~
18:54.78 E 1 warning and 1 error generated.
18:54.85 E mozmake[4]: *** [D:/firefox-2/config/rules.mk:666: nsWidgetFactory.obj] Error 1
18:54.85 E mozmake[4]: *** Waiting for unfinished jobs....
18:56.08 E 1 warning and 2 errors generated.
18:56.17 E mozmake[4]: *** [D:/firefox-2/config/rules.mk:666: nsFilePicker.obj] Error 1
19:45.54 E mozmake[3]: *** [D:/firefox-2/config/recurse.mk:72: widget/windows/target-objects] Error 2
19:45.54 E mozmake[2]: *** [D:/firefox-2/config/recurse.mk:34: compile] Error 2
19:45.55 E mozmake[1]: *** [D:/firefox-2/config/rules.mk:357: default] Error 2
19:45.56 E mozmake: *** [client.mk:58: build] Error 2
19:45.67 W 1 compiler warnings present.
| Assignee | ||
Comment 9•2 months ago
|
||
Oh, of course, windows overrides Init() ;)
Comment 11•2 months ago
|
||
I can confirm it works
Comment 12•1 month ago
|
||
Comment 13•1 month ago
|
||
Comment 14•1 month ago
|
||
Comment 15•1 month ago
•
|
||
Backed out for causing multiple failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/2eee2bdcb278
Failure log:
https://treeherder.mozilla.org/logviewer?job_id=560756027&repo=autoland&task=Um3UsQscTNitQZofO_r8UQ.0&lineNumber=10594
https://treeherder.mozilla.org/logviewer?job_id=560779176&repo=autoland&task=KxB0-YCMQTi4ytIGVrLHDA.0&lineNumber=15930
https://treeherder.mozilla.org/logviewer?job_id=560770868&repo=autoland&task=K1GE0GOvSI25NRVM4YE8Dg.0&lineNumber=2509
https://treeherder.mozilla.org/logviewer?job_id=560786356&repo=autoland&task=QVLnb8qTQhC7_4DjbLaT5w.0&lineNumber=2857
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
Comment 16•1 month ago
|
||
Comment 17•1 month ago
|
||
Comment 18•1 month ago
|
||
Backed out for causing bc failures at browser_screenshots_test_downloads.js
Backout link
Failure log(s)
Comment 19•1 month ago
|
||
| bugherder | ||
Comment 20•1 month ago
|
||
Comment 19 was actually backed out in comment 18. It's a bugherder bug.
Comment 21•1 month ago
|
||
| bugherder | ||
Updated•1 month ago
|
| Assignee | ||
Comment 22•1 month ago
|
||
Gah, thanks, must've missed that because it was already filed as an intermittent (bug 1970555).
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
Comment 23•1 month ago
|
||
Updated•1 month ago
|
Comment 24•1 month ago
|
||
| bugherder | ||
Comment 25•1 month ago
|
||
Comment on attachment 9554711 [details]
Bug 2022763 - Clean up existing usages of MockFilePicker.init(). r=#dom-core
Revision D288559 was moved to bug 2033405. Setting attachment 9554711 [details] to obsolete.
Updated•1 month ago
|
Updated•1 month ago
|
| Reporter | ||
Comment 26•28 days ago
|
||
Verified, the issue no longer reproduces. The PDF file can be uploaded accordingly and can be previewed correctly in order to proceed further with the post.
Tested with:
- Browser / Version: Firefox 151.0-candidate build 1
- Operating System: Windows 10
| Reporter | ||
Updated•28 days ago
|
Description
•