Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit d2b128a

Browse files
Error message was appearing in the wrong moment
1 parent 2540fe7 commit d2b128a

File tree

8 files changed

+18
-9
lines changed

8 files changed

+18
-9
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 3.0.2
2+
- Error message was appearing in the wrong moment
3+
4+
# 3.0.1
5+
- Fix: "Ops, it should perform configure connection first"
6+
17
# 3.0.0
28
Askless was redesigned and is even better! So you can build your App and backend like a pro!
39
- Several bug fixes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pubspec.yaml:
8686
sdk: flutter
8787
8888
# Add this line:
89-
askless: ^3.0.1
89+
askless: ^3.0.2
9090

9191
**5 -** Import the package
9292

lib/constants.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ const REQUEST_PREFIX = 'REQ-';
1414
const LISTEN_PREFIX = 'LIS-';
1515

1616
// TODO onupdate:
17-
const CLIENT_LIBRARY_VERSION_NAME = '3.0.1';
18-
const CLIENT_LIBRARY_VERSION_CODE = 5;
17+
const CLIENT_LIBRARY_VERSION_NAME = '3.0.2';
18+
const CLIENT_LIBRARY_VERSION_CODE = 6;
1919

20-
// TODO onupdate: CHECK README (# Add this line: askless: ^3.0.1)
20+
// TODO onupdate: CHECK README (# Add this line: askless: ^3.0.2)
2121

2222
// TODO onupdate: add changelog

lib/domain/services/authenticate_service.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ class AuthenticateService<USER_ID> {
3838
Future<bool> waitForAuthentication(
3939
{required bool neverTimeout, required bool Function() isPersevere, RequestType? requestType, String? route}) {
4040
if (_authStatus == AuthStatus.authenticated) {
41-
logger(
42-
"(waitForAuthentication) Ops, this shouldn't happen, the App says it is authenticated but the server says is not authenticated",
43-
level: Level.error);
4441
return Future.value(true);
4542
}
4643
final completer = Completer<bool>();

lib/domain/services/requests_service.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ class RequestsService {
149149
request.data.clientRequestId = '${REQUEST_PREFIX}_${randomAlphaNumeric(28)}';
150150
logger("${request.data.getRoute() ?? ''}: NEW clientRequestId IS ${request.data.clientRequestId}, now it will wait for the authentication to finished...");
151151
isAfterAuthentication = true;
152+
if (getIt.get<AuthenticateService>().authStatus == AuthStatus.authenticated) {
153+
logger("(waitForAuthentication, request_service.dart) Ops, this shouldn't happen, the App says it is authenticated but the server says is not authenticated", level: Level.error);
154+
}
152155
final authenticated = await getIt.get<AuthenticateService>().waitForAuthentication(
153156
neverTimeout: neverTimeout,
154157
isPersevere: isPersevere,

lib/index.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ class AsklessClient<USER_ID> {
471471
///
472472
/// [getWebRTCParams] For video and audio calls only. (optional)
473473
///
474-
/// ⚠️ **[Requires configuration, click here to proceed](#video-and-audio-calls)**
474+
/// ⚠️ **[Requires configuration, click here to proceed](https://github.com/RodrigoBertotti/askless-flutter-client/blob/dev/documentation.md#video-and-audio-calls)**
475475
///
476476
/// A function that returns a future object of type `WebRTCParams` which allows you to
477477
/// set `configuration` and `constraints` Map objects from WebRTC,

lib/middleware/ListeningHandler.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ class ListeningHandler {
136136
listenCli.clientRequestId = '${LISTEN_PREFIX}_${randomAlphaNumeric(28)}';
137137
getIt.get<RequestsService>().runOperationInServer(data: listenCli, isPersevere: res.isPersevere, neverTimeout: true, ifRequiresAuthenticationWaitForIt: false).then((firstResponse) {
138138
if (firstResponse.error?.code == AsklessErrorCode.pendingAuthentication) {
139+
if (getIt.get<AuthenticateService>().authStatus == AuthStatus.authenticated) {
140+
logger("(waitForAuthentication ListeningHandler) Ops, this shouldn't happen, the App says it is authenticated but the server says is not authenticated", level: Level.error);
141+
}
139142
getIt.get<AuthenticateService>().waitForAuthentication(neverTimeout: true, isPersevere: res.isPersevere, requestType: RequestType.LISTEN, route: listenCli.route).then((authenticated) {
140143
if (!authenticated){
141144
logger('waitForAuthentication failed', level: Level.error);

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: askless
22
description: Build Flutter Apps with PostgreSQL, MySQL, or any database, stream data changes through websockets effortlessly, handle websocket authentication like a pro and elevate your Flutter Chat App with video and audio calls!
33

4-
version: 3.0.1 # TODO onupdate:
4+
version: 3.0.2 # TODO onupdate:
55

66
environment:
77
sdk: '>=3.1.1 <4.0.0'

0 commit comments

Comments
 (0)