jaros1 / Money-Network

Demo with complementary and alternative money. Implemented in ZeroNet and AngularJS. Focus on privacy, encryption, max data in client and min data on ZeroNet. Work in progress.
GNU General Public License v2.0
4 stars 4 forks source link

test public chat pending #227

Closed jaros1 closed 6 years ago

jaros1 commented 6 years ago

Note "Sending ..." in UI. No errors in log

screenshot from 2017-10-17 05-20-52

127.0.0.1-1508210542214.log

jaros1 commented 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.

127.0.0.1-1508210542214 (1).log

jaros1 commented 6 years ago

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
jaros1 commented 6 years ago

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