プロジェクト

全般

プロフィール

バグ #466

みぞ @mizo0203 さんがほぼ6年前に更新

発生端末: Emulator Pixel_2_API_28 

 ``` 
 2018-11-29 08:29:06.433 5600-5640/com.mizo0203.natureremoapisample W/System.err: java.io.IOException: Cleartext HTTP traffic to 192.168.1.23 not permitted 
 2018-11-29 08:29:06.433 5600-5640/com.mizo0203.natureremoapisample W/System.err:       at com.android.okhttp.HttpHandler$CleartextURLFilter.checkURLPermitted(HttpHandler.java:115) 
 2018-11-29 08:29:06.434 5600-5640/com.mizo0203.natureremoapisample W/System.err:       at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:458) 
 2018-11-29 08:29:06.434 5600-5640/com.mizo0203.natureremoapisample W/System.err:       at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:127) 
 2018-11-29 08:29:06.434 5600-5640/com.mizo0203.natureremoapisample W/System.err:       at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:258) 
 2018-11-29 08:29:06.434 5600-5640/com.mizo0203.natureremoapisample W/System.err:       at com.mizo0203.natureremoapisample.util.HttpUtils.post(HttpUtils.java:49) 
 2018-11-29 08:29:06.435 5600-5640/com.mizo0203.natureremoapisample W/System.err:       at com.mizo0203.natureremoapisample.data.source.NatureRemoLocalApiClient.postMessages(NatureRemoLocalApiClient.java:102) 
 2018-11-29 08:29:06.435 5600-5640/com.mizo0203.natureremoapisample W/System.err:       at com.mizo0203.natureremoapisample.data.source.NatureRemoRepository$6.run(NatureRemoRepository.java:178) 
 2018-11-29 08:29:06.435 5600-5640/com.mizo0203.natureremoapisample W/System.err:       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
 2018-11-29 08:29:06.435 5600-5640/com.mizo0203.natureremoapisample W/System.err:       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
 2018-11-29 08:29:06.436 5600-5640/com.mizo0203.natureremoapisample W/System.err:       at java.lang.Thread.run(Thread.java:764) 
 ``` 

 Nature API v1.0.0 でも発生するかは未確認 
 Android 8.1 Oreo (API level 27) で発生しないことは実機 (SHARP S1) と Emulator で確認済み 

 下記が必要 

 `android:usesCleartextTraffic="true"` 

 https://stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted 
 https://developer.android.com/training/articles/security-config#CleartextTrafficPermitted

戻る