Build Issue with Latest httpclient SDK
Les mainteneurs répondent en général sous 3 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 40/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Java
- Étoiles
- 103
- Forks
- 23
- Merge moyen
- 5 j 8 h
- PR mergées (30 j)
- 3
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de Backblaze/b2-sdk-java
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Backblaze/b2-sdk-java#248 ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
Backblaze/b2-sdk-java#247 ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Backblaze/b2-sdk-java#246 ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Backblaze/b2-sdk-java#245 ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Backblaze/b2-sdk-java#242 ·
Les mainteneurs répondent en général sous 3 jours
Toutes les issues de Backblaze/b2-sdk-java
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
IETF-Hackathon/pqc-certificates#351 ·
Les mainteneurs répondent en général sous 2 jours
-
bug(core): skip_nodes.json is missing SELECT and PRE, causing Python and Java to insert separators into dropdown options and preformatted textPeut-être pris @Bhumit267 l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour
-
ExceptionThrowShouldUseContext: NullPointerException on a catch block inside an annotation typePeut-être pris @Carbon14-48 l’a pris aujourd’hui. Ouverteapproved
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
checkstyle/checkstyle#22784 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 1 jour