Closed jaros1 closed 6 years ago
Looks like a problem with deleted optional files. Same issue as in https://github.com/jaros1/Money-Network/issues/223 Sending while trying to read (deleted) optional chat file to append new chat message to. Two getFile timeouts with elapsed time > 60 seconds.
z_file_get. added an extra optionalFileInfo call before fileGet operation for optional files. It should be possible to detect deleted optional files or optional files without any peers before starting fileGet operation and prevent pending fileGet operations or fileGet operations with a long timeout
Example:
09:31:58.435 all.js:1789 MoneyNetworkService.get_and_load_chat_file get_user_seq callback 1: filename = "1508311915217-1508311915217-1-chat.json", optional_file = true 09:31:58.545 all.js:2312 MoneyNetworkService.get_and_load_chat_file get_user_seq callback 1: file_info = {"inner_path":"data/users/18DbeZgtVCcLghmtzvg4Uv8uRQAwR8wnDQ/1508311915217-1508311915217-1-chat.json","uploaded":0,"is_pinned":1,"time_accessed":0,"site_id":6,"is_downloaded":0,"file_id":19984,"peer":0,"time_added":1508311916,"hash_id":514,"time_downloaded":0,"size":293} 09:31:58.546 MoneyNetworkAPI.js:281 MoneyNetworkService.get_and_load_chat_file get_user_seq callback 1: merged-MoneyNetwork/1PgyTnnACGd1XRdpfiDihgKwYRRnzgz2zh/data/users/18DbeZgtVCcLghmtzvg4Uv8uRQAwR8wnDQ/1508311915217-1508311915217-1-chat.json fileGet started (60). 1 pending ZeroNet API operation (60) 09:32:58.546 MoneyNetworkAPI.js:295 MoneyNetworkService.get_and_load_chat_file get_user_seq callback 1: merged-MoneyNetwork/1PgyTnnACGd1XRdpfiDihgKwYRRnzgz2zh/data/users/18DbeZgtVCcLghmtzvg4Uv8uRQAwR8wnDQ/1508311915217-1508311915217-1-chat.json fileGet finished. res = "Not found". elapsed time 60000 ms (60). No pending ZeroNet API operations 09:32:58.546 all.js:1789 MoneyNetworkService.get_and_load_chat_file z_file_get callback 2: downloaded merged-MoneyNetwork/1PgyTnnACGd1XRdpfiDihgKwYRRnzgz2zh/data/users/18DbeZgtVCcLghmtzvg4Uv8uRQAwR8wnDQ/1508311915217-1508311915217-1-chat.json 09:32:58.547 all.js:16116 MoneyNetworkService.get_and_load_chat_file z_file_get callback 2: download failed for merged-MoneyNetwork/1PgyTnnACGd1XRdpfiDihgKwYRRnzgz2zh/data/users/18DbeZgtVCcLghmtzvg4Uv8uRQAwR8wnDQ/1508311915217-1508311915217-1-chat.json, failures = 1
Should be OK now for ingoing optional files. Maybe still an issue with outgoing optional files that has been deleted by ZeroNet (https://github.com/HelloZeroNet/ZeroNet/issues/1147) or deleted in manual cleanup on file system
Note "Sending ..." in UI. No errors in log
127.0.0.1-1508210542214.log