Q: Adding Metadata with Invalid Characters I'm trying to upload a file in Firebase Storage. The problem is that by adding a StorageMetadata with a name field containing Muñoz fails everytime. The reason I think is because it contains an invalid character, the metadata that is the ñ. I would like to know how I can pass this word to a valid format? Thank you
This is the piece of code:
StorageMetadata metadata = new StorageMetadata.Builder()
.setCustomMetadata("avatar",mFirebaseUser.getPhotoUrl().toString())
.setCustomMetadata("nombre","Muñoz") .setContentType("image/jpg")
.build();

I tried to pass the string to utf-8 and still no go. The error I get me after about 20 minutes while waiting for the app is:
The operation retry limit has-been exceeded.

If I try with a character that does not have it ñ, it works. The Log returns me this recursively:
09-08 21:33:08.405 3019-3444/cf.castellon.turistorre W/NetworkRequest: error sending network request POST https://firebasestorage.googleapis.com/v0/b/project-1031372115432573568.appspot.com/o
                                                                       java.net.ProtocolException: exceeded content-length limit of 186 bytes
                                                                           at com.android.okhttp.internal.http.RetryableSink.write(RetryableSink.java:58)
                                                                           at com.android.okhttp.okio.RealBufferedSink.close(RealBufferedSink.java:234)
                                                                           at com.android.okhttp.okio.RealBufferedSink$1.close(RealBufferedSink.java:209)
                                                                           at java.io.OutputStreamWriter.close(OutputStreamWriter.java:144)
                                                                           at bzr.a(:com.google.android.gms.DynamiteModulesC:364)
                                                                           at bzr.b(:com.google.android.gms.DynamiteModulesC:246)
                                                                           at bzr.a(:com.google.android.gms.DynamiteModulesC:270)
                                                                           at bzl.onTransact(:com.google.android.gms.DynamiteModulesC:53)
                                                                           at android.os.Binder.transact(Binder.java:387)
                                                                           at com.google.android.gms.internal.zzamj$zza$zza.zzss(Unknown Source)
                                                                           at com.google.android.gms.internal.zzamm.zza(Unknown Source)
                                                                           at com.google.android.gms.internal.zzamd.zza(Unknown Source)
                                                                           at com.google.android.gms.internal.zzamd.zzd(Unknown Source)
                                                                           at com.google.firebase.storage.UploadTask.zzb(Unknown Source)
                                                                           at com.google.firebase.storage.UploadTask.zzcyn(Unknown Source)
                                                                           at com.google.firebase.storage.UploadTask.run(Unknown Source)
                                                                           at com.google.firebase.storage.StorageTask$5.run(Unknown Source)
                                                                           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                           at java.lang.Thread.run(Thread.java:818)
                                                                       --------- beginning of system
09-08 21:33:09.605 3019-3444/cf.castellon.turistorre W/ExponenentialBackoff: network unavailable, sleeping


A: This looks like a unicode bug in our Android SDK (it works in iOS and JS). Presumably we're counting the length of the metadata in one encoding, while transferring the content in a different encoding.
If I had to guess, we're calculating the limit based on the character being composed (length of ñ == 1), but sending it as decomposed (length of ñ  == 2, since it's n˜). We've filed a bug on the Android client and will fix this soon.
