Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot upload #502

Open
IamSAB opened this issue Dec 21, 2024 · 6 comments
Open

Cannot upload #502

IamSAB opened this issue Dec 21, 2024 · 6 comments
Labels
bug Something isn't working question Further information is requested

Comments

@IamSAB
Copy link

IamSAB commented Dec 21, 2024

Upload not working after migrating Firefly from self-host to Docker. Upload works on Firefly side.

Waterfly only states: Could not upload file: Unkown error. However, the logs do not indicate any error ...

server logs:

[21/Dec/2024:16:26:37 +0100] "POST /api/v1/attachments HTTP/1.1" 200 1537 "-" "com.dreautall.waterflyiii/3823 (Linux; U; Android 14; de_CH; SM-A528B; Build/AP2A.240905.003; Cronet/*)"
[21/Dec/2024:16:26:37 +0100] "DELETE /api/v1/attachments/249 HTTP/1.1" 204 856 "-" "com.dreautall.waterflyiii/3823 (Linux; U; Android 14; de_CH; SM-A528B; Build/AP2A.240905.003; Cronet/*)"

waterfly logs:

2024-12-21 16:26:38.282974: [Pages.Transaction.AttachmentDialog - FINER] Image /data/user/0/com.dreautall.waterflyiii/cache/31c06e9d-a6ca-4725-926f-a1439a0864498398230334433421079.jpg will be uploaded
2024-12-21 16:26:38.287039: [Auth - FINEST] API query to https://domain/api/v1/attachments
2024-12-21 16:26:38.358456: [Pages.Transaction.AttachmentDialog - FINE] AttachmentUpload: Starting Upload 0
2024-12-21 16:26:38.371617: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 65536 of 4070098), 1.6101823592454039%
2024-12-21 16:26:38.372531: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 131072 of 4070098), 3.2203647184908077%
2024-12-21 16:26:38.373876: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 196608 of 4070098), 4.830547077736211%
2024-12-21 16:26:38.374631: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 262144 of 4070098), 6.4407294369816155%
2024-12-21 16:26:38.375501: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 327680 of 4070098), 8.05091179622702%
2024-12-21 16:26:38.376311: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 393216 of 4070098), 9.661094155472423%
2024-12-21 16:26:38.376888: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 458752 of 4070098), 11.271276514717828%
2024-12-21 16:26:38.377524: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 524288 of 4070098), 12.881458873963231%
2024-12-21 16:26:38.378376: [Pages.Transaction.AttachmentDialog - FINEST] build(transactionId: 682)
2024-12-21 16:26:38.385960: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 589824 of 4070098), 14.491641233208636%
2024-12-21 16:26:38.388014: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 655360 of 4070098), 16.10182359245404%
2024-12-21 16:26:38.393234: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 720896 of 4070098), 17.712005951699446%
2024-12-21 16:26:38.394045: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 786432 of 4070098), 19.322188310944846%
2024-12-21 16:26:38.394788: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 851968 of 4070098), 20.932370670190252%
2024-12-21 16:26:38.395590: [Pages.Transaction.AttachmentDialog - FINEST] build(transactionId: 682)
2024-12-21 16:26:38.398860: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 917504 of 4070098), 22.542553029435656%
2024-12-21 16:26:38.399783: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 983040 of 4070098), 24.15273538868106%
2024-12-21 16:26:38.402053: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 1048576 of 4070098), 25.762917747926462%
2024-12-21 16:26:38.405297: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 1114112 of 4070098), 27.373100107171865%
2024-12-21 16:26:38.407605: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 1179648 of 4070098), 28.983282466417272%
2024-12-21 16:26:38.408869: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 1245184 of 4070098), 30.593464825662675%
2024-12-21 16:26:38.409719: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 1310720 of 4070098), 32.20364718490808%
2024-12-21 16:26:38.410759: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 1376256 of 4070098), 33.813829544153485%
2024-12-21 16:26:38.411508: [Pages.Transaction.AttachmentDialog - FINEST] build(transactionId: 682)
2024-12-21 16:26:38.414896: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 1441792 of 4070098), 35.42401190339889%
2024-12-21 16:26:38.416080: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 1507328 of 4070098), 37.034194262644284%
2024-12-21 16:26:38.417434: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 1572864 of 4070098), 38.64437662188969%
2024-12-21 16:26:38.421742: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 1638400 of 4070098), 40.2545589811351%
2024-12-21 16:26:38.424118: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 1703936 of 4070098), 41.864741340380505%
2024-12-21 16:26:38.426042: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 1769472 of 4070098), 43.474923699625904%
2024-12-21 16:26:38.427802: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 1835008 of 4070098), 45.08510605887131%
2024-12-21 16:26:38.430336: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 1900544 of 4070098), 46.69528841811672%
2024-12-21 16:26:38.431178: [Pages.Transaction.AttachmentDialog - FINEST] build(transactionId: 682)
2024-12-21 16:26:38.445320: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 1966080 of 4070098), 48.30547077736212%
2024-12-21 16:26:38.447305: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 2031616 of 4070098), 49.915653136607524%
2024-12-21 16:26:38.448089: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 2097152 of 4070098), 51.525835495852924%
2024-12-21 16:26:38.448646: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 2162688 of 4070098), 53.13601785509833%
2024-12-21 16:26:38.449464: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 2228224 of 4070098), 54.74620021434373%
2024-12-21 16:26:38.450094: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 2293760 of 4070098), 56.35638257358914%
2024-12-21 16:26:38.450622: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 2359296 of 4070098), 57.966564932834544%
2024-12-21 16:26:38.451252: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 2424832 of 4070098), 59.57674729207994%
2024-12-21 16:26:38.451790: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 2490368 of 4070098), 61.18692965132535%
2024-12-21 16:26:38.452229: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 2555904 of 4070098), 62.79711201057076%
2024-12-21 16:26:38.452630: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 2621440 of 4070098), 64.40729436981616%
2024-12-21 16:26:38.452990: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 2686976 of 4070098), 66.01747672906157%
2024-12-21 16:26:38.453368: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 2752512 of 4070098), 67.62765908830697%
2024-12-21 16:26:38.453699: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 2818048 of 4070098), 69.23784144755237%
2024-12-21 16:26:38.454047: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 2883584 of 4070098), 70.84802380679778%
2024-12-21 16:26:38.454364: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 2949120 of 4070098), 72.45820616604317%
2024-12-21 16:26:38.454677: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 3014656 of 4070098), 74.06838852528857%
2024-12-21 16:26:38.454997: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 3080192 of 4070098), 75.67857088453398%
2024-12-21 16:26:38.455383: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 3145728 of 4070098), 77.28875324377938%
2024-12-21 16:26:38.455749: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 3211264 of 4070098), 78.8989356030248%
2024-12-21 16:26:38.456098: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 3276800 of 4070098), 80.5091179622702%
2024-12-21 16:26:38.456441: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 3342336 of 4070098), 82.1193003215156%
2024-12-21 16:26:38.456815: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 3407872 of 4070098), 83.72948268076101%
2024-12-21 16:26:38.457207: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 3473408 of 4070098), 85.33966504000641%
2024-12-21 16:26:38.457565: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 3538944 of 4070098), 86.94984739925181%
2024-12-21 16:26:38.457886: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 3604480 of 4070098), 88.56002975849722%
2024-12-21 16:26:38.458248: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 3670016 of 4070098), 90.17021211774262%
2024-12-21 16:26:38.458574: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 3735552 of 4070098), 91.78039447698802%
2024-12-21 16:26:38.458918: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 3801088 of 4070098), 93.39057683623344%
2024-12-21 16:26:38.459295: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 3866624 of 4070098), 95.00075919547884%
2024-12-21 16:26:38.459615: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 3932160 of 4070098), 96.61094155472423%
2024-12-21 16:26:38.460026: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 3997696 of 4070098), 98.22112391396965%
2024-12-21 16:26:38.460461: [Pages.Transaction.AttachmentDialog - FINEST] sent 65536 bytes (total 4063232 of 4070098), 99.83130627321505%
2024-12-21 16:26:38.460892: [Pages.Transaction.AttachmentDialog - FINEST] build(transactionId: 682)
2024-12-21 16:26:38.463555: [Pages.Transaction.AttachmentDialog - FINEST] sent 6866 bytes (total 4070098 of 4070098), 100.0%
2024-12-21 16:26:38.482730: [Pages.Transaction.AttachmentDialog - FINEST] build(transactionId: 682)
2024-12-21 16:26:38.563559: [Pages.Transaction.AttachmentDialog - FINE] AttachmentUpload: Done with Upload 0
2024-12-21 16:26:38.567543: [Auth - FINEST] API query to https://domain/api/v1/attachments/249
``

