Friend request stuc...
 
Notifications
Clear all

Friend request stuck, won't go away

6 Posts
2 Users
0 Reactions
715 Views
(@gecko64)
Posts: 82
Estimable Member
Topic starter
 

A player reported that they got a friend request from another player, and whether they clicked Accept or Reject, the request pops up every few minutes and won't go away. In phpMyAdmin, I tried deleting the request in the CB_Friend table, but it kept reappearing there too. Finally, I renamed the requester's username, and in phpMyAdmin, that seemed to solve it--it didn't keep popping up again. But the player says it still reappears, and when they click Accept or Reject, there's an error message: "Error - User 'oldusername doesn't exist".  So obviously my hack didn't work. Any suggestions on how to kill this request properly?

 
Posted : 25/08/2017 6:19 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

Instead of deleting try to set the field "State" to "2" (that is "ignored/declined"), you could have two records in the table: one with IdAccount of the user receiving the request (and IdFriend of the other user) and one with IdAccount of the user sending the request (and IdFriend of the other user).

Theoretically to stop allowing to send request it should be enough to have only one record with: IdAccount of the user receiving the request, IdFriend of the user to stop and State equals to 2.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 29/08/2017 10:12 am
(@gecko64)
Posts: 82
Estimable Member
Topic starter
 

Thanks, but I did also try first (changing state to "2") -- but it would revert back to 0 after a few minutes or an hour. I only find one record for this friend request -- there is no reverse record. (That is, user 817 sent request to user 37031, and there is no record for the reverse....except what I see is IDAccount 817, and IDFriend is 37031.) 

Any other ideas? 

 
Posted : 30/08/2017 1:42 am
(@gecko64)
Posts: 82
Estimable Member
Topic starter
 

So I did try changing the state to 2 -- and it worked and remained at 2 -- and it's still at 2 now. But the player says they still get the "Wants to be your friend" dialog, and if they click accept, they then get an alert: Friend request error: An error occurred." If they click 'Block', the dialog disappears but then popus up again seconds later.

So I don't know what to try now. Can you help? 

 
Posted : 02/09/2017 5:55 am
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

What version are you using and what's the code of Unity client where you check for "Wants to be your friend"?

Also according to your informations, you should have this record in order to block new requests:

  • IdAccount (this account is the owner of the contact/request): 37031
  • IdFriend (this is the account of the contact being listed): 817
  • State (this is the state of the request: 0=accepted/friend, 1=requested, 2=declined/ignored): 2

But there should be some issue on saving to server from Unity, "An error occurred" shouldn't appear (usually it's called when the query fails, in this case the query would be the one in Friend:Save, it's strange that it fails, you could try to print it and test in phpMyAdmin), you could add a log in /contacts.php to understand what line of the wsSave() is failing (requires PHP knowledge, you may use die("Here") to stop the execution of code and return the string as result then check it back on Unity log by enabling Log Debug Info in CombuManager inspector).

But I'd suggest to do this test on a local/development server, not on live, you should backup the live database and import in the development environment (you can also duplicate the combu folder in /combu_test so that you can use the same server of live but change the database in config.php).

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 04/09/2017 10:13 am
(@gecko64)
Posts: 82
Estimable Member
Topic starter
 

Ah, it turns out to be the same issue we had awhile ago, with special characters in the username. I'd looked for that initially but didn't find the actual account that was sending the request. So...never mind! :/

 
Posted : 05/09/2017 5:27 pm
Share: