More than 29MB files are not uploaded [webapp]

68 views
Skip to first unread message

Yofree United

unread,
Dec 21, 2022, 8:26:32 AM12/21/22
to Tinode General
Screenshot_37.png

web console
[13:20:22.151] out: {"sub":{"id":"87118","topic":"grpySk2o65Vxzo","get":{"data":{"since":140,"limit":24},"desc":{"ims":"2022-12-21T13:18:56.268Z"},"del":{"since":1},"what":"data sub desc del"}}}
tinode.js:475 [13:20:22.181] in: {"ctrl":{"id":"87118","topic":"grpySk2o65Vxzo","code":200,"text":"ok","ts":"2022-12-21T13:20:22.301Z"}}
tinode.js:475 [13:20:22.198] in: {"meta":{"id":"87118","topic":"grpySk2o65Vxzo","ts":"2022-12-21T13:20:22.301Z","desc":{"updated":"2022-11-20T16:11:54.951Z","touched":"2022-12-21T13:18:55.450Z","online":true,"defacs":{"auth":"JRWPS","anon":"N"},"acs":{"mode":"JRWPS","given":"JRWPS","want":"JRWPS"},"seq":139,"read":139,"recv":139,"clear":36}}}
tinode.js:475 [13:20:22.198] in: {"pres":{"topic":"me","src":"grpySk2o65Vxzo","what":"on"}}
tinode.js:475 [13:20:22.199] in: {"meta":{"id":"87118","topic":"grpySk2o65Vxzo","ts":"2022-12-21T13:20:22.301Z","sub":[{"updated":"2022-12-21T13:18:57.908Z","acs":{"mode":"JRWPASD","given":"JRWPASDO","want":"JRWPASD"},"read":139,"recv":139,"public":{"fn":"ИМЯ ФА ОТ T","note":"info mobile info","photo":{"height":384,"ref":"/v0/file/s/GcVssPolwSs.png","type":"jpeg","width":384}},"user":"usr2WYMJdwbHis"},{"updated":"2022-11-20T16:40:08.445Z","acs":{"mode":"JRWPSO","given":"JRWPSO","want":"JRWPASDO"},"public":{"fn":"имя имя 34"},"user":"usrcxSpTP2Dymc"},{"updated":"2022-11-20T16:37:37.358Z","acs":{"mode":"JRWPS","given":"JRWPS","want":"JRWPASDO"},"public":{"fn":"имя 3"},"user":"usriBIXncHP3Vw"},{"updated":"2022-12-21T13:18:56.268Z","online":true,"acs":{"mode":"JRWPS","given":"JRWPS","want":"JRWPS"},"read":139,"recv":139,"public":{"fn":"bombus","note":"test 2","photo":{"data":"<2288, bytes: iVBORw0KGgoA...RU5ErkJggg==>","height":44,"type":"png","width":44}},"user":"usrPeMOB012esU","clear":36}]}}
tinode.js:475 [13:20:22.199] in: {"ctrl":{"id":"87118","topic":"grpySk2o65Vxzo","params":{"what":"data"},"code":204,"text":"no content","ts":"2022-12-21T13:20:22.302Z"}}
tinode.js:475 [13:20:22.199] in: {"meta":{"id":"87118","topic":"grpySk2o65Vxzo","ts":"2022-12-21T13:20:22.304Z","del":{"clear":36,"delseq":[{"low":30},{"low":30},{"low":52,"hi":54},{"low":85},{"low":90},{"low":92,"hi":94},{"low":94,"hi":96},{"low":96},{"low":98},{"low":99,"hi":102},{"low":102},{"low":103},{"low":104},{"low":105},{"low":105},{"low":106},{"low":108},{"low":109},{"low":111},{"low":115},{"low":124},{"low":129},{"low":130},{"low":134}]}}}
large-file.js:151 POST https://api.tinode.ru/v0/file/u/ 413
uploadWithBaseUrl @ large-file.js:151
upload @ large-file.js:178
sendFileAttachment @ messages-view.jsx:879
handleSendDoc @ doc-preview.jsx:24
handleSend @ send-message.jsx:178
callCallback @ react-dom.development.js:4151
invokeGuardedCallbackDev @ react-dom.development.js:4200
invokeGuardedCallback @ react-dom.development.js:4264
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4278
executeDispatch @ react-dom.development.js:9051
processDispatchQueueItemsInOrder @ react-dom.development.js:9083
processDispatchQueue @ react-dom.development.js:9096
dispatchEventsForPlugins @ react-dom.development.js:9107
(anonymous) @ react-dom.development.js:9298
batchedUpdates$1 @ react-dom.development.js:26150
batchedUpdates @ react-dom.development.js:3978
dispatchEventForPluginEventSystem @ react-dom.development.js:9297
dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6475
dispatchEvent @ react-dom.development.js:6467
dispatchDiscreteEvent @ react-dom.development.js:6440
tinode.js:475 [13:20:35.032] ERROR: Invalid server response in LargeFileHelper Отображение страницы невозможно из-за большого размера объекта запроса.
tinode.js:475 [13:20:35.032] WARNING: Message draft rejected Error:  (413)

