EstimoteDeviceException: 500 Internal Server Error

I’m getting a com.estimote.sdk.exception.EstimoteDeviceException: 500 Internal Server Error when trying to characterize a Beacon. Check the code and logs below:

public class TestActivity2 extends FragmentActivity {
    private final static String TAG = TestActivity.class.getSimpleName();

    private final static String MAC_ADDRESS = "F4:0C:72:13:6D:69";
    private final static String UUID = "d36445c2-4caf-48d4-a050-3b17ff3fc3ab";
    private final static int MAJOR = 501;
    private final static int MINOR = 101;

    private BeaconConnection connection;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        EstimoteSDK.initialize(this, Constants.APP_ID, Constants.APP_TOKEN);
        EstimoteSDK.enableDebugLogging(true);

        connection = new BeaconConnection(this, MAC_ADDRESS, new BeaconConnection.ConnectionCallback() {
            @Override
            public void onAuthenticated(BeaconInfo beaconInfo) {
                Log.d(TAG, "Authenticated");

                connection.edit()
                .set(connection.proximityUuid(), UUID)
                .set(connection.major(), MAJOR)
                .set(connection.minor(), MINOR)
                .commit(new BeaconConnection.WriteCallback() {
                    @Override
                    public void onSuccess() {
                        Log.d(TAG, "Characterization successful!");
                        connection.close();
                    }

                    @Override
                    public void onError(EstimoteDeviceException e) {
                        Log.e(TAG, "Characterization failed!", e);

                        if(connection.isConnected()){
                            connection.close();
                        }
                    }
                });
            }

            @Override
            public void onAuthenticationError(EstimoteDeviceException e) {
                Log.e(TAG, "Authentication error", e);
            }

            @Override
            public void onDisconnected() {
                Log.d(TAG, "Disconnected");
            }
        });
    }

    @Override
    protected void onStart() {
        super.onStart();

        if(!connection.isConnected()){
            connection.authenticate();
        }
    }

    @Override
    protected void onStop() {
        super.onStop();

        if(connection.isConnected()){
            connection.close();
        }
    }
}

08-11 11:59:02.265 19018-19018/com.testapp D/TestActivity﹕ Authenticated
08-11 11:59:03.670 19018-19018/com.testapp E/TestActivity﹕ Characterization failed!
com.estimote.sdk.exception.EstimoteDeviceException: 500 Internal Server Error
at com.estimote.sdk.connection.BeaconConnection$PropertyChanger$1.failure(BeaconConnection.java:587)
at com.estimote.sdk.cloud.internal.InternalEstimoteCloud$4.failure(InternalEstimoteCloud.java:231)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.CallbackRunnable$2.run(CallbackRunnable.java:53)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
Caused by: com.estimote.sdk.exception.EstimoteServerException: 500 Internal Server Error
at com.estimote.sdk.cloud.internal.InternalEstimoteCloud$4.failure(InternalEstimoteCloud.java:231)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.CallbackRunnable$2.run(CallbackRunnable.java:53)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
Caused by: com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.RetrofitError: 500 Internal Server Error
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:387)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.RestAdapter$RestHandler.access$000(RestAdapter.java:219)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.RestAdapter$RestHandler$1.obtainResponse(RestAdapter.java:277)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.CallbackRunnable.run(CallbackRunnable.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.Platform$Android$2$1.run(Platform.java:137)
at java.lang.Thread.run(Thread.java:818)
08-11 11:59:03.675 19018-19018/com.testapp D/TestActivity﹕ Disconnected

@shatazone
We might have regression on our servers. We protect our users that there cannot be the same values of (uuid, major, minor). They need to be unique within our system.

There is problem, that server responds with 500 error code without meaningful error msg.

Can you set to different random values?

Setting uuid, major and minor to random values sometimes fixes the problem.
But I’ve been getting a very high rate of 500 response errors on several beacons during the past week.
Is it something I can solve on my side?

Can you let us know the MAC addresses of the beacons that were the most problematic? We’ll go through our logs and investigate.

Please check you inbox @heypiotr

thanks