Я хочу показать изображения в представлении переработчика. Но это работает, когда я использую VPN. Без VPN теперь показывается любое изображение. Отображение исключения SocketTime. Я пробовал много способов, но это не работает. Есть какое-нибудь постоянное решение?
Код
@Override
public void onBindViewHolder(@NonNull final ViewHolder holder, int position) {
firebaseUser= FirebaseAuth.getInstance().getCurrentUser();
final Post post=mPost.get(position);
Glide.with(mContext).load(post.getPostimage()).into(holder.post_image);
if(post.getDescription().equals("")){
holder.description.setVisibility(View.GONE);
}else {
holder.description.setVisibility(View.VISIBLE);
holder.description.setText(post.getDescription());
}
Ошибка без VPN: -
W/Glide: Load failed for https://firebasestorage.googleapis.com/v0/b/mfree-9290a.appspot.com/o/posts%2F1585227754335.null?alt=media&token=ffbffb6d-b9ed-47bd-9de6-a3e9d478449b with size [480x854]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
There was 1 cause:
java.net.SocketTimeoutException(failed to connect to firebasestorage.googleapis.com/2404:6800:4007:80f::200a (port 443) from /fec0::25c7:1cfe:a28b:c18 (port 48192) after 2500ms)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, REMOTE
There was 1 cause:
java.net.SocketTimeoutException(failed to connect to firebasestorage.googleapis.com/2404:6800:4007:80f::200a (port 443) from /fec0::25c7:1cfe:a28b:c18 (port 48192) after 2500ms)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetch failed
There was 1 cause:
java.net.SocketTimeoutException(failed to connect to firebasestorage.googleapis.com/2404:6800:4007:80f::200a (port 443) from /fec0::25c7:1cfe:a28b:c18 (port 48192) after 2500ms)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class java.net.SocketTimeoutException: failed to connect to firebasestorage.googleapis.com/2404:6800:4007:80f::200a (port 443) from /fec0::25c7:1cfe:a28b:c18 (port 48192) after 2500ms
2020-04-20 11:42:57.350 6981-6981/com.example.mfree I/Glide: Root cause (1 of 1)
java.net.SocketTimeoutException: failed to connect to firebasestorage.googleapis.com/2404:6800:4007:80f::200a (port 443) from /fec0::25c7:1cfe:a28b:c18 (port 48192) after 2500ms
at libcore.io.IoBridge.connectErrno(IoBridge.java:185)
at libcore.io.IoBridge.connect(IoBridge.java:129)
at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:137)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
at java.net.Socket.connect(Socket.java:621)
at com.android.okhttp.internal.Platform.connectSocket(Platform.java:145)
at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:141)
at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:112)
at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:184)
at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126)
at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:281)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:461)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:127)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:89)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:26)
at com.bumptech.glide.load.data.HttpUrlFetcher.loadDataWithRedirects(HttpUrlFetcher.java:100)
at com.bumptech.glide.load.data.HttpUrlFetcher.loadData(HttpUrlFetcher.java:56)
at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:100)
at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.startNextOrFail(MultiModelLoader.java:164)
at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.onLoadFailed(MultiModelLoader.java:154)
at com.bumptech.glide.load.data.HttpUrlFetcher.loadData(HttpUrlFetcher.java:62)
at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:100)
at com.bumptech.glide.load.engine.SourceGenerator.startNextLoad(SourceGenerator.java:70)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:63)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:310)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:279)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:393)