uniuuu / zotprime

Fully packaged on-premise Zotero platform
https://www.zotero.org
GNU General Public License v3.0
71 stars 7 forks source link

[JavaScript Error: "Unexpected file registration status 400 (1/ )"] #7

Closed uniuuu closed 1 year ago

uniuuu commented 1 year ago
zotprime-zotprime-dataserver-1     | 172.24.0.1 - - [07/May/2023:10:42:32 +0700] "POST /users/1/items/E2Q2BCQ4/file HTTP/1.1" 200 2305 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Zotero/6.0.27.SOURCE.2f0d41c0c"
zotprime-zotprime-minio-1          | [REQUEST objectAPIHandlers.PostPolicyBucketHandler-fm] [168343095.229328] [2023-05-07 10:42:32 +0700]
zotprime-zotprime-minio-1          | POST /zotero/
zotprime-zotprime-minio-1          | Host: localhost:8082
zotprime-zotprime-minio-1          | User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Zotero/6.0.27.SOURCE.2f0d41c0c
zotprime-zotprime-minio-1          | Accept: */*
zotprime-zotprime-minio-1          | Accept-Encoding: gzip, deflate
zotprime-zotprime-minio-1          | Content-Type: multipart/form-data; boundary=---------------------------64f18a070b7f4777ff36690c411f14f5
zotprime-zotprime-minio-1          | Content-Length: 400574
zotprime-zotprime-minio-1          | Connection: keep-alive
zotprime-zotprime-minio-1          | Accept-Language: en-US,en;q=0.5
zotprime-zotprime-minio-1          | X-Zotero-Version: 6.0.27.SOURCE.2f0d41c0c
zotprime-zotprime-minio-1          | 
zotprime-zotprime-minio-1          | <BODY>
zotprime-zotprime-minio-1          | 
zotprime-zotprime-minio-1          | [RESPONSE] [168343095.229328] [2023-05-07 10:42:32 +0700]
zotprime-zotprime-minio-1          | 201 Created
zotprime-zotprime-minio-1          | X-Minio-Deployment-Id: 9fd3eb2a-f261-4ac5-93d1-13a782587cd9
zotprime-zotprime-minio-1          | Etag: "a6453f35c17fb9ee7ea175c8422d9e9f"
zotprime-zotprime-minio-1          | Location: http://localhost:8082/zotero/a6453f35c17fb9ee7ea175c8422d9e9f
zotprime-zotprime-minio-1          | Server: Minio/RELEASE.2019-01-31T00-31-19Z
zotprime-zotprime-minio-1          | Content-Type: application/xml
zotprime-zotprime-minio-1          | X-Xss-Protection: 1; mode=block
zotprime-zotprime-minio-1          | Content-Security-Policy: block-all-mixed-content
zotprime-zotprime-minio-1          | X-Amz-Request-Id: 175CBF882B55ABAF
zotprime-zotprime-minio-1          | Vary: Origin
zotprime-zotprime-minio-1          | Accept-Ranges: bytes
zotprime-zotprime-minio-1          | 
zotprime-zotprime-minio-1          | <?xml version="1.0" encoding="UTF-8"?>
zotprime-zotprime-minio-1          | <PostResponse><Bucket>zotero</Bucket><Key>a6453f35c17fb9ee7ea175c8422d9e9f</Key><ETag>&#34;a6453f35c17fb9ee7ea175c8422d9e9f&#34;</ETag><Location>http://localhost:8082/zotero/a6453f35c17fb9ee7ea175c8422d9e9f</Location></PostResponse>
zotprime-zotprime-minio-1          | 
zotprime-zotprime-dataserver-1     | 07/May/2023:10:42:32   127.0.0.1   0.0.0.0 8082    minio   9000    0   0   opened
zotprime-zotprime-minio-1          | [REQUEST objectAPIHandlers.HeadBucketHandler-fm] [168343095.242986] [2023-05-07 10:42:32 +0700]
zotprime-zotprime-minio-1          | HEAD /a6453f35c17fb9ee7ea175c8422d9e9f
zotprime-zotprime-minio-1          | Host: zotero.localhost:8082
zotprime-zotprime-minio-1          | X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
zotprime-zotprime-minio-1          | X-Amz-Date: 20230507T034232Z
zotprime-zotprime-minio-1          | Authorization: AWS4-HMAC-SHA256 Credential=zotero/20230507/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-user-agent, Signature=e17db5075b833beac28f7838f555f66d2d9854c161c8e0ffa014cd980667a87b
zotprime-zotprime-minio-1          | User-Agent: aws-sdk-php/3.257.5 OS/Linux/6.1.14-200.fc37.x86_64 lang/php/8.1.18 GuzzleHttp/7
zotprime-zotprime-minio-1          | X-Amz-User-Agent: aws-sdk-php/3.257.5 OS/Linux/6.1.14-200.fc37.x86_64 lang/php/8.1.18
zotprime-zotprime-minio-1          | Aws-Sdk-Invocation-Id: 34c994994af1163b16cef8f14e311d52
zotprime-zotprime-minio-1          | Aws-Sdk-Retry: 0/0
zotprime-zotprime-minio-1          | 
zotprime-zotprime-minio-1          | 
zotprime-zotprime-minio-1          | [RESPONSE] [168343095.242986] [2023-05-07 10:42:32 +0700]
zotprime-zotprime-minio-1          | 404 Not Found
zotprime-zotprime-minio-1          | X-Minio-Deployment-Id: 9fd3eb2a-f261-4ac5-93d1-13a782587cd9
zotprime-zotprime-minio-1          | Server: Minio/RELEASE.2019-01-31T00-31-19Z
zotprime-zotprime-minio-1          | Accept-Ranges: bytes
zotprime-zotprime-minio-1          | Vary: Origin
zotprime-zotprime-minio-1          | X-Xss-Protection: 1; mode=block
zotprime-zotprime-minio-1          | Content-Security-Policy: block-all-mixed-content
zotprime-zotprime-minio-1          | X-Amz-Request-Id: 175CBF883379BA01
zotprime-zotprime-minio-1          | 
zotprime-zotprime-minio-1          | 
zotprime-zotprime-minio-1          | [REQUEST objectAPIHandlers.ListBucketsHandler-fm] [168343095.243458] [2023-05-07 10:42:32 +0700]
zotprime-zotprime-minio-1          | GET /?max-keys=1&prefix=a6453f35c17fb9ee7ea175c8422d9e9f&encoding-type=url
zotprime-zotprime-minio-1          | Host: zotero.localhost:8082
zotprime-zotprime-minio-1          | X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
zotprime-zotprime-minio-1          | X-Amz-Date: 20230507T034232Z
zotprime-zotprime-minio-1          | Authorization: AWS4-HMAC-SHA256 Credential=zotero/20230507/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-user-agent, Signature=b20ea6c32252bd2a8066a9f24820107d2d0624fe5892be397ce6777af293314a
zotprime-zotprime-minio-1          | User-Agent: aws-sdk-php/3.257.5 OS/Linux/6.1.14-200.fc37.x86_64 lang/php/8.1.18 GuzzleHttp/7
zotprime-zotprime-minio-1          | X-Amz-User-Agent: aws-sdk-php/3.257.5 OS/Linux/6.1.14-200.fc37.x86_64 lang/php/8.1.18
zotprime-zotprime-minio-1          | Aws-Sdk-Invocation-Id: 885b71243e7230629bf77902267d39ba
zotprime-zotprime-minio-1          | Aws-Sdk-Retry: 0/0
zotprime-zotprime-minio-1          | 
zotprime-zotprime-minio-1          | 
zotprime-zotprime-minio-1          | [RESPONSE] [168343095.243458] [2023-05-07 10:42:32 +0700]
zotprime-zotprime-minio-1          | 200 OK
zotprime-zotprime-minio-1          | Content-Type: application/xml
zotprime-zotprime-minio-1          | Vary: Origin
zotprime-zotprime-minio-1          | X-Xss-Protection: 1; mode=block
zotprime-zotprime-minio-1          | Content-Security-Policy: block-all-mixed-content
zotprime-zotprime-minio-1          | X-Amz-Request-Id: 175CBF8833C24AE9
zotprime-zotprime-minio-1          | X-Minio-Deployment-Id: 9fd3eb2a-f261-4ac5-93d1-13a782587cd9
zotprime-zotprime-minio-1          | Server: Minio/RELEASE.2019-01-31T00-31-19Z
zotprime-zotprime-minio-1          | Accept-Ranges: bytes
zotprime-zotprime-minio-1          | 
zotprime-zotprime-minio-1          | <?xml version="1.0" encoding="UTF-8"?>
zotprime-zotprime-minio-1          | <ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>02d6176db174dc93cb1b899f7c6078f08654445fe8cf1b6ce98d8855f66bdbf4</ID><DisplayName></DisplayName></Owner><Buckets><Bucket><Name>zotero</Name><CreationDate>2023-05-07T03:42:32.295Z</CreationDate></Bucket><Bucket><Name>zotero-fulltext</Name><CreationDate>2023-05-07T03:41:34.997Z</CreationDate></Bucket></Buckets></ListAllMyBucketsResult>
zotprime-zotprime-minio-1          | 
zotprime-zotprime-dataserver-1     | [Sun May 07 10:42:32.437324 2023] [php:notice] [pid 33] [client 172.24.0.1:37746] Remote file a6453f35c17fb9ee7ea175c8422d9e9f/Test - 1111 - test.pdf not found
zotprime-zotprime-dataserver-1     | 07/May/2023:10:42:32   127.0.0.1   0.0.0.0 8082    minio   9000    1410    1167    done-remote-closed
[JavaScript Error: "Unexpected file registration status 400 (1/E2Q2BCQ4)"]

[JavaScript Error: "Remote file not found"]

[JavaScript Error: "Upload request 1/E2Q2BCQ4 failed"]

[JavaScript Error: "A file sync error occurred. Please try syncing again.

If you receive this message repeatedly, restart Zotero and/or your computer and try again. If you continue to receive the message, submit an error report and post the Report ID to a new thread in the Zotero Forums." {file: "chrome://zotero/content/xpcom/storage/zfs.js" line: 791}]

[JavaScript Error: "HTTP POST http://localhost:8080/users/1/items/E2Q2BCQ4/file failed with status code 400:

Remote file not found"]
uniuuu commented 1 year ago

In the latest minio:

2023-05-07T14:45:16.155 [201 Created] s3.PostPolicyBucket localhost:8082/zotero/ 172.30.0.12       24.823ms     ↑ 45 KiB ↓ 271 B
2023-05-07T14:45:16.324 [OS] os.Lstat 127.0.0.1:9000 /data/0509993cabcbf53ef209a764f09de102 9.409µs
2023-05-07T14:45:16.324 [404 Not Found] s3.HeadBucket zotero.localhost:8082/0509993cabcbf53ef209a764f09de102 172.30.0.12       374µs       ↑ 130 B ↓ 0 B
2023-05-07T14:45:16.331 [OS] os.OpenFileR 127.0.0.1:9000 /data 23.54µs
2023-05-07T14:45:16.331 [STORAGE] storage.ListVols 127.0.0.1:9000 /data / 47.926µs
2023-05-07T14:45:16.330 [200 OK] s3.ListBuckets zotero.localhost:8082/?max-keys=1&prefix=0509993cabcbf53ef209a764f09de102&encoding-type=url  172.30.0.12       633µs       ↑ 130 B ↓ 462 B
2023-05-07T14:45:16.563 [OS] os.Lstat 127.0.0.1:9000 /data/1 9.952µs
2023-05-07T14:45:16.563 [404 Not Found] s3.PutObject zotero-fulltext.localhost:8082/1/763DY57Y 172.30.0.12       613µs       ↑ 163 B ↓ 330 B
uniuuu commented 1 year ago

Fixed by https://github.com/uniuuu/zotprime/commit/a58235ce29d72f78a3b84eeae9356b13d94ef66d

References:

  1. https://github.com/piernov/zotprime/commit/60e64e0f1c00e0f57f2ed19796e7ed3f4c8f768b
  2. https://stackoverflow.com/questions/54825127/aws-s3-url-is-different-from-the-original-one