2012-11-08 77 views
2

我開發了一個android應用程序,其中圖像和音頻從Amazon S3存儲桶下載。在所有設備(索尼Xperia索拉,宏達Salasa,Micromax功能,三星選項卡2)和Android模擬器它完美下載。Android:無法執行HTTP請求:沒有對等證書

但是,當我嘗試下載圖像和音頻在點燃火災。它給我錯誤像

04-01 03:58:01.148: W/System.err(15854): com.amazonaws.AmazonClientException: Unable to execute HTTP request: No peer certificate 
04-01 03:58:01.148: W/System.err(15854): at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:332) 
04-01 03:58:01.148: W/System.err(15854): at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:167) 
04-01 03:58:01.148: W/System.err(15854): at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:2781) 
04-01 03:58:01.148: W/System.err(15854): at com.amazonaws.services.s3.AmazonS3Client.getObject(AmazonS3Client.java:872) 
04-01 03:58:01.148: W/System.err(15854): at org.Infoware.famouspeople.DownloadThread.run(DownloadThread.java:122) 
04-01 03:58:01.148: W/System.err(15854): Caused by: javax.net.ssl.SSLPeerUnverifiedException: No peer certificate 
04-01 03:58:01.148: W/System.err(15854): at org.apache.harmony.xnet.provider.jsse.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:258) 
04-01 03:58:01.148: W/System.err(15854): at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:93) 
04-01 03:58:01.148: W/System.err(15854): at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381) 
04-01 03:58:01.148: W/System.err(15854): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:164) 
04-01 03:58:01.148: W/System.err(15854): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164) 
04-01 03:58:01.148: W/System.err(15854): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119) 
04-01 03:58:01.148: W/System.err(15854): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:359) 
04-01 03:58:01.148: W/System.err(15854): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555) 
04-01 03:58:01.148: W/System.err(15854): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487) 
04-01 03:58:01.148: W/System.err(15854): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465) 
04-01 03:58:01.148: W/System.err(15854): at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:285) 
04-01 03:58:01.148: W/System.err(15854): ... 4 more 

任何人都可以幫我解決這個問題嗎?

+0

Android的哪個版本支持kindle fire? – Yahor10

+0

@ Yahor10:我用2.3版的kindle fire。在幾天之前,它突然間完全運行,它提供了這種類型的錯誤 – Infoware

+0

@Infoware在URL上有https嗎? – Androyds

回答

0

對我來說,我只是將android版本更改爲4.1並解決問題。請嘗試在您的代碼可能會幫助你。

1

我也有這個問題。事實證明,這是由WiFi路由器上的透明HTTP(S)代理重定向到WiFi登錄頁面引起的。可能值得檢查一下。例如,如果您的WiFi網絡授權超時,錯誤可能會顯示爲間歇性的。

相關問題