Closed jaros1 closed 7 years ago
The problem is "res[i].auth_address == my_auth_address" in JS code. Dirty test for already "downloadede" optional chat files. Not working when two different users are using same ZeroNet cert. Must use other method to check for already downloaded optional files https://github.com/jaros1/Money-Network/blob/master/js/lib/76-angular-services.js#L5671
Simple workaround. cache without timestamps must be failed fileGet:
if (cache_status) { if (cache_status.is_pending) { // ignore and delete - is being process by an other process - and delete res res[i].delete = true ; continue ; } if (!cache_status.timestamps) continue ; // must be a failed fileGet. see next steps }
MoneyNetworkService.get_public_chat dbQuery callback 3: issue #84. cache_status.timestamps is null. res[1] = {"guest":null,"hub":"1PgyTnnACGd1XRdpfiDihgKwYRRnzgz2zh","from_timestamp":1508145257162,"filename":"1508145257162-1508145257162-2-chat.json","to_timestamp":1508145257162,"auth_address":"18DbeZgtVCcLghmtzvg4Uv8uRQAwR8wnDQ","user_seq":2,"pubkey":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0pMuMJyynH1BmhMJ6vvd\nQZplIBgiiOQSqwu2SpYKICm+P1gGNHnICQic/Nuqi9t93rxJLfWCsl0+lCtoJLen\nf78xz4XzEcGPBeBFn2TbQqPO9loylNlaOgiqDG5qcSc9n7yEF0xmpReDGATwzECi\nJrpZBImwhUMO48iS08b4IfQaMsbnUVY8hdUeJiQ831kMkNQLtxWaeRiyn8cTbKQ6\nLXCDG7GDaFN6t+x3cv/xBX06+ykuYQ0gNIBySiIz69RYzhvOkqOQggLWPF+NMW1J\nO6VRqvX7Sybwm51v3kGGKWeX4znvGY+GwVCpwiH+b2hbGZHIqFp9ogimGVE0WPgu\nnwIDAQAB\n-----END PUBLIC KEY-----","size":341,"delete":true}, cache_status = {"is_downloaded":false,"is_pending":false,"size":341,"download_failed_at":[1508151402020]} all.js:15754 Uncaught TypeError: Cannot read property 'length' of undefined at Object. (all.js:15754)
at ZeroFrame.onMessage (30-ZeroFrame.js:42)
at 30-ZeroFrame.js:7
(anonymous) @ all.js:15754
ZeroFrame.onMessage @ 30-ZeroFrame.js:42
(anonymous) @ 30-ZeroFrame.js:7
127.0.0.1-1508151768995.log