server console
I2022/12/21 16:20:14 in: '{"hi":{"id":"87115","ver":"0.21.0-beta1","ua":"TinodeWeb/0.21.0-beta1 (Chrome/97.0; Win32); tinodejs/0.21.0-beta1","lang":"en-US","platf":"web"}}' sid='ZRp9hCpKCKc' uid=''
I2022/12/21 16:20:14 in: '{"login":{"id":"87116","scheme":"token","secret":"PeMOB012esUGfbVjFAABAAEAGBD48HGs3SxlN5DKgbh1xYGYgLEKVrVJuABCBTgw7Mg="}}' sid='ZRp9hCpKCKc' uid=''
I2022/12/21 16:20:14 in: '{"sub":{"id":"87117","topic":"me","get":{"what":"sub desc tags cred"}}}' sid='ZRp9hCpKCKc' uid='PeMOB012esU'
I2022/12/21 16:20:22 in: '{"sub":{"id":"87118","topic":"grpySk2o65Vxzo","get":{"data":{"since":140,"limit":24},"desc":{"ims":"2022-12-21T13:18:56.268Z"},"del":{"since":1},"what":"data sub desc del"}}}' sid='ZRp9hCpKCKc' uid='PeMOB012esU'
I2022/12/21 16:20:22 media serve: OK, uid= PeMOB012esU
I2022/12/21 16:20:22 media serve: OK, uid= PeMOB012esU
I2022/12/21 16:20:32 media serve: OK, uid= PeMOB012esU
I2022/12/21 16:20:32 media serve: OK, uid= PeMOB012esU

Yofree United

unread,
Dec 21, 2022, 8:40:22 AM12/21/22
to Tinode General
File upload https://files.fm/f/46t93f54d (29MB)

среда, 21 декабря 2022 г. в 16:26:32 UTC+3, Yofree United:

Gene

unread,
Dec 21, 2022, 11:36:14 AM12/21/22
to Tinode General
That's exactly as it should be. The https://api.tinode.ru/ has an upload limit of 20MB.

Please DO NOT use https://api.tinode.ru/ for testing. Use sandbox.tinode.co.

Yofree United

unread,
Dec 21, 2022, 4:50:50 PM12/21/22
to Tinode General

That's exactly as it should be. The https://api.tinode.ru/ has an upload limit of 20MB.

 Client tindroid uploads more than 20mb. This problem is only in webapp.

tinode.conf
        "max_size": 88388608,


Gene

unread,
Dec 21, 2022, 5:11:40 PM12/21/22
to Tinode General
I don't see "max_size": 88388608 in any of my config files. Where do you see it?

Gene

unread,
Dec 21, 2022, 5:13:07 PM12/21/22
to Tinode General
Here is what I see from api.tinode.co:

[16:19:57.030] in: {"ctrl":{"id":"82533","params":{"build":"mysql:v0.20.2","callTimeout":30,"iceServers":[{"urls":["stun:openrelay.metered.ca:80"]},{"username":"openrelayproject","credential":"openrelayproject","urls":["turn:openrelay.metered.ca:80","turn:openrelay.metered.ca:443","turn:openrelay.metered.ca:443?transport=tcp"]}],"maxFileUploadSize":20971520,"maxMessageSize":262144,"maxSubscriberCount":32,"maxTagCount":16,"maxTagLength":96,"minTagLength":2,"ver":"0.20"},"code":201,"text":"created","ts":"2022-12-21T16:19:57.007Z"}}

Exactly as configured.  

Yofree United

unread,
Dec 21, 2022, 5:27:23 PM12/21/22
to Tinode General
[22:23:27.752] in: {"ctrl":{"id":"67606","params":{"build":"mysql:undef","maxFileUploadSize":88388608,"maxMessageSize":262144,"maxSubscriberCount":128,"maxTagCount":16,"maxTagLength":96,"minTagLength":2,"ver":"0.20"},"code":201,"text":"created","ts":"2022-12-21T22:23:27.840Z"}} 

Test it yourself api.tinode.RU

четверг, 22 декабря 2022 г. в 01:13:07 UTC+3, Gene:

Gene

unread,
Dec 21, 2022, 5:29:24 PM12/21/22
to Tinode General
If it's your own setup then please debug it and let me know if there is a bug in our code.

Yofree United

unread,
Dec 21, 2022, 5:32:11 PM12/21/22
to Tinode General
Can you suggest how to do this?
четверг, 22 декабря 2022 г. в 01:29:24 UTC+3, Gene:

Gene

unread,
Dec 21, 2022, 5:48:57 PM12/21/22
to Tinode General
Look where the upload gets rejected.

Yofree United

unread,
Dec 21, 2022, 6:04:57 PM12/21/22
to Tinode General

large-file.js:151
POST https://api.tinode.ru/v0/file/u/ 413
tinode.js:475 [22:58:42.909] ERROR: Invalid server response in LargeFileHelper Отображение страницы невозможно из-за большого размера объекта запроса.
tinode.js:475 [22:58:42.909] WARNING: Message draft rejected Error: (413)
large-file.js:151 XHR failed loading: POST "https://api.tinode.ru/v0/file/u/".

large-file.js line 151  this.xhr.send(form);

четверг, 22 декабря 2022 г. в 01:48:57 UTC+3, Gene:

Gene

unread,
Dec 21, 2022, 9:09:30 PM12/21/22
to Tinode General
Your server rejects the upload. See if there is anything in the server log.

Yofree United

unread,
Dec 22, 2022, 12:13:49 AM12/22/22
to Tinode General
Thanks I will check the server

четверг, 22 декабря 2022 г. в 05:09:30 UTC+3, Gene:

Yofree United

unread,
Dec 22, 2022, 1:22:31 AM12/22/22
to Tinode General
Oh I'm sorry. Indeed the problem was with the server.

For those who use the IIS server.
IIS Application Request Routing (ARR) You need to set up a web.config (Default 30 mb)
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="88388608">
</requestLimits>
</requestFiltering>
</security>

If we increase the load values tinode.conf, then we need to increase it in the web.config
// Maximum size of uploaded file (8MB here for testing, maybe increase to 100MB = 104857600 in prod)
        "max_size": 88388608,

Thanks for your time and help.

Reply all
Reply to author
Forward
0 new messages