Skip to main content


 

Issue with friend contact - 404


!Friendica Support

Hi all,

I have two users on my system who are connected as Friends on my node. For some reason the contact entry for each other is broken. The contact links are:

https://social.isurf.ca/dfrn_poll/taras5?dfrn_id=1:e632ab21cb6a332d4fc8ad672ff60456a5fd0139f7669fb88e29eea543d03d28&dfrn_version=2.23&type=profile&sec=bd32b36f909f4ca0a4b40823b1f729105ca81c96b14e219a1b0a3414867de420&destination_url=https://social.isurf.ca/profile/taras5?zrl=https%3A%2F%2Fsocial.isurf.ca%2Fprofile%2Fbonespur

and

... show more

I should mention I'm asking them where they got these links from, as they're not the same format as the contact links I have in my contacts list.

@Adam Clark You keep having the weirdest/hard-to-reproduce issues, I know it isn't your fault but it feels demoralizing to me. Maybe I had too much of an expectation of stability coming on the project.

@Hypolite Petovan This issue seems to be just another issue with the DFRN protocol. We really have to use AP as default as soon as possible.

Hey @Hypolite Petovan please don't get discouraged! If I could code I would be enjoying helping actually fix the bugs rather than just discovering them (and trying to report them at all effectively).

I can imagine that with some of the changes that have gone on lately there would be some interesting issues that would crop up. I'm sure it's tough to get a really stable release on try 1 with the new protocol.

On my side, as I'm seeing these issues, I am desperately hoping that some of the mysqld OOM kills hasn't caused issues in my DB. It hasn't happened too often, but it's not the sort of thing one wants to have happen when the system is always processing stuff.

At any rate, I'm just hoping we can figure some of these out in time here, and maybe we'll get stability sorted out pretty soon. They are pretty odd issues, but at least things are running!

These 404 issues are most likely based upon missing key data in the contact table. This data is mostly useless nowadays, since we already switched the most communication to some other way. So we had to create some workaround for this case.

@Adam Clark I think the users are

https://social.isurf.ca/profile/bonespur

and

https://social.isurf.ca/profile/taras5

Check in the database the contact table for the users and checkt the fields "url" and "nurl".

Whereas url should be the https link and nurl the http only link of the profile

For user bonespur
url: https://social.isurf.ca/profile/bonespur
nurl: http://social.isurf.ca/profile/bonespur

For taras5
url: https://social.isurf.ca/profile/taras5
nurl: http://social.isurf.ca/profile/taras5
This entry was edited (3 months ago)

For both users their url & nurl entires seem appropriate, exactly as you listed.

@Adam Clark hmmm ok .. thought you have the same problem I had.
In which field of which table do you find that weird urls?

I've had the users try to remove and re-add each other. The 'bonespur' user has reported back that he can't re-add 'taras5', as it reports "appears you are already friends".

Keeping in mind that I'm not super sure of what I'm doing in the DB, here's what I've looked at, and I presume I'm missing something if the user is getting a "you're already friends" message.

taras5 = uid 872
bonespur = uid 959

When searching the contact table by nick, I don't see a matching uid 959 for nick 'taras5', nor do I see a matching uid 872 for nick 'bonespur'. Am I understanding that table properly?

What else can/should I check to see what's causing a strange relationship between these two users?

This "appears you are already friends" is a clear sign that the other contact does have an entry in the contact table for this user.

MariaDB [friendica]> select uid,nickname from user where (nickname like '%taras5%') or (nickname like '%bonespu%');
+-----+----------+
| uid | nickname |
+-----+----------+
| 872 | taras5   |
| 959 | bonespur |
+-----+----------+
2 rows in set (0.001 sec)

MariaDB [friendica]> select uid,self,rel,nick from contact where (uid = '959') and (nick = 'taras5');
Empty set (0.001 sec)

MariaDB [friendica]> select uid,self,rel,nick from contact where (uid = '872') and (nick = 'bonespur');
Empty set (0.000 sec)


What else should I be looking for?

I hope I understood your request appropriately:
MariaDB [friendica]> select uid,url,self,rel,nick from contact where (uid = '959') and (url like '%taras%');
Empty set (0.000 sec)

MariaDB [friendica]> select uid,url,self,rel,nick from contact where (uid = '872') and (url like '%bones%');
Empty set (0.001 sec)

Is that important the full nick is not shown for the url ?

Those are wildcards.

Hmm, what happens, when you are doing it vice versa? Means querying "959" for "%bones%" and "872" for "%taras%"?

I presume this is the expected result?
MariaDB [friendica]> select uid,url,self,rel,nick from contact where (uid = '959') and (url like '%bones%');
+-----+------------------------------------------+------+-----+----------+
| uid | url                                      | self | rel | nick     |
+-----+------------------------------------------+------+-----+----------+
| 959 | https://social.isurf.ca/profile/bonespur |    1 |   0 | bonespur |
+-----+------------------------------------------+------+-----+----------+
1 row in set (0.001 sec)

MariaDB [friendica]> select uid,url,self,rel,nick from contact where (uid = '872') and (url like '%taras%');
+-----+----------------------------------------+------+-----+--------+
| uid | url                                    | self | rel | nick   |
+-----+----------------------------------------+------+-----+--------+
| 872 | https://social.isurf.ca/profile/taras5 |    1 |   0 | taras5 |
+-----+----------------------------------------+------+-----+--------+
1 row in set (0.001 sec)

Jepp, this is expected. There shouldn't be this "appears you are already friends". Could the users check this again?

OK, the users have ensured they were removed from each other and tried re-adding. They appear to have been able to get each other removed as contacts fully, but after re-connecting the same problem exists - the links to each other's profiles are still showing with a /dfrn_poll/username?dfrn_id...etc URI.

This isn't just in their contact list, apparently. According to taras5, this is showing this way as the profile link for bonespur in the /directory too.

Meh ...

There is definitely some connection problem - And I don't understand, why they are trying to connect the old way. With the current master the whole authentication should always be done with the magic auth.

Just to clarify further. Apparently the taras5 is seeing all /redir/ URIs as the links to the contacts, it's just where she gets redirected to is the issue there.

Hmm... is there anything I can do short-term to help force this to be fixed for these users?

@Adam Clark I have the feeling that this could be some problem on the current master.