Build Issue with Latest httpclient SDK
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by reading the HTTP client construction path shown in the stack trace, especially HttpClientFactoryImpl and B2WebApiHttpClientImpl, and inspect how the SDK’s HTTP client dependency is configured. Reproduce the failure on Android with version 6.2.0 and compare it with the reported working 3.1.0 setup. Done means the SDK can upload from Android without this verifier linkage error while preserving hostname verification.
由索引模型根据 Issue 内容生成。
描述
I am using Kotlin and using latest version 6.2.0
When trying to upload file from the app, i am getting following error:
FATAL EXCEPTION: DefaultDispatcher-worker-6
Process: app.amazeai.android, PID: 28754
java.lang.NoSuchFieldError: No static field INSTANCE of type Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; in class Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; or its superclasses (declaration of 'org.apache.http.conn.ssl.AllowAllHostnameVerifier' appears in /system/framework/framework.jar!classes5.dex)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:151)
at com.backblaze.b2.client.webApiHttpClient.HttpClientFactoryImpl$Builder.createConnectionManager(HttpClientFactoryImpl.java:196)
at com.backblaze.b2.client.webApiHttpClient.HttpClientFactoryImpl$Builder.build(HttpClientFactoryImpl.java:160)
at com.backblaze.b2.client.webApiHttpClient.HttpClientFactoryImpl.build(HttpClientFactoryImpl.java:66)
at com.backblaze.b2.client.webApiHttpClient.B2WebApiHttpClientImpl.<init>(B2WebApiHttpClientImpl.java:59)
at com.backblaze.b2.client.webApiHttpClient.B2WebApiHttpClientImpl.<init>(B2WebApiHttpClientImpl.java:49)
at com.backblaze.b2.client.webApiHttpClient.B2WebApiHttpClientImpl$Builder.build(B2WebApiHttpClientImpl.java:380)
at com.backblaze.b2.client.webApiHttpClient.B2StorageHttpClientBuilder.build(B2StorageHttpClientBuilder.java:68)
at com.backblaze.b2.client.webApiHttpClient.B2StorageHttpClientFactory.create(B2StorageHttpClientFactory.java:21)
at com.backblaze.b2.client.B2StorageClientFactoryPathBasedImpl.create(B2StorageClientFactoryPathBasedImpl.java:69)
at com.backblaze.b2.client.B2StorageClientFactory.create(B2StorageClientFactory.java:44)
at app.amazeai.android.data.repository.ImageRepositoryImpl.uploadFileToBackblaze(ImageRepository.kt:64)
at app.amazeai.android.ui.chats.ChatBoardViewModel$runImageGenerateApi$1$1$1.invokeSuspend(ChatBoardViewModel.kt:885)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@fcebd38, Dispatchers.IO]
I read (AllowAllHostnameVerifier) is gone for a very good reason: it is a security flaw. If you add it, your app is likely to be rejected for distribution on the Play Store
Reference: https://stackoverflow.com/questions/76276666/how-to-fix-no-static-field-instance-of-type-lorg-apache-http-conn-ssl-allowallh
How to fix this?
When i use version 3.1.0 with okhttp its working fine except mime type is not updated.
- 主要语言
- Java
- 星标
- 103
- 派生
- 23
- 平均合并
- 5 天 8 小时
- 30 天内合并 PR
- 3
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Backblaze/b2-sdk-java 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
Backblaze/b2-sdk-java#248 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
Backblaze/b2-sdk-java#247 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
Backblaze/b2-sdk-java#246 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
Backblaze/b2-sdk-java#245 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
Backblaze/b2-sdk-java#242 ·
维护者通常 3 天内回复
查看 Backblaze/b2-sdk-java 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
IETF-Hackathon/pqc-certificates#351 ·
维护者通常 2 天内回复
-
bug(core): skip_nodes.json is missing SELECT and PRE, causing Python and Java to insert separators into dropdown options and preformatted text可能已有人在做 @Bhumit267 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
ExceptionThrowShouldUseContext: NullPointerException on a catch block inside an annotation type可能已有人在做 @Carbon14-48 今天认领。 未关闭approved
难度 2/5 1-3 小时 新手友好度 72/100
checkstyle/checkstyle#22784 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复