Firefly III version **v6.0.30**.
@dreautall
Copy link
Owner

That's odd. According to the server logs the server responded with 200 in the end, which is what should return successfully:

if (resp.statusCode == HttpStatus.ok ||

Nonetheless your FF3 version is over a year old - not sure if something in the API changed there in the meantime. Any reason you can't update to a more recent version and try again? What type of file are you uploading? There were some fixes on FF3 side, for example in v6.1.11.

@dreautall dreautall added bug Something isn't working question Further information is requested labels Dec 21, 2024
@IamSAB
Copy link
Author

IamSAB commented Dec 22, 2024

Yes, i can try an update of serverside.

but i migrated on the same ff3 version and waterfly did work before without problem.

I noticed, its only for pictures I take in the app, if I append a pdf or image, its fine.

I also got an error email from firefly:

Firefly III v6.0.30 ist auf einen Fehler gestoßen: 200000: File has not been uploaded (yet)..

Der Fehler war vom Typ "FireflyIII\Exceptions\FireflyException".

Dieser Fehler ist in der Datei "/var/www/html/app/Api/V1/Controllers/Models/Attachment/ShowController.php" in Zeile 82 mit dem Code 0 aufgetreten.

Seems like waterfly tries too early downloaing the file because the log shows, that the upload is succesfull.

@IamSAB
Copy link
Author

IamSAB commented Dec 22, 2024

Just updated to latest firefly version. Problem persists.

@dreautall
Copy link
Owner

Hm it's strange that it works for existing files and only occurs when you grab an image yourself, and that it worked before. I was wondering if the file name maybe got too long, but firefly renames the stored files on disk anyways to at-$ID.data. I'm using the feature regularly and never had an issue myself either.

The only thing I would be able to do now is to add more verbose logging to the upload function to figure out what exactly is happening here (as before it progresses normally):

if (resp.statusCode == HttpStatus.ok ||
resp.statusCode == HttpStatus.created ||
resp.statusCode == HttpStatus.noContent) {
return;
}
late String error;
try {
final String respString = await resp.stream.bytesToString();
ValidationErrorResponse valError =
ValidationErrorResponse.fromJson(json.decode(respString));
error = valError.message ?? l10n.errorUnknown;
} catch (_) {
error = l10n.errorUnknown;
}

If you want I can craft you an apk like that after Christmas. I'm assuming you're not using the google play version, I could try to give it a "matching" id so that you can update normally afterwards.

@IamSAB
Copy link
Author

IamSAB commented Dec 23, 2024

That would be nice. i use the F-Droid version.

@IamSAB
Copy link
Author

IamSAB commented Dec 24, 2024

I noticed that only images taken with the camera cannot upload.
E.g. screenshots or office lens images work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants