Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

update 1.5 sync urls #259 #260

Merged
merged 7 commits into from
Oct 15, 2022
Merged

update 1.5 sync urls #259 #260

merged 7 commits into from
Oct 15, 2022

Conversation

ddvk
Copy link
Collaborator

@ddvk ddvk commented Oct 7, 2022

No description provided.

@arjenpdevries
Copy link

arjenpdevries commented Oct 7, 2022

Trying out the pull request, I get a different error:

ERROR: 2022/10/07 18:36:35 main.go:19: Error:  Failed to upload file [/home/arjen/Downloads/tree-movers-distance-2210.01906.pdf] PutBlobStream: got status code 400

Reverting the modification, I get the other error:

ERROR: 2022/10/07 18:42:10 apictx.go:431: cannot send sync request failed with status 500

The pull request did not succeed in uploading the file, the version from main does (in spite of the error reported).

- remove implicit slice wrapping
@ddvk
Copy link
Collaborator Author

ddvk commented Oct 7, 2022

ok, then the urls were correct , just the request was wrong

@ddvk
Copy link
Collaborator Author

ddvk commented Oct 7, 2022

can you try again?

@arjenpdevries
Copy link

Back to ERROR: 2022/10/08 15:51:39 apictx.go:431: cannot send sync request failed with status 500.

@ddvk
Copy link
Collaborator Author

ddvk commented Oct 8, 2022

I'm giving up for now, it could be it got migrated on their end, so we have to use the new urls.
And using the new urls results in 400 which meaning something is missing

@arjenpdevries
Copy link

The interesting thing is that the file does get uploaded correctly, as far as I can assess. So the 500 may just be something in the protocol that we do not know/understand.

@arjenpdevries
Copy link

arjenpdevries commented Oct 8, 2022

In SyncComplete of blobstorage.go, the http.Post call has nil as final argument, where in other occurrences of http.Post the code uses the address of a variable res of type model.BlobStorageResponse.

(After checking: that is not the problem. But I'm not a go coder, so my check could be incomplete.)

@ddvk
Copy link
Collaborator Author

ddvk commented Oct 8, 2022

so I've reverted to using the agein new urls and trying to find out why the error occurs. did some more changes,

you can try again. also enable tracing:
export RMAPI_TRACE=1 before running rmapi

@arjenpdevries
Copy link

ERROR: 2022/10/08 19:28:30 main.go:19: Error:  Failed to upload file [/home/arjen/Downloads/tree-movers-distance-2210.01906.pdf] PutBlobStream: got status code 400

The trace ends in:

Trace: 2022/10/08 19:30:06 transport.go:312: PutBlobSteam: Response: HTTP/2.0 400 Bad Request
Content-Length: 282
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Content-Type: application/xml; charset=UTF-8
Date: Sat, 08 Oct 2022 17:30:06 GMT
Server: UploadServer
X-Guploader-Uploadid: ADPycdv1lT8hjS6TVwYdwrP8-GqtCo72eQYrJ0_lchTF0-r5QOOu1Ai5XwSvRN-ABlwLiOVbkekKfWLFaz3m6kb69POIYDfVrZN3

<?xml version='1.0' encoding='UTF-8'?><Error><Code>MalformedSecurityHeader</Code><Message>Your request has a malformed header.</Message><ParameterName>x-goog-content-length-range</ParameterName><Details>Header was included in signedheaders, but not in the request.</Details></Error> <nil>

@ddvk
Copy link
Collaborator Author

ddvk commented Oct 8, 2022

in the trace can you post the response of the /upload request before that, should be a json, the one that has "url":"some google address"

@ddvk
Copy link
Collaborator Author

ddvk commented Oct 8, 2022

thanks a lot, please remove it, asap. there are some tokens in the dump (that expire after 24h)

@arjenpdevries
Copy link

arjenpdevries commented Oct 8, 2022

(Just for the record: removed link to file, and access rights.)

The trace is from a single rmapi put command that uploads an empty file created with touch empty.pdf.

@ddvk
Copy link
Collaborator Author

ddvk commented Oct 8, 2022

ok, added the findings

@arjenpdevries
Copy link

arjenpdevries commented Oct 8, 2022

Still a problem... a new trace file at the previous location - for say 10 minutes!

For convenience: if you have matrix, I'm at @arjenpdevries:matrix.org

@ddvk
Copy link
Collaborator Author

ddvk commented Oct 8, 2022

i'll get back to you, when I have time

@ddvk ddvk merged commit 58deab4 into juruen:master Oct 15, 2022
@arjenpdevries
Copy link

Tnx @ddvk

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants