Closed gkc closed 2 years ago
import 'dart:io';
import 'package:at_client/at_client.dart'; import 'package:at_client/src/manager/at_client_manager.dart'; import 'package:at_utils/at_logger.dart';
import 'dart:convert'; import 'dart:typed_data'; import 'package:crypto/crypto.dart';
void main() async { AtSignLogger.root_level = 'finest'; final atSign = 'alice'; var atClientManager = await AtClientManager.getInstance() .setCurrentAtSign(atSign, 'wavi', _getPreference()); try { while (true) { print('sync in progress'); var a = await atClientManager.syncService.isInSync(); print('Are we waiting ?' + a.toString()); sleep(Duration(seconds: 5)); } } on Exception catch(e, trace) { print(e); print(trace); } print('OK Ready'); }
AtClientPreference _getPreference() {
var preference = AtClientPreference();
preference.hiveStoragePath = '/home/murali/work/2020/hive/client';
preference.commitLogPath = '/home/murali/work/2020/hive/client/commit';
preference.isLocalStoreRequired = true;
preference.privateKey =
'
}
List
String _getShaForAtSign(String atsign) { var bytes = utf8.encode(atsign); return sha256.convert(bytes).toString(); }
@gkc above code doesn't complete successfully with trunk branch of at_client pointing to your branch of at_lookup quickFixAtLookupRaceCondition In _processSyncRequests() _syncInProgress = true; final serverCommitId = await _getServerCommitId();// stats:3 request probably is sent(unable to confirm since server has only INFO logs). The response is not received and _syncInProgress never gets set to false.
@gkc above code doesn't complete successfully with trunk branch of at_client pointing to your branch of at_lookup quickFixAtLookupRaceCondition In _processSyncRequests() _syncInProgress = true; final serverCommitId = await _getServerCommitId();// stats:3 request probably is sent(unable to confirm since server has only INFO logs). The response is not received and _syncInProgress never gets set to false.
@gkc after running the tests multiple times I figured that issue happens even without your code changes..Issue requires a fix in SyncServiceImpl.
Yep it's unrelated
Closing - fixed by #139 and new at_lookup package 3.0.8 published
Describe the bug
AtLookupImpl._process()
does a few things - authenticates if necessary, sends a command, reads a responseTo Reproduce
Expected behaviour
Fixed by #139