Doesn't work on few devices
I have Nexus and Xiaomi device but this code works on Nexus but not on other device.
I tried logging but no help!! Please resolve or suggest something.
Thanks,
Can you provide me with the error messages / stack trace that you are receiving? It would also be helpful for you to provide me with the steps to reproduce the issue.
Step1. running app on Nexus6 device. Step2. logging-in/Register with email password Step-3 app has been redirected to MainActivity
so in the above process no error at all.
Step1. running app on Xiaomi Redmi3s device. Step2. logging-in/Register with email password Step3. app is stuck on Connection Progress dialog.
I tried debugging the code where its failing so i have found this below code which is not executing and going to onFail without any error. BUserWrapper.java->Promise
public Promise<BUser, BError, Void> once(){
final Deferred<DataSnapshot, BError, Void> deferred = new DeferredObject<>();
final Deferred<BUser, BError, Void> promise = new DeferredObject<>();
DatabaseReference ref = ref();
if (DEBUG) Timber.v("once, EntityID: %s, Ref Path: %s", entityId, ref.toString());
ref.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot snapshot) {
if (DEBUG) Timber.v("once, onDataChange");
deferred.resolve(snapshot);
}
@Override
public void onCancelled(DatabaseError firebaseError) {
if (DEBUG) Timber.v("once, onCancelled");
deferred.reject(BFirebaseNetworkAdapter.getFirebaseError(firebaseError));
}
});
deferred.done(new DoneCallback<DataSnapshot>() {
@Override
public void onDone(DataSnapshot snapshot) {
deserialize((Map<String, Object>) snapshot.getValue());
promise.resolve(model);
}
}).fail(new FailCallback<BError>() {
@Override
public void onFail(BError bError) {
promise.reject(bError);
}
});
return promise;
}
in above code it doesn't execute ref.addListenerForSingleValueEvent and deferred.done(new DoneCallback
I could debug this much only, didnt find any root cause of it. kindly please check and let me know. Thanks.
bensmiley i have my issues can you help me
This needs to be re-tested with v4.0 and reopened if necessary.