Unable to connect to Particle Cloud on Android (Wear)

Hi all,

I’m creating an application for an Android Wear 2.0 smartwatch.
The SDK is included in my application and I successfully compile the application.
Since Android Wear 2 supports direct internet access from the watch, it should be possible to connect to the Particle Cloud.

However, I’m having the following issue:

Error calling API: Unable to connect to the server.
io.particle.android.sdk.cloud.ParticleCloudException
at io.particle.android.sdk.cloud.ParticleCloud.logIn(ParticleCloud.java:161)
(left the rest of the stack out)

I’m doing an Async operation from the main thread as is recommended in the Particle documentation.
Also, I’ve wrapped the call in a condition that checks if an internet connection is available.
See code below:

Call made from main

public void initConnection(){
    if(mParticleInteractor.hasInternetConnection()) {
        mParticleInteractor.loginToParticleCloud();
    }
}

Class implements ParticleInteractor (interface)

public ParticleInteractorImpl(Context context) {
        mContext = context;
        ParticleCloudSDK.init(context);
        mParticleCloud = ParticleCloudSDK.getCloud();
    }

    public boolean hasInternetConnection(){
        ConnectivityManager cm =
                (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE);

        NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
        boolean isConnected = activeNetwork != null &&
                activeNetwork.isConnectedOrConnecting();

        Log.w("Network","Internet connection active: " + String.valueOf(isConnected));
        return isConnected;
    }

    @Override
    public void loginToParticleCloud() {
        Async.executeAsync(mParticleCloud, new Async.ApiWork<ParticleCloud, Object>() {

            public Integer callApi(ParticleCloud particleCloud) throws ParticleCloudException {
                Log.i("Network","Attempting to connect to Particle Cloud");
                particleCloud.logIn("xxx"xxx");
                Log.i("Network","Particle Login Completed");
                List<ParticleDevice> devices = particleCloud.getDevices();

The stack reports the following:

06-09 09:52:50.842 10759-10759/? W/Network: Internet connection active: true
06-09 09:52:50.847 10759-10777/gtx.go2start I/Network: Attempting to connect to Particle Cloud

And after a while the connection times out with the error reported in the top.

There is no further information about the error given from the API so it’s hard to debug.
Any ideas are more than welcome!

Magically, the issue has disappeared.
No change to the code made.

Issue with your servers the last 2 days perhaps?