tinode / chat

Instant messaging platform. Backend in Go. Clients: Swift iOS, Java Android, JS webapp, scriptable command line; chatbots
GNU General Public License v3.0
12.01k stars 1.88k forks source link

Problems found in Android app #440

Closed sanmiguel2019 closed 3 years ago

sanmiguel2019 commented 4 years ago

The project looks impressing but I can not understand some things.

Yesterday I installed Android application on 2 telephones (user1, user2) but still can not find out how both telephones can chat.

First of all I was trying to find "user2" from first phone. I searched by username, by the 6 character code that appears in section "security", by the code that starts with "usr" and looks like this - usrUig6RtjGtH. I was not able to find the second user. I was trying it on both phones. I got message saying "Topic not found".

Today in some way (I really didn't understand how) I found "user1" in phone 2. Sent a message to "user1". User1 got my message but can not read it. Over the conversation appeared message "No access to new messages" and below "Not available". I tried to tap the screen to see possible options but nothing appeared. After some time message that says that there is no access to new messages disappeared and I was able to send a message. When I did it, the same happened for "user1" - "no access to new messages". When I return to the conversatons list, I see "You have no chats" message. I go to "find" and under "phone contacts" I see the disappeared conversation. I open the conversation, send a message. Second user gets it, however conversation's not appear in the conversations list. User have to go to contacts to see the conversation.

Conversation periodically appears in the conversations list and then disappears again and is accessible only via contacts section. Conversations periodically are blocke with message "No access to new messages".

Online status and push notifications don't work correctly.

User1 access the app, then closes the app; phone screen is off. Some 3 minutes user2 still sees that user1 is online. When user2 sends a message to the user1 during this time, there is no push notification at all and user 1 can not know that he has new messages because phone screen is off.

When user closes the app or phone's screen if off, "online" status should disappear immediately.

Sometimes push notification arrive but there is no sound and I can not understand the pattern how notifications work in Tinode.

The name of received file in push notification looks uggly. It should display a thubnail of received image ir just "image", "file" as it works in all messengers, but not he file name.

Create a group. Add 1 user. Send a message. In my phone everything ok, but in the phone of added users, there s a mark "not found" below the received group message.

or-else commented 4 years ago

What's the app version?

sanmiguel2019 commented 4 years ago

What's the app version?

0.16.5.806 - I installed it from Play Store.

or-else commented 4 years ago

but still can not find out how both telephones can chat.

See here: https://github.com/tinode/chat/blob/master/docs/API.md#query-language Basically you need to search as email:jdoe@example.com or tel:+12345678900 or basic:user_login. It's a known problem that will be resolved soon.

Today in some way (I really didn't understand how) I found "user1" in phone 2

Contacts are imported and matched. It's a bug that contacts are matched with a delay.

Over the conversation appeared message "No access to new messages" and below "Not available".

Yes, it's a known bug when the app is opened from a push notification.

Conversation periodically appears in the conversations list and then disappears again and is accessible only via contacts section.

This is a side effect of the same bug above.

User1 access the app, then closes the app; phone screen is off. Some 3 minutes user2 still sees that user1 is online

The app is still running. It does not currently detect going into background. The user does not get the push because the app is still connected. It needs to be fixed. Would you like to help?

The name of received file in push notification looks uggly. It should display a thubnail of received image ir just "image", "file" as it works in all messengers, but not he file name.

Please show an example.

Create a group. Add 1 user. Send a message. In my phone everything ok, but in the phone of added users, there s a mark "not found" below the received group message.

This is the same issue with the app being opened from the push notification. It has not synced the subscriber names yet.

or-else commented 4 years ago

Please try https://github.com/tinode/tindroid/releases/tag/v0.16.6-beta1.

The issue with appearing online while in background has been fixed. Various issues when opening the app from a push are likely fixed.

sanmiguel2019 commented 4 years ago

Thank you for your answer and for fixing bugs. Unfortunately, I am not an Android developer and only can participate in this project by searching for bugs.

I just uninstalled Tinode version that installed from Play Store and installed v0.16.6-beta1.

I installed the app on Android 8.1.0 and Android 5.1.1 phones.

Problems and strange things found.

Users can not be found by username nor by email.

The only way to find an user id to search by a string that contains usrXXXXX.

Message that appears "Topic not found or invalid" looks strange if I search for users. Why not just "User not found"? My suggestion is to make the app more, more simple because it's too complicated for regular users to make searches like "email:some@email.com". I would remove searching by email or phone number because it's about privacy. All users have usernames. Username is enough to find an user. If I am registered in some chat app with an username, I can stay anonymous, I don't want people to find me by email or telephone number.

In any case, the searching can be done by checking the search string. If it contains "@" - search by email. If it contains just numbers and "+", search by telephone number, else search by username.

And what is the code "usrXXXXX" below the username. It's not needed at all because all users already have usernames. And to enter search conditions like "usrTg6RtgdR" with mixed capital and lower case letters is too complicated.

Accessing conversation from a push notification

Well, I sent a message from Android 8.1.0 to 5.1.1. Clicked on the notification and appeared the same blocked conversation with "No access to new messages". After a few seconds this message disappeared.

I replied to the message. In Android 8.1.0 the message was blocked maybe 1 minute. Then it disappeared. I don't understand why this message "No access to new messages" appears at all. It's very confusing. If I get a new message, why I have no access to it? This question will ask every regular user.

Sending images

When I try to send an image I am asked if I want to allow Tinode to access my photos and camera. I agree but the dialog to select an image does not appear. I have to click on the photo icon one more time to select an image.

Push notifications

As I wrote in my previous post, push notifications with file names looks ugly. Below is a screenshot.

tinode1

I think, much better is to display ssome image icon for an image, some video video icon for video, and different icon for a document + caption (if user has entered). If not, just an icon + text "Image". Of course in the language that user uses in the app.

Permissions

tinode2

When I access permissions in some conversation, I see many options that are hard to understand. What members can invite and approve an user if it's a one-to-one private conversation, not a group. What to join/read/write? Delete messages? How can I prohibe someone to delete his/her messages? These settings are OK for a group but not for a 1-1 conversation. As I wrote before, the app mush be simple as possible and regular users will not be able to understand. Receive notifications? What notifications. There is already another option "Mute conversation"

The same thing if I access my own account settings/permissions.

Copying a message

When I copy/paste a message it appears like this: [usrYhTgTgfEr9] message text User ids like [usrYhTgTgfEr9] noone can remember and it does not make any sense in the copied message text.

Fixed things

Yes, now user online status works correctly, however I would add "last seen" time when user is offline.

Now it's possible to send a png image. In previous version appeared a message "invalid content"

It's not possible to record a video and to send because it's not possible to switch the camera to video. Probably this could be included in a features reques, not in bugs.

Looks that push notifications now work correctly.

or-else commented 4 years ago

Users can not be found by username nor by email.

As I said before, it's a known issue that will be resolved soon. It's not a simple thing that can be fixed in 15 minutes.

If it contains just numbers and "+", search by telephone number

It's really not that simple. Really. Look at libphonenumber to assess the complexity.

Message that appears "Topic not found or invalid" looks strange

You are welcome to help with the text copy: https://github.com/tinode/tindroid/blob/master/app/src/main/res/values/strings.xml You don't need to be an Android developer for that. And given that you speak Portuguese it would be great if you could translate the strings into your language.

Clicked on the notification and appeared the same blocked conversation with "No access to new messages"

OK, so it's not fixed. I will try to find and fix it before the next release. Thanks.

I have to click on the photo icon one more time to select an image.

What's the Andorid version?

As I wrote in my previous post, push notifications with file names looks ugly.

OK, now I understand. I'll see how difficult it would be to fix.

When I access permissions in some conversation, I see many options that are hard to understand.

The expectation here is that you don't have to use it if you don't need it. Right now the app is still in beta. It's better to have some unnecessary options to see how people use them. We will remove them closer to release.

sanmiguel2019 commented 4 years ago

or-else, I will make a Spanish translation for this project, I promise.

Yes, I understand that some things are not easy to fix and may take a lot of time. I don't report bugs because I want to say that everything is bad. I like your project, it's great. I just want to help to make it even better.

What's the Andorid version?

As I wrote in my previous comment, I am testing the app on Android 8.1.0 and Android 5.1.1 phones. On both phones appeared message "No access to new messages" but then disappeared. On Android 8.1.0 maybe after 1 munute but on Android 5..1.1 after a few soconds. Something has been fixed because in the verision that is available on Google Play I couldn't access the conversation for a long time due to this message.

One more thing if it's important to know for you. I just went for a walk and when I opened Tinode messanger, I saw message "you don't have chats". After some time appeared the conversation with my second phone.

Please consider renaming sent files to random generated names because it could be a privacy issue. I didn't check it on mobile apps but when I send files on https://sandbox.tinode.co/, EXIF data are stripped. At the same time the file name remains as it. Many file names, in particular, the photographs contain the date of shooting.

Right now the app is still in beta. It's better to have some unnecessary options to see how people use them. We will remove them closer to release.

Ok, I understand. Don't forget about contacts section when id comes out of beta. Right now on Android 8.1.0 I see the following

tinode3 tinode4

Only user IDs are visible, no usernames, and it's not possible to understand by ID who is the user, especially if there is no avatar.

Regards.

or-else commented 4 years ago

I will make a Spanish translation for this project, I promise.

Thanks, looking forward to it. It would be great if you could also look at the webapp and iOS translations: https://github.com/tinode/webapp/blob/master/src/i18n/en.json https://github.com/tinode/ios/blob/master/en.lproj/Localizable.strings https://github.com/tinode/ios/blob/master/Tinodios/en.lproj/Main.strings

I have to click on the photo icon one more time to select an image.

What's the Andorid version?

I am testing the app on Android 8.1.0 and Android 5.1.1 phones

My question about the version was specifically about this issue. Where did you see it, 8 or 5?

I saw message "you don't have chats"

So, previously you had chats on the main screen then after app restart you saw this message, correct?

Please consider renaming sent files to random generated names because it could be a privacy issue.

If you are sharing file contents then you probably trust the recipient with the name of the file too, right? I don't see any other app renaming files. It's usually more convenient to have a human-readable file name than a random one. EXIF is stripped because the file is resized.

Only user IDs are visible, no usernames, and it's not possible to understand by ID who is the user, especially if there is no avatar.

How did you get this? Tinode user usr123aBc means the app was unable to get user data from the server.

sanmiguel2019 commented 4 years ago

The sandbox server is reset (all data wiped) every night at 3:15am Pacific time. An error message User not found or offline means the server was reset while you were connected.

For a few days I didn´t use Tinode's Android app. When I opened it in Android 8.1.0, I got logged out. In Android 5.1.1. I had left open a conversation and after a few days when I touched the phone again I still can read the opened conversation and appears loading animation that never disappears. I can even send a message (delivery receipt does not appear).

I guess that Android app is not checking properly if user exists. I created a new account in Android 8.1.0 phone.

See the screenshots below.

tinode5

In the new created account under "phone contacts" appears "Tinode User" but when I tap on it appears message saying that "topic not found or invalid". If topic not found, why this "Tinode User" appears in my phone contacts?

Several times the app crashed when I left open contacts with this "Tinode user" and turned phone's screen off and on (screenshot 3). It happened on Android 8.1.0.

I even can create a group and add to the group this "Tinode UserXXX". In the list of group members appears default avatar and two marks "undefined" and "pending".

Somewhere appeared "unnamed or unknown". I didn't remember exatly where it appeared, I can not find it anymore" (screenshot 4).

I think that the app should always show usernames and not user IDs. If I chat with "john" and "john" deletes his account and his username is replaced with something like "Tinode User XXX", I will have no idea who is this person. Noone can remember user IDs. , All users have usernames, although I would not allow spaces/special/foreign characters to be able to unambiguously identify the user by the username. I would allow only lowercase letters, numbers, dots and "-". because usernames "lucy" and "Iucy" may look identical, although they are different.

One more thing - I can not upload avatar. When I select a photo, appears message "You are offline".

I don't see any other app renaming files. It's usually more convenient to have a human-readable file name than a random one.

It's not true. Whatsapp renames images when you send them as images and not as files. Several times I wanted to know when the photo was taken to make sure the person wasn't lying but it's not possible in Whatsapp. That's why I wrote that it's about privacy.

or-else commented 4 years ago

Do I understand correctly that you are seeing all these problems on sandbox after the data was reset?

If not, please describe steps to reproduce, step by step. Thanks.

or-else commented 4 years ago

Also, please try to separate problems. One issue per problem. It's very difficult to understand what's going on when all of them are clumped together.

sanmiguel2019 commented 4 years ago

Do I understand correctly that you are seeing all these problems on sandbox after the data was reset?

If not, please describe steps to reproduce, step by step. Thanks.

I am seeing the problems on Sandbox after the data was reset. On Android 8 I'm automatically logged out (as it should be) but when I create a new account on Sandbox I see hanging this "Tinode User" that does not exist. On Android 5 I am not even logged out after the data was reset.

Yes, you are right, I will separate problems. Next week I am going to install Tinode on my server and will will do the tests there without resetting all the data.

Regards.

or-else commented 4 years ago

I don't see much value in fixing the issues with deleted account.

sanmiguel2019 commented 4 years ago

Probably, but I suspect the following may happen,

For example, the root user for some reason deletes user "alice". After 1 month "alice" without reinstalling the app creates a new account with the same nickname. In the meantime, the root user has deleted more people, including some of "alice's" contacts.

In a new created account alice will see all these "dead souls" without a possibility to delete them.

As I understand, the problem is that the app does not deletes contacts cached on the phone even if user logs in with with a different userid. The same problem I saw with test accounts - alice, bob, etc and with accounts that I registered myself.

Check the screenhots below. Every day after data reset new user clones appear and all of them I can add to a group despite to the fact that they don't exist anymore.

If you think that's not a problem, just forget it.

tinode7

or-else commented 4 years ago

You are describing a corner case of a corner case, specific to sandbox server.

The contacts can be deleted using stock Contacts app.

sanmiguel2019 commented 4 years ago

Problem to access conversations tapping on notifications still exists

Some time ago I wrote that the problem to access conversations by tapping on a notification has been resolved but it still exists. I sent some 10 messages from Alice to Dave and recipient was not able to access the conversation by tapping on notifications. I tried to exit from conversation to the conversations list, I tried to exit from the app, but the problem did not go away. Then Alice sent a message to the group "travel, travel" and Dave was able to access received message tapping on the notification. After that I sent some more messages from Alice to Dave and recipient was able to access conversation tapping on notification. Then I rebooted the phone and problem is back. I can not access any conversations (private or group) from a notification - "No access to new messages".

Notifications don't work when a conversation is left open.

Notifications don't work for a selected conversation if I turn phone's screen off without exiting from the conversation. I may not use phone for hours and never will get any notification for selected conversation.

Photos close by rotating the phone horizontally

I receive a photo, open it and then rotate the phone horizontally to see the photo bigger. Opened photo just closes. In Whatsapp when I open a photo and rotate phone, opened photo also rotates and occupies all the screen and I can see it bigger.

Group avatar

When I access group's settings and change the avatar, it updates only on the top of the screen. Second image stays the same. It only changes when I exit/enter group's settings.

tinode8

Strange double message for a sender

At 17:46 I sent a photo in a private conversation. 4 minutes later for me (the sender) appeared one more copy of the same photo. At first I thought that somehow I have sent the same photo one more time but it didn't show up to the recipient. I sent one more photo and it appeared not as the last message but between both copies of the first photo.

The strangest thing is that the redundant copy of the photo travels among messages sent later. See message sending times. The duplicate photo is that sent at 17:50.

tinode9

sanmiguel2019 commented 4 years ago

I have translated all 4 files into Spanish. Where do I put them? I'm not a very active github user and I don't know how it works here. Wanted to send them by email but there is no email address on your website.

Thanks, looking forward to it. It would be great if you could also look at the webapp and iOS translations: https://github.com/tinode/webapp/blob/master/src/i18n/en.json https://github.com/tinode/ios/blob/master/en.lproj/Localizable.strings https://github.com/tinode/ios/blob/master/Tinodios/en.lproj/Main.strings

or-else commented 4 years ago

Great, thanks!

The simplest way is just attach them to this issue and I will commit them for you.

The better but more involved way is to go to a page like this (select a repository, then branch devel, then click the [Create file] button): https://github.com/tinode/webapp/new/devel copy-paste the file and file name, save, then create a pull request.

sanmiguel2019 commented 4 years ago

Ok, I will read everything one more time and then post. I had problems with file Main.strings file because I did not understand the use of some phrases:

Item (item of what) Footer (footer of what) Yours (where is it used?)

Class = "UIBarButtonItem"; title = "Item"; ObjectID = "3zN-CC-6bS";
Class = "UIView"; accessibilityLabel = "Footer"; ObjectID = "te7-Jx-ztq";
Class = "UILabel"; text = "Yours"; ObjectID = "wPJ-94-8aV";

There are some strings without spaces. Are they translatable?

Class = "UILabel"; text = " MyUID"; ObjectID = "bvN-my-ZPi";
Class = "UINavigationController"; title = "ChatsNavigationController"; ObjectID = "oDj-ht-EO8";
etc.
or-else commented 4 years ago

Please ignore strings without spaces like ChatsNavigationController. Translating them is not useful. Strings containing component names like "Navigation Controller" can be ignored too.

Class = "UIBarButtonItem"; title = "Item"; ObjectID = "3zN-CC-6bS";

Ignore

Class = "UIView"; accessibilityLabel = "Footer"; ObjectID = "te7-Jx-ztq";

Ignore

Class = "UILabel"; text = "Yours"; ObjectID = "wPJ-94-8aV";

It's used as a label in:

Permissions
   John's: JWR
   Yours: JWAR

Unfortunately Apple is not making it easy.

sanmiguel2019 commented 4 years ago

Here are translations:

spanish.zip

I aded some texts to the strings.xml file to show "last seen" like "Today at 10:45" or "Yesterday at 23:30".

and "typing", "connecting". If I will use Tinode for my project, I will show below the username "typing" instead of animation and "connecting" instead of icon that is appearing at the time the chat connects to the server, as many people will not understand at first what these things mean. I also want to add audio/video calls (first with abora.io) and "connecting" icon just occupies space on the panel where I wan to put calling tools.

Of course, you can just delete added texts if you don't need them.

or-else commented 4 years ago

I have incorporated your translations:

https://github.com/tinode/webapp/commit/7fccd41ced08eab742df6d53eaa0f44707fd6c39 https://github.com/tinode/ios/commit/8b683c0ff197e15f94f3b472f9702dff0180879e https://github.com/tinode/tindroid/commit/c64f137279faf4e49bf320e775cf080bfc7d9f97

Thanks a lot!

or-else commented 4 years ago

Problem to access conversations tapping on notifications still exists

The problem with message display when opening from a push notification is likely fixed.

or-else commented 4 years ago

When I access group's settings and change the avatar, it updates only on the top of the screen. Second image stays the same. It only changes when I exit/enter group's settings.

Fixed.

Notifications don't work when a conversation is left open.

Fixed.

or-else commented 4 years ago

Remaining issues:

Not reproducible:

Remaining feature requests:

or-else commented 4 years ago

When I try to send an image I am asked if I want to allow Tinode to access my photos and camera. I agree but the dialog to select an image does not appear. I have to click on the photo icon one more time to select an image.

Fixed.

or-else commented 4 years ago

Users can not be found by username nor by email.

Fixed

or-else commented 4 years ago

Remaining issues:

Remaining feature requests:

or-else commented 3 years ago

Photos close by rotating the phone horizontally.

Fixed in https://github.com/tinode/tindroid/commit/145cccbc0e7f9624d52ab047d3054f41581ddcc7

Replace [IMAGE file_name.png] with icons in push notifications.

Fixed in https://github.com/tinode/tindroid/commit/a1f077792f89e2b7e72174b25288b33c59a53e0d