如果不与wifi连接,我不能将图像存储在firebase上? Android的

时间:2016-10-01 12:39:19

标签: android firebase firebase-storage

我可以在firebase上存储带有android手机的图像,如果我在WiFi上连接,但是如果没有连接我就无法保存图像。

error sending network request POST https://firebasestorage.googleapis.com/v0/b/pickapp-b9a6b.appspot.com/o?name=f3418342-acc0-459b-bca7-a365d2c9f626&uploadType=resumable&upload_id=AEnB2UqtvcU9MorOeJqDIQG3072nF0mr-4V1Ygrt5us4zgvnP_7gEZI-poyho8dXckMMPDAFcw7YQUftQZkWGCVoe7JINswASA&upload_protocol=resumable
java.io.IOException: Unexpected response code for CONNECT: 405
at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.makeTunnel(HttpsURLConnectionImpl.java:517)
at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:471)
at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:433)
at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:290)
at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:240)
at libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:81)
at libcore.net.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:205)
at libcore.net.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:281)
at bzr.a(:com.google.android.gms.DynamiteModulesC:368)
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:310)
at com.google.android.gms.internal.zzajq$zza$zza.zziL(Unknown Source)
at com.google.android.gms.internal.zzajt.zza(Unknown Source)
at com.google.firebase.storage.UploadTask.zza(Unknown Source)
at com.google.firebase.storage.UploadTask.zzVj(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:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:838)

1 个答案:

答案 0 :(得分:0)

我真的很惊讶你有一个static _mockSubscription(mockStore) { var mappedStream = getStream(); var filteredStream = getStream(); var signUpMapPredicate = predicate((f) { var data = new SignUpData(); var state = new State({'signUp': data}); return f(state) == data; }); when(mockStore.map(signUpMapPredicate)).thenReturn(mappedStream); when(mappedStream.where(notNullPredicate)).thenReturn(filteredStream); return filteredStream; 回来,因为AFAIK,我们(GCS)没有返回import 'package:test/test.dart'; get notNullPredicate => predicate((f) => f(null) == false); (见enter image description here)。这可能是代理或防火墙阻止您上传或更改请求的问题吗?