-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Askless throwing errors #1
Comments
Hello! Thank you for opening the issue I will follow your suggestion of keeping the messages after logging in again after a logout, I will do it and I let you know here To rename the field
I will also check the message thanks for reaching out, any questions let me know |
Many thanks for such a quick reply ! I tried to refactor userId in user-entity.ts, but seems there's also userId used on flutter side. I will review this file by file and try to do it manually. I Wanted to experiment with existing mysql chat database we use for php website at school where colum names are totally different (simple mobile chat would be a great add-on), so I guess there might be some manual work. Would you be so kind and tell what's the easiest way to:
Many thanks in advance, enjoy your day ! |
Sorry, in case you choose the first option, I forgot to tell you to refactor about the first item, looks like you want to show only common friends of the user (not all users), so in this case you may want to change the implementation of the files about the second item, it would be very tricky to implement, because Askless is not designed to work with other backends simultaneously, I would try to have Askless server in the backend and also a Express server to receive webhooks from PHP, Askless + Express in the same node.js backend, so for example, PHP would tell express that a user typed, and express would call to delete the conversation from a flutter app, you can use as reference the |
Many thanks for your all priceless suggestions. I will follow them and try to implement a solution with shared mysql DB (php / flutter node.js). Just last one ... I already have access_token I use in my Flutter prototype App. It's taken via separate login by REST API talking to our mysql. Would you suggest any easy method to skip user/password authentication in your flutter client just use access_token only I can provide as variable from my flutter prototype to your Flutter-chat module ? 1000 Thanks again ! |
I appreciate! On the Flutter side, you can go to the In the backend, you can change the code of the I hope it helps |
a million thanks Rodrigo ! I will have an excellent weekend experimenting with your project ! |
I let you know once I release an update! I wish you success in your project and an awesome weekend! |
Hello Rodrigo, Hope all is well. So I finally managed to refactor all my columns and also have changed authorization system. After analysing your code on both flutter and node.js sides I decided to leave original token management between flutter client -> askless and node.js. It's a different form of authorisation used only for chat purpose, so I figured out that the best way will be to replace your email/password by my user_access_token. Refactored few methods and it works ! :) I hope you don't mind to ask some simple questions - Since now I use chat as sub-module in my main app at school (users are authorized by their
ops ... apologies .... probably too much questions :) many thanks in advance ! |
Hi! I'm glad you are progressing well! Congratulations Actually, the user email and password are not saved in the user device, but the access token and refresh token are, I think the best option for you is to keep this logic as it is, and in the backend you can change the So instead of validating the user So in this way, by keeping the access token and refresh token logic, you don't need to log out the user in the chat app when he logs out in the main app (but you can do it if you want to), because the Chat tokens logic is different from the School tokens logic, the only thing that will be similar is the validation of the password About the last item, you can create a new route similar to
|
1000 thanks ! I will be developing this during weekend. Hope I can manage :) |
Hello Rodrigo, hope all is well at your end. I was wondering if you've had time to look into Askless [ERROR]: (waitForAuthentication) Ops, this shouldn't happen, the App says it is authenticated but the server says is not authenticated ... Still working on my school chat, but got this error so often and to be honest I've stuck with it. No idea what's the reason and how to fix it. |
Got it, thanks for letting me know, I will add this to my list and I let you know here |
Hello DannyFilo, I just noticed that the error message was appearing at the wrong time, the branch dev has the adjustment, thanks again I will let you know here when I implement the feature of keeping the messages when the user logs in after a logout |
Oh many thanks ! I was wondering on 2 things:
Many thanks for the update again, |
Sure, there's two ways of doing, with streamConnectionChanges(...) and with addOnConnectionChangeListener(...), It only works for showing the connection status of the local user for himself, is this what you want? Or do you want to let a remote user know whether the local user is connected or not? I'm glad you are making progress and letting me know! Thank you for that, I'm not aware of this second issue, but I will make tests. Could you please go to the |
Oh I meant to show other users if someone's is online / offline. Adding some sort of green/grey light icon on all contacts. Many thanks for a hint with debug option - I will make some more extensive testing this weekend, so for sure I will send the logs. There's might sort of instabilty on software side. Not sure what is it. Sometimes server is running, all is good and then I send message from one chat client to another (android simulator 1 to simulator 2) and I see infinite logs running like below. Like one of listeners died or askless authentication token / expired or got lost somehow. Only server restart helps. Have a nice weekend and many thanks. warning: respondWithError: the client " (no ID) " could not perform the operation on (CREATE)message, result is PENDING_AUTHENTICATION, authentication is "pending", did you handle the onUnauthenticatedListener on the App side? (initAndConnect) |
Right now Askless doesn't support this feature, but thanks for asking me, I will keep this in mind in case more people request it Thanks also for sharing your logs, could you please also share your Flutter and Node.js versions? |
Hello Rodrigo, hope all is well. It's been a long time. I had a quite a few disturbing months with some sickness. Now fortunately I'm back life and back to some development work and fun with chat app. I will probably have 1 or 2 questions in the coming days. First I had to remind myself how askless work :) ... I have a first small request ... I had to update my small project to compileSdkVersion 34 ... and unfortunately this new SDK is working with latest version of Gradle which requires namespace in every package. Your Askless library has still a dependency on old package safe_device. I see there's a new version of this one. Would you find a minute and update Askless with latest versions of safe_device package + others ? That would help a bit in my small neverending project :) Kind regards, |
Hello DannyFilo, how bad! But I'm happy you are good now Sure, you can now update the Take care |
Hello rodrigro, i made a new issue but saw no respond so i hope you can help me with the issue i faced, namely the disconnected issue and a few more but i would love to have your respond first thanks in advance Hieunt |
A new update has been released with a focus on fixing issues, so run |
Hello, when running your original code Askless is runnig errors all the time (when running npm server + 2 flutter clients connected).
Additionally after loggin-in loggin-out on the flutter client ... messages "from today" dissapear and are not showing on both clients (although chat works)
No idea how to fix it. Would you also be so kind and add small doc how to change column names in database ?
Seems your code is havy "column name" dependend (all 3 packages npm server, askless library and flutter code).
For example changing "userId" in database to "Id" .. seems to be really heavy work.
Flutter app side errors
I/flutter (12514): listenToTypingSubscription CALLED
I/flutter (12514): Askless [ERROR]: (waitForAuthentication) Ops, this shouldn't happen, the App says it is authenticated but the server says is not authenticated
I/chatty (12514): uid=10173(com.wisetap.flutter_chat_app_with_mysql.flutter_chat_app_with_mysql) 1.ui identical 1 line
I/flutter (12514): Askless [ERROR]: (waitForAuthentication) Ops, this shouldn't happen, the App says it is authenticated but the server says is not authenticated
NPM server errors
onReceived MESSAGES:
notifyMessagesWereUpdated: {"receivedAt":"2023-10-12T11:41:26.274Z","senderHasOutdatedVersion":true}
info: onClientReceiveOutputWithSuccess being ignored for route messages-were-updated (listen)
onReceived messages callback: messages
senderReceivedMessagesUpdates is empty/null
warning: respondWithError: the client "(no ID)" could not perform the operation on (READ)askless-internal/call/receive, result is PENDING_AUTHENTICATION, authentication is "pending", did you handle the onUnauthenticatedListener on the App side? (initAndConnect)
error: listen: the error is "PENDING_AUTHENTICATION", calling stopListening...
{"code":"PENDING_AUTHENTICATION","description":"Could not perform the operation on (LISTEN) "askless-internal/call/receive" because authentication is required"}
error: onClientStartsListening not called
[READ/LISTEN] conversations-with-unreceived-messages has been called by the client
1": conversations-with-unreceived-messages" sending -> []
info: onClientReceiveOutputWithSuccess being ignored for route conversations-with-unreceived-messages (listen)
info: onClientReceiveOutputWithSuccess being ignored for route askless-internal/call/receive (listen)
The text was updated successfully, but these errors were encountered: