Repository: libgdx/libgdx

Issue #2761: Http requests crush in distribution
Created: 2015-01-21T09:49:21Z
PathClassLoader: can't find '/private/var/mobile/Containers/Bundle/Application/1C6C0CD8-A7C8-4179-ABCE-78FB732FFF37/IOSLauncher.app/lib/boot/robovm-cacerts-full.jar'
java.lang.ExceptionInInitializerError
at com.android.org.conscrypt.TrustedCertificateKeyStoreSpi.(TrustedCertificateKeyStoreSpi.java)
at java.lang.reflect.Constructor.internalNewInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java)
at java.lang.Class.newInstance(Class.java)
at java.security.Provider$Service.newInstance(Provider.java)
at org.apache.harmony.security.fortress.Engine.getInstance(Engine.java)
at java.security.KeyStore.getInstance(KeyStore.java)
at com.android.org.conscrypt.TrustManagerFactoryImpl.engineInit(TrustManagerFactoryImpl.java)
at javax.net.ssl.TrustManagerFactory.init(TrustManagerFactory.java)
at com.android.org.conscrypt.SSLParametersImpl.createDefaultTrustManager(SSLParametersImpl.java)
at com.android.org.conscrypt.SSLParametersImpl.getDefaultTrustManager(SSLParametersImpl.java)
at com.android.org.conscrypt.SSLParametersImpl.(SSLParametersImpl.java)
at com.android.org.conscrypt.SSLParametersImpl.getDefault(SSLParametersImpl.java)
at com.android.org.conscrypt.OpenSSLSocketFactoryImpl.(OpenSSLSocketFactoryImpl.java)
at java.lang.reflect.Constructor.internalNewInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java)
at java.lang.Class.newInstance(Class.java)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java)
at javax.net.ssl.HttpsURLConnection$NoPreloadHolder.(HttpsURLConnection.java)
at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(HttpsURLConnection.java)
at com.android.okhttp.OkHttpClient.copyWithDefaults(OkHttpClient.java)
at com.android.okhttp.OkHttpClient.open(OkHttpClient.java)
at com.android.okhttp.OkHttpClient.open(OkHttpClient.java)
at com.android.okhttp.HttpHandler.openConnection(HttpHandler.java)
at java.net.URL.openConnection(URL.java)
at com.badlogic.gdx.net.NetJavaImpl.sendHttpRequest(NetJavaImpl.java)
at com.badlogic.gdx.backends.iosrobovm.IOSNet.sendHttpRequest(IOSNet.java)
at com.mygdx.game.MyGdxGame.create(MyGdxGame.java)
at com.badlogic.gdx.backends.iosrobovm.IOSGraphics.draw(IOSGraphics.java)
at com.badlogic.gdx.backends.iosrobovm.IOSGraphics$1.draw(IOSGraphics.java)
at org.robovm.apple.uikit.UIView.$cb$drawRect$(UIView.java)
at org.robovm.apple.uikit.UIApplication.main(Native Method)
at org.robovm.apple.uikit.UIApplication.main(UIApplication.java)
at com.mygdx.game.IOSLauncher.main(IOSLauncher.java)
Caused by: java.lang.NullPointerException
at com.android.org.conscrypt.TrustedCertificateStore.(TrustedCertificateStore.java)
Libgdx 1.5.3
Robovm 1.0.0.b3
call Gdx.net.sendHttpRequest
Run as iOS Device APP is OK
but Pack to IPA and Run Will Throw This Error

Duplicate issue #2773: Gdx.net.sendHttpRequest not work after  Package for App Store/Ad-Hoc distribution...
Created: 2015-01-24T03:28:00Z
Gdx.net.sendHttpRequest working (eclipse choose): run as ios Simulator, run as ios device.
but when i Package for App Store/Ad-Hoc distribution, run on device and Gdx.net.sendHttpRequest  does not working.
libgdx version 1.5.3
RoboVM 1.0.0 beta 3
this is my code:
public void F_GetMoreApp() {
try {
HttpResponseListener httpResponseListener = new HttpResponseListener() {
            @Override
            public void handleHttpResponse(HttpResponse httpResponse) {
                // TODO Auto-generated method stub

                if (httpResponse.getStatus().getStatusCode() == HttpStatus.SC_OK) {
                    try {

                        String str = httpResponse.getResultAsString();
                        Element root = new XmlReader().parse(str);
                        try {
                            Array<Element> array = root.getChildByName(
                                    "MOREAPP").getChildrenByName("APP");
                            if (array != null && array.size > 0) {

                                F_ShowMoreApp(array);

                            }

                            else
                                F_LoadFail();
                        } catch (Exception e) {
                            F_LoadFail();
                        }
                    } catch (Exception e) {
                        F_LoadFail();
                    }
                } else {
                    F_LoadFail();
                }
            }

            @Override
            public void failed(Throwable t) {
                // TODO Auto-generated method stub

                F_LoadFail();
            }

            @Override
            public void cancelled() {
                // TODO Auto-generated method stub

                F_LoadFail();
            }
        };

        String linkmoreapp = "http://www.huesoft.com.vn/huesoftmobile/hsmoreapp";
        if (mGame.mOSType == MyOSType.ANDROID)
            linkmoreapp = "http://www.huesoft.com.vn/huesoftmobile/moreapp/android";
        if (mGame.mOSType == MyOSType.IOS)
            linkmoreapp = "http://www.huesoft.com.vn/huesoftmobile/moreapp/ios";


        HttpRequest mHttpRequest = new HttpRequest(HttpMethods.GET);
        mHttpRequest.setHeader("Content-Type",
                "application/xml;charset='UTF-8'");
        mHttpRequest.setUrl(linkmoreapp);

        Gdx.net.sendHttpRequest(mHttpRequest, httpResponseListener);
    } catch (Exception e) {
        F_LoadFail();
    }
}

Former: I use libgdx 1.4.1 and robovm 1.0.0-alpha-04. it does working all

Closing comment (2015-01-24T03:32:46Z): Duplicate #2761