-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GCS get_object fails with charcode conversion error #533
Comments
Looking at https://cloud.google.com/storage/docs/json_api/v1/objects/get#response, I noticed this paragraph:
And in the request URL, we indeed send So GCS will send back a binary file, and it looks like we then try to parse this as JSON? |
I verified this isn't happening in
It looks like request logs look completely different, not sure why. |
I just noticed that in 1.14 the I wonder if it's related. |
Maybe not related. I tested with those changes reverted and the problem persists. |
Ok, I reproduced the problem. Indeed, we need to call |
#534 solves this issue. |
Fix released in v1.15.0. |
Thank you @geemus ! 🙇 |
Broken out of this discussion: https://github.com/fog/fog-google/pull/530/files#r645936386
With
fog-google
1.14.0 we are seeing the following error when using theFile.copy
method and the target object is a binary file (in this case, a Java JAR file):Apparently somewhere in the communication between
client -> fog-google/json-storage -> google-api-ruby-client -> GCS
there is a problem with how byte streams are interpreted.Possibly related problem: googleapis/google-api-ruby-client#74
I believe what is happening here is that somewhere, that binary byte stream is being interpreted as a UTF-8 string, which it is not:
Note how there are multiple sequences containing c4XX multi-byte sequences, which denote certain characters with diacritics in Unicode: https://www.utf8-chartable.de/unicode-utf8-table.pl?start=256
Request logs of the failing request:
The text was updated successfully, but these errors were encountered: