Skip to content
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

[bug] Synced Conversations splitted in two #6

Closed
theonlydoo opened this issue Oct 8, 2014 · 41 comments
Closed

[bug] Synced Conversations splitted in two #6

theonlydoo opened this issue Oct 8, 2014 · 41 comments
Assignees
Milestone

Comments

@theonlydoo
Copy link

Server

ownCloud version: 7.0.6
PHP version: 5.4
HTTPd server: NGINX
HTTPS: Y

Client

Android version: 4.3.2
Phone: Samsung GS2
ownCloud SMS app version: latest up2date

Like i said in here : #1 (comment)
I have a few more problems about sync : the first one is that the large conversation that I have by text message with my GF are split in two. The first part is her talking, the second, in a second conversation, is mine.

@nerzhul nerzhul added the bug label Oct 8, 2014
@nerzhul
Copy link
Collaborator

nerzhul commented Oct 8, 2014

Can you give me a screen of your ownCloud app render (blur the sensible parts) ?

Thanks

@nerzhul nerzhul self-assigned this Oct 8, 2014
@theonlydoo
Copy link
Author

You have the two aspects of the same conversation here :
https://lut.im/jojcbfmB/gfSuPgxw
https://lut.im/cvSfgjSj/wyvdZGYy
N.B. the display of the number is different on the two conversation, but it's the same number :-o
one is +336... the other is 06... but it's the exact same one.

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 8, 2014

Ok, that's what i thought.
In fact the application have this problem because it doesn't know how to replace a french 06 to international +336. I think we must set a country code on sync app to convert code using Google libphonenumber.

I will look at this problem this week, it need some improvements on Android code with new parameters and new account creation model.

http://www.codeofaninja.com/2013/01/android-libphonenumber-example.html?showComment=1360110523169

@nerzhul nerzhul added this to the 1.2 milestone Oct 8, 2014
@theonlydoo
Copy link
Author

can't wait to see that :) thx

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 10, 2014

@theonlydoo i will work on it this afternoon, if no problem.

@theonlydoo
Copy link
Author

nice @nerzhul thx

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 10, 2014

@theonlydoo if you use actual master branch, does this fix your issue ? I don't fix client side is the better idea ?

@theonlydoo
Copy link
Author

hey @nerzhul sorry for the late response, quite a busy day.
I just updated both android and oc app, and the problem does not seem to be fixed for large conversations. Maybe you can point me a table to flush to reset the sync, just to be sure ?
n.b. : when i say large conversation, it's 2k+ sms

@theonlydoo
Copy link
Author

n.b. I git pulled the update you pushed, it putted oc in maintenance mode for a while and updated the app.
for android, i just updated it with play store update function.

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 10, 2014

i have 3k sms but not in a conversation.
There is only one table oc_ocsms_smsdatas, you can truncate table and force sync on your android phone.

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 10, 2014

For merging conversation, be sure you have intl number + local number in the same contact, this will merge the conversation properly and evade phone number conversion problem on android

@theonlydoo
Copy link
Author

I'll truncate the table, to see if it fixes that bug.
Btw I recently imported my contacts numbers on the card dav feature of OC, so it's pretty much the same

@theonlydoo
Copy link
Author

truncate table, up2date apps : still a problem. The problem seems different now though, I do have a single conversation by contact, but there is no messages from me ... except maybe one or two by conversation 😬

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 11, 2014

erf... if you look in the database you see all messages for the conversation ?

@theonlydoo
Copy link
Author

nope

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 11, 2014

then the client doesn't see your messages. Are these SMS or MMS ? At this time only SMS are synced

@theonlydoo
Copy link
Author

it's mostly an SMS conversation

@theonlydoo
Copy link
Author

I tried to truncate and sync again, and I got the error #3 Invalid datas received from server when pushing.., with the same sync pattern afterwards (missing half of messages)

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 13, 2014

Error 3 means that the push request failed. Is there any messages in you owncloud.log or apache/error.log ?

@theonlydoo
Copy link
Author

I'll try to truncate and sync with tail -f on both logs, and I'll keep you posted !

@theonlydoo
Copy link
Author

Hellow, sorry for the delay, I was kind of swamped those days.
I tried to update/truncate/sync/tail -f on both owncloud.log AND NGINX error log --> nothing, and I got same result at the end.

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 16, 2014

No problem.
I need to know if all messages are in database or not. Can you check oc_ocsms_smsdatas table please ? I think all messages are exactly what you see on web interface but i must be sure.

@theonlydoo
Copy link
Author

Indeed, the database has exactly the same datas

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 16, 2014

Ok, i think it's a problem on client, but the client lists every SMS message, i think somes are formated as MMS and i need to add support faster

@theonlydoo
Copy link
Author

That's possible indeed, since a lot of my sms are actually 5 or 6 sms one shot

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 16, 2014

then they are MMS. Android convert SMS to MMS when they use 3 sms and more, as i can remember.

@theonlydoo
Copy link
Author

I'll take your word for that :) Keep me posted if you need to run other tests.

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 16, 2014

Thanks. I'll try to add support for MMS (text in first phase) since 2 weeks.

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 16, 2014

ok, i change the milestone. We need to push it into 1.3 because it's a new feature. 1.2 merge is now closed

@nerzhul nerzhul modified the milestones: 1.3, 1.2 Oct 16, 2014
@theonlydoo
Copy link
Author

No problem, good luck !

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 23, 2014

Can you test the situation for your SMS messages with 8d28751 please ?

@theonlydoo
Copy link
Author

Hey, I git pulled and got the HEAD revision (which is 0e013b0, after 8d28751). The long message issue seem to be fixed, but :

  • Conversation are still splitted in two
  • I got outdated messages in the conversation (from a year ago :-o)
  • If I check on my phone, the conversation has 2036 messages, but the synced one has 793+2502.
  • The split seems to be linked to the +336... since I also synced my contacts, the displayed name linked to the conversation has 4 versions of the same number, but not that one.

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 23, 2014

Hi,
thanks for your fast test.
Ok, i think MMS must resolve the missing messages. At this time i resolved issue with "01 02 03 04 05" which must also search for "0102030405".
You mean you have more messages on ocsms instance than your phone ?
For international numbers i haven't solution at this time. The best solution (at this time) is to set international and local number on the same contact.
For the duplicate numbers into the conversation, it's "normal", i need to fix the phone numbers sent to interface, it will come before lunch

@theonlydoo
Copy link
Author

You mean you have more messages on ocsms instance than your phone ?
Yep, exactly :-)

Just an idea "on the fly" : can't you match the X last digits of a phone number ? The probability of a mismatch between two numbers from two different country is really thin.

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 23, 2014

In fact the problem is each country has its own rules. And if you have international SMS you can have unsollicited merged conversations.

a09faa6 must fix your duplicated numbers into conversation, can you test it ?

@theonlydoo
Copy link
Author

Nope, does not fix (I truncated the table) :-(

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 23, 2014

Can you tell me what you see into conversation ? (replace 4 last digits by letters (1 letter per digit))

@theonlydoo
Copy link
Author

I see the same thing that was displayed before, since I've got the "normal" phone number associated to the contact in my address book : My SMS are displayed under 06xxxxxxxx and the contact SMS are displayed under +336xxxxxxxx, I'll try to add the +33 number to the contact to see if it merges.

Do you know how Android handles the Local/International format issue on it's conversation app ?

@theonlydoo
Copy link
Author

Yep, this workaround does the trick !
So I guess the only thing to do to really fix the bug is to understand how does android/or sms apps manages to solve this issue.

@nerzhul
Copy link
Collaborator

nerzhul commented Oct 23, 2014

Android uses it's own library . I found a JAVA library developped by Google which permit to convert local numbers to intl numbers. I think having a workaround on the Android app can be good, but it's not the first thing i must develop.
Can you add an enhancement issue for it into owncloud SMS Android app repo ? I close this issue because workaround resolve the problem.
Thanks for your time !

@theonlydoo
Copy link
Author

OK, done here nerzhul/ncsms-android#3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants