[GH-ISSUE #1313] [Bug]: File uploads in Safari don’t always do work the first time #7431

Closed
opened 2026-04-10 17:15:39 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @mommyofavalor on GitHub (Jul 8, 2023).
Original GitHub issue: https://github.com/actualbudget/actual/issues/1313

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

A bug happened!

Screen Shot 2023-07-08 at 9 46 00 AM

Every time I try to import transactions there are issues. Sometimes it wants me to double click on the file, sometimes it wants me to click once and press "upload". Sometimes neither of those work and I have to just try multiple times. Then, whenever it finally goes through I get an error message like the one above.

I am hosting on pikapod

What error did you receive?

"possible error importing file"

Where are you hosting Actual?

Other

What browsers are you seeing the problem on?

Safari

Operating System

Mac OSX

Originally created by @mommyofavalor on GitHub (Jul 8, 2023). Original GitHub issue: https://github.com/actualbudget/actual/issues/1313 ### Verified issue does not already exist? - [X] I have searched and found no existing issue ### What happened? A bug happened! <img width="661" alt="Screen Shot 2023-07-08 at 9 46 00 AM" src="https://github.com/actualbudget/actual/assets/138994055/d61b9fe6-68ec-404a-aa24-d6ac383daa0d"> Every time I try to import transactions there are issues. Sometimes it wants me to double click on the file, sometimes it wants me to click once and press "upload". Sometimes neither of those work and I have to just try multiple times. Then, whenever it finally goes through I get an error message like the one above. I am hosting on pikapod ### What error did you receive? "possible error importing file" ### Where are you hosting Actual? Other ### What browsers are you seeing the problem on? Safari ### Operating System Mac OSX
GiteaMirror added the bug label 2026-04-10 17:15:39 -05:00
Author
Owner

@j-f1 commented on GitHub (Jul 8, 2023):

Thank you for reporting!

Sometimes it wants me to double click on the file, sometimes it wants me to click once and press "upload".

Both of these should work. The file picker is controlled entirely by the browser, so we don’t have any control over what happens here.

Sometimes neither of those work and I have to just try multiple times.

I’ve seen this happen sometimes too in Safari, but haven’t been able to trace down exactly why it happens.

Then, whenever it finally goes through I get an error message like the one above.

That error message comes from our new OFX parser, which we ultimately decided would be too complicated to update to work properly. The next release (v23.7.1 or v23.7.2), which will hopefully roll out to PikaPods soon, removes the new parser and falls back to our older, more reliable parser. You shouldn’t get those errors anymore after that update. In the meantime, you can ignore the message as it was just intended as a way for us to get feedback about files that broke our new parser (as it turned out, there were a lot!)

I’m going to retitle this issue to focus on the file upload issue since I think that’s the main thing we need to fix here.

<!-- gh-comment-id:1627378555 --> @j-f1 commented on GitHub (Jul 8, 2023): Thank you for reporting! > Sometimes it wants me to double click on the file, sometimes it wants me to click once and press "upload". Both of these should work. The file picker is controlled entirely by the browser, so we don’t have any control over what happens here. > Sometimes neither of those work and I have to just try multiple times. I’ve seen this happen sometimes too in Safari, but haven’t been able to trace down exactly why it happens. > Then, whenever it finally goes through I get an error message like the one above. That error message comes from our new OFX parser, which we ultimately decided would be too complicated to update to work properly. The next release (v23.7.1 or v23.7.2), which will hopefully roll out to PikaPods soon, removes the new parser and falls back to our older, more reliable parser. You shouldn’t get those errors anymore after that update. In the meantime, you can ignore the message as it was just intended as a way for us to get feedback about files that broke our new parser (as it turned out, there were a lot!) I’m going to retitle this issue to focus on the file upload issue since I think that’s the main thing we need to fix here.
Author
Owner

@mommyofavalor commented on GitHub (Jul 9, 2023):

Thank you for your quick reply, Jed. Makes sense and I appreciate all the
work that you are doing on Actual.

Maureen

On Sat, Jul 8, 2023 at 10:24 AM Jed Fox @.***> wrote:

Thank you for reporting!

Sometimes it wants me to double click on the file, sometimes it wants me
to click once and press "upload".

Both of these should work. The file picker is controlled entirely by the
browser, so we don’t have any control over what happens here.

Sometimes neither of those work and I have to just try multiple times.

I’ve seen this happen sometimes too in Safari, but haven’t been able to
trace down exactly why it happens.

Then, whenever it finally goes through I get an error message like the one
above.

That error message comes from our new OFX parser, which we ultimately
decided would be too complicated to update to work properly. The next
release (v23.7.1 or v23.7.2), which will hopefully roll out to PikaPods
soon, removes the new parser and falls back to our older, more reliable
parser. You shouldn’t get those errors anymore after that update. In the
meantime, you can ignore the message as it was just intended as a way for
us to get feedback about files that broke our new parser (as it turned out,
there were a lot!)

I’m going to retitle this issue to focus on the file upload issue since I
think that’s the main thing we need to fix here.


Reply to this email directly, view it on GitHub
https://github.com/actualbudget/actual/issues/1313#issuecomment-1627378555,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BBEODB62RUBDCWIPQ2YVQ7DXPF3STANCNFSM6AAAAAA2C4NZ3M
.
You are receiving this because you authored the thread.Message ID:
@.***>

<!-- gh-comment-id:1627574006 --> @mommyofavalor commented on GitHub (Jul 9, 2023): Thank you for your quick reply, Jed. Makes sense and I appreciate all the work that you are doing on Actual. Maureen On Sat, Jul 8, 2023 at 10:24 AM Jed Fox ***@***.***> wrote: > Thank you for reporting! > > Sometimes it wants me to double click on the file, sometimes it wants me > to click once and press "upload". > > Both of these should work. The file picker is controlled entirely by the > browser, so we don’t have any control over what happens here. > > Sometimes neither of those work and I have to just try multiple times. > > I’ve seen this happen sometimes too in Safari, but haven’t been able to > trace down exactly why it happens. > > Then, whenever it finally goes through I get an error message like the one > above. > > That error message comes from our new OFX parser, which we ultimately > decided would be too complicated to update to work properly. The next > release (v23.7.1 or v23.7.2), which will hopefully roll out to PikaPods > soon, removes the new parser and falls back to our older, more reliable > parser. You shouldn’t get those errors anymore after that update. In the > meantime, you can ignore the message as it was just intended as a way for > us to get feedback about files that broke our new parser (as it turned out, > there were a lot!) > > I’m going to retitle this issue to focus on the file upload issue since I > think that’s the main thing we need to fix here. > > — > Reply to this email directly, view it on GitHub > <https://github.com/actualbudget/actual/issues/1313#issuecomment-1627378555>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/BBEODB62RUBDCWIPQ2YVQ7DXPF3STANCNFSM6AAAAAA2C4NZ3M> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Author
Owner

@Cldfire commented on GitHub (Jul 15, 2023):

++, I'm hitting this as well. I cannot upload a .csv file to import transactions from in Safari 16.5.2. Firefox 115.0.2 on the same laptop has no issues uploading a .csv file and importing transactions.

<!-- gh-comment-id:1636890603 --> @Cldfire commented on GitHub (Jul 15, 2023): ++, I'm hitting this as well. I cannot upload a .csv file to import transactions from in Safari 16.5.2. Firefox 115.0.2 on the same laptop has no issues uploading a .csv file and importing transactions.
Author
Owner

@j-f1 commented on GitHub (Jul 15, 2023):

Give #1345 a shot!

<!-- gh-comment-id:1636895991 --> @j-f1 commented on GitHub (Jul 15, 2023): Give #1345 a shot!
Author
Owner

@Cldfire commented on GitHub (Jul 16, 2023):

Poking at this, for whatever reason we don't seem to be hitting the conditional after awaiting the result of the file dialog:

https://github.com/actualbudget/actual/assets/13814214/196a7ec1-4234-4cc8-a7e3-51ba429ce0a8

<!-- gh-comment-id:1636972486 --> @Cldfire commented on GitHub (Jul 16, 2023): Poking at this, for whatever reason we don't seem to be hitting the conditional after awaiting the result of the file dialog: https://github.com/actualbudget/actual/assets/13814214/196a7ec1-4234-4cc8-a7e3-51ba429ce0a8
Author
Owner

@Cldfire commented on GitHub (Jul 16, 2023):

Seems like Safari does not fire the change event listener when a file is selected in the dialog. Check out this codepen: https://codepen.io/udaymanvar/pen/MWaePBY?editors=1111

In Safari nothing is logged to the console after picking a file. In Firefox there are logs.

<!-- gh-comment-id:1636973403 --> @Cldfire commented on GitHub (Jul 16, 2023): Seems like Safari does not fire the `change` event listener when a file is selected in the dialog. Check out this codepen: https://codepen.io/udaymanvar/pen/MWaePBY?editors=1111 In Safari nothing is logged to the console after picking a file. In Firefox there are logs.
Author
Owner

@Cldfire commented on GitHub (Jul 16, 2023):

I ran monitorEvents(document.body.querySelectorAll("input[type='file']")); in the page console, and all of a sudden import is working fine in Safari and the change event is being fired on the file input.

I'm guessing WebKit doesn't like the fact that the file input is invisible, or something about it.

EDIT: actually, it seems I'm just hitting the behavior mentioned in the original issue. Sometimes it works, sometimes it doesn't.

<!-- gh-comment-id:1636974696 --> @Cldfire commented on GitHub (Jul 16, 2023): I ran `monitorEvents(document.body.querySelectorAll("input[type='file']"));` in the page console, and all of a sudden import is working fine in Safari and the `change` event is being fired on the file input. I'm guessing WebKit doesn't like the fact that the file input is invisible, or something about it. EDIT: actually, it seems I'm just hitting the behavior mentioned in the original issue. Sometimes it works, sometimes it doesn't.
Author
Owner

@Cldfire commented on GitHub (Jul 16, 2023):

Ah hah, inserting the file input into the DOM seems to completely fix the problem in Safari. A simple document.body.appendChild(input) call leads to me being able to reliably import transactions.

I guess WebKit doesn't like file inputs that aren't part of the DOM.

<!-- gh-comment-id:1636976313 --> @Cldfire commented on GitHub (Jul 16, 2023): Ah hah, inserting the file input into the DOM seems to completely fix the problem in Safari. A simple `document.body.appendChild(input)` call leads to me being able to reliably import transactions. I guess WebKit doesn't like file inputs that aren't part of the DOM.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#7431