storj-archived / core

Deprecated. Implementation of the Storj v2 protocol for Node.js.
https://storj.io
Other
395 stars 88 forks source link

Exchange Reports and Public Buckets #632

Closed tempestb closed 7 years ago

tempestb commented 7 years ago

Package Versions

Replace the values below using the output from npm list storj. Use npm list -g storj if installed globally.

`-- storj@4.0.1

Replace the values below using the output from node --version.

v6.9.1

Expected Behavior

Please describe the program's expected behavior. Include an example of your usage code in the back ticks below if applicable.

Upload a cat picture to a public bucket.  Upload succeeds.  Cats for everyone!

Actual Behavior

Please describe the program's actual behavior. Please include any stack traces or log output in the back ticks below.

Fails.  It appears that the shard sends successfully, but when it goes to create the Exchange Report, it errors out due to failure of finding the bucket.

[Sun Jan 22 2017 13:05:06 GMT-0500 (Eastern Standard Time)] [info]   Generating encryption key...
[Sun Jan 22 2017 13:05:06 GMT-0500 (Eastern Standard Time)] [warn]   Request failed, reason: File not found - retrying(false)...
[Sun Jan 22 2017 13:05:06 GMT-0500 (Eastern Standard Time)] [info]   [ putty.exe ] Creating storage token... (retry: 0)
[Sun Jan 22 2017 13:05:07 GMT-0500 (Eastern Standard Time)] [info]   Encrypting file "c:/VGN/putty.exe"
[Sun Jan 22 2017 13:05:07 GMT-0500 (Eastern Standard Time)] [info]   [ putty.exe ] Encryption complete
[Sun Jan 22 2017 13:05:07 GMT-0500 (Eastern Standard Time)] [info]   [ putty.exe ] Storing file, hang tight!
[Sun Jan 22 2017 13:05:07 GMT-0500 (Eastern Standard Time)] [info]   Creating file staging frame
[Sun Jan 22 2017 13:05:07 GMT-0500 (Eastern Standard Time)] [info]   Trying to upload shard C:\Users\Kevin\AppData\Local\Temp\eb74758116c4 index 0
[Sun Jan 22 2017 13:05:07 GMT-0500 (Eastern Standard Time)] [info]   Hash for this shard is: 2d37c88f765efaf12d7afbf8f7f680a3909cc076
[Sun Jan 22 2017 13:05:07 GMT-0500 (Eastern Standard Time)] [info]   Audit generation for shard done.
[Sun Jan 22 2017 13:05:07 GMT-0500 (Eastern Standard Time)] [info]   Waiting on a storage offer from the network...
[Sun Jan 22 2017 13:05:07 GMT-0500 (Eastern Standard Time)] [info]   Querying bridge for contract for 2d37c88f765efaf12d7afbf8f7f680a3909cc076 (retry: 0)
[Sun Jan 22 2017 13:05:08 GMT-0500 (Eastern Standard Time)] [info]   Contract negotiated with: {"userAgent":"6.0.15","protocol":"1.1.0","address":"server2dk.ddns.net","port":4035,"nodeID":"2d5e6d97c5518fa30c710696125f7c051e08d97c","lastSeen":1485108311568}
[Sun Jan 22 2017 13:05:09 GMT-0500 (Eastern Standard Time)] [info]   Shard transfer completed! 0 remaining...
[Sun Jan 22 2017 13:05:09 GMT-0500 (Eastern Standard Time)] [info]   Transfer finished, creating entry.. (retry: 0)
[Sun Jan 22 2017 13:05:09 GMT-0500 (Eastern Standard Time)] [info]   sending exchange report
[Sun Jan 22 2017 13:05:10 GMT-0500 (Eastern Standard Time)] [warn]   Request failed, reason: Bucket not found - retrying(false)...
[Sun Jan 22 2017 13:05:10 GMT-0500 (Eastern Standard Time)] [info]   Transfer finished, creating entry.. (retry: 1)
[Sun Jan 22 2017 13:05:20 GMT-0500 (Eastern Standard Time)] [warn]   Request failed, reason: ESOCKETTIMEDOUT - retrying(true)...
[Sun Jan 22 2017 13:05:20 GMT-0500 (Eastern Standard Time)] [warn]   Request failed, reason: Bucket not found - retrying(false)...
[Sun Jan 22 2017 13:05:20 GMT-0500 (Eastern Standard Time)] [info]   Transfer finished, creating entry.. (retry: 2)
[Sun Jan 22 2017 13:05:21 GMT-0500 (Eastern Standard Time)] [warn]   Request failed, reason: Bucket not found - retrying(false)...
[Sun Jan 22 2017 13:05:21 GMT-0500 (Eastern Standard Time)] [info]   Transfer finished, creating entry.. (retry: 3)
[Sun Jan 22 2017 13:05:21 GMT-0500 (Eastern Standard Time)] [warn]   Request failed, reason: Bucket not found - retrying(false)...
[Sun Jan 22 2017 13:05:21 GMT-0500 (Eastern Standard Time)] [info]   Transfer finished, creating entry.. (retry: 4)
[Sun Jan 22 2017 13:05:21 GMT-0500 (Eastern Standard Time)] [warn]   Request failed, reason: Bucket not found - retrying(false)...
[Sun Jan 22 2017 13:05:21 GMT-0500 (Eastern Standard Time)] [info]   Transfer finished, creating entry.. (retry: 5)
[Sun Jan 22 2017 13:05:22 GMT-0500 (Eastern Standard Time)] [warn]   Request failed, reason: Bucket not found - retrying(false)...
[Sun Jan 22 2017 13:05:22 GMT-0500 (Eastern Standard Time)] [info]   Transfer finished, creating entry.. (retry: 6)
[Sun Jan 22 2017 13:05:22 GMT-0500 (Eastern Standard Time)] [warn]   Request failed, reason: Bucket not found - retrying(false)...
[Sun Jan 22 2017 13:05:22 GMT-0500 (Eastern Standard Time)] [error]  Bucket not found
[Sun Jan 22 2017 13:05:22 GMT-0500 (Eastern Standard Time)] [warn]   [ putty.exe ] Error occurred. Triggering cleanup...
[Sun Jan 22 2017 13:05:22 GMT-0500 (Eastern Standard Time)] [info]   [ putty.exe ] Cleaning up...
[Sun Jan 22 2017 13:05:22 GMT-0500 (Eastern Standard Time)] [info]   [ putty.exe ] Finished cleaning!
[Sun Jan 22 2017 13:05:22 GMT-0500 (Eastern Standard Time)] [error]  Bucket not found
S C:\Users\Kevin> npm list storj

Steps to Reproduce

Please include the steps the reproduce the issue, numbered below. Include as much detail as possible.

  1. storj upload-file 39b977f95100063a0c64d1db c:\catpics\pictureofcat.jpg
  2. ...
  3. ...
littleskunk commented 7 years ago

I have the same problem

 [Sun Jan 22 2017 17:04:47 GMT+0100 (CET)] [debug]  Request Options: {"baseUrl":"https://api.storj.io","uri":"/reports/exchanges","method":"POST","timeout":10000,"json":{"dataHash":"d8bb0043998a56c07fc10a2ef2a3f717225116ac","reporterId":"02e38cec680d74d2f0492593cc572c7826e197b40665c29216d8f42a0ad1925829","farmerId":"d8bcfb6b5b08332dbe67d9073b867a09e5c224bf","clientId":"02e38cec680d74d2f0492593cc572c7826e197b40665c29216d8f42a0ad1925829","exchangeStart":1485101087071,"exchangeEnd":1485101087298,"exchangeResultCode":1000,"exchangeResultMessage":"SHARD_UPLOADED","__nonce":"6d9307fe-e681-46ed-a245-df61ea72ffe4"},"headers":{"x-pubkey":"02e38cec680d74d2f0492593cc572c7826e197b40665c29216d8f42a0ad1925829","x-signature":"3045022100d44bf8396505ae82709d6843112b927f0f35032386d94a41f82475f7053f983a02202625241ebb2e5f447de13c48e9a87886aa096bf7794d5e1bbc59ef406f0ffe91"}}
 [Sun Jan 22 2017 17:04:47 GMT+0100 (CET)] [debug]  Response Body: {"error":"Bucket not found"}

It is the public bucket of @MeijeSibbel.

C:\Users\Meije>storj make-public --pull --push 39b977f95100063a0c64d1db
 [...]  > Enter your passphrase to unlock your keyring  >  *********

 [Sun Jan 22 2017 16:54:37 GMT+0100 (W. Europe Standard Time)] [info]   ID: 39b977f95100063a0c64d1db, Name: Public, Public Pull: true, Public Push: true, Key: f046a5b3593020fd62df1f6c624de5f92ab40fb49904c1ecccda8b4a3c550727
MeijeSibbel commented 7 years ago

Downloads from the pubic bucket are working more or less, except for the first uploaded file that somehow got corrupted after uploading it/ or it did not get decrypted, so that's another issue (big issue?).

This file: [Sun Jan 22 2017 19:16:18 GMT+0100 (W. Europe Standard Time)] [info] Name: Storj-blue-hires.png, Type: image/png, Size: 84125 bytes, ID: 58fd36a2dc4d3d7dd3a294cf

The files: ![storj-blue-hires_uploaded](https://cloud.githubusercontent.com/assets/11735738/22184726/84b42c8a-e0d8-11e6-89d8-7d6ae65771a8.png) ![storj-blue-hires-downloaded](https://cloud.githubusercontent.com/assets/11735738/22184727/84b53c42-e0d8-11e6-9f6b-6a7d703e1eb6.png)

so somehow the upland corrupted the file or it does not decrypt after downloading it from the public bucket.

Both files (original and downloaded file) have the exact same size though.

lilyannehall commented 7 years ago

Public bucket uploads are not currently supported, but will come once the appropriate tooling for bucket owners to manage and mitigate abuse are ready. Until then, this should be opened in the bridge repository.