Thread Tools Display Modes
03/12/17, 02:36 AM   #1
Noobanidus
 
Noobanidus's Avatar
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 23
[fixed] Fix for recurring RequestReadMail failure

This is especially noticeable when attempting to open mail while suffering from a moderate amount of lag. Example, purchasing 5-10 items from guild stores, zoning and then immediately opening your mail. The items will show up, but attempting to read them fails.

Usually, you have to close and reopen the inbox to get the mail read request to fire off properly.

Occasionally, and usually with the most recent mail, it's not actually possible to read it. All other mails can be read, but clicking on this specific mail (or calling RequestReadMail with its specific id) does nothing. No event fires that results in the contents of the mail being displayed.

This happens to me at least once every few days, and has been happening more frequently since Homestead and I returned to playing the game.

Unfortunately I can't provide any more information beyond this. There don't appear to be any related errors that I can see from documentation, and as RequestReadMail is processed in the client (presumably in a layer above Lua), there's no way to get any more information that might be helpful in tracking down the cause.
 
03/12/17, 03:44 AM   #2
manavortex
 
manavortex's Avatar
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 138
Yeah, the mail implementation deserves some love, I think:

- there's still the issue where I have to switch zone (which does not always work) or re-log (works almost always) to force a mail that was sent to me to arrive. More reliability on that front would be very welcome.
- also, it happens quite often that the internal mail array is screwed up and that I can see, but not access mails. The AddOn Postmaster takes care of that somehow (haven't opened the hood), but a function like RebuildInternalMailTable() that does that automagickally would be awesome - even more awesome if it was called upon EVENT_MAIL_CLOSE_MAILBOX, so that closing and re-opening would at least fix stuck mails.
 
03/13/17, 09:00 AM   #3
silvereyes
 
silvereyes's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2015
Posts: 66
All Postmaster does is retry the RequestReadMail() call after a timeout. However, as noobanidus mentioned, sometimes the server will just refuse to honor requests to read some mails, no matter whether you select a different mail and then the original or not.

It's very frustrating to me as the developer of Postmaster, since people automatically assume that it's a bug in my code and not the server giving issues. I've put a ton of retry loops and error handlers in to Postmaster to work around the server issues as much as possible, but this particular issue with certain mail ids just seemingly becoming invalid until relog doesn't seem to have a code workaround.
 
03/13/17, 09:04 AM   #4
silvereyes
 
silvereyes's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2015
Posts: 66
Originally Posted by manavortex View Post
there's still the issue where I have to switch zone (which does not always work) or re-log (works almost always) to force a mail that was sent to me to arrive. More reliability on that front would be very welcome.
This has been a top request of mine for a very long time. Getting player mail is always kind of a dark art, since sometimes it arrives immediately, and sometimes it requires the logout of the sender, which is just odd.
 
03/13/17, 01:33 PM   #5
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
Mail being sent is a tied to player saving which happens on zone changes and logging among other things. I believe this is for server performance reasons.

As for the request read, is the RequestReadMail() call just failing to generate an EVENT_MAIL_READABLE? That function has three cases that don't generate an event:
  • Player is not in the mail interaction
  • There is no inbox entry for that mail id
  • The mail has already been requested

It could also fail on no server response or if the server response is for a mail that is not part of the inbox.

You can use GetInteractionType for the mail interaction check. The others ones you can't presently know about. I can add a result as a return from the function to determine if the request was sent to the server.

Last edited by ZOS_ChipHilseberg : 03/13/17 at 01:42 PM.
 
03/13/17, 01:41 PM   #6
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
Originally Posted by ZOS_ChipHilseberg View Post
Mail being sent is a tied to player saving which happens on zone changes and logging among other things.
Don't you mean receiving? If mail sending player X doesn't change zones, but receiving player Y does, doesn't it arrive?

I know a server call every single time someone opens their mail would be too heavy, but could we be given a mail refresh button to manually do the call (and give it some sort of cooldown time)?
 
03/13/17, 07:47 PM   #7
Noobanidus
 
Noobanidus's Avatar
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 23
Originally Posted by ZOS_ChipHilseberg View Post
Mail being sent is a tied to player saving which happens on zone changes and logging among other things. I believe this is for server performance reasons.

As for the request read, is the RequestReadMail() call just failing to generate an EVENT_MAIL_READABLE? That function has three cases that don't generate an event:
  • Player is not in the mail interaction
  • There is no inbox entry for that mail id
  • The mail has already been requested

It could also fail on no server response or if the server response is for a mail that is not part of the inbox.

You can use GetInteractionType for the mail interaction check. The others ones you can't presently know about. I can add a result as a return from the function to determine if the request was sent to the server.
Like I mentioned in the original post, it does seem to be that it just isn't generating an EVENT_MAIL_READABLE. Unfortunately, we've really no way of knowing the exact reason why -- I would like to assume that it's something to do with point 3 (mail already been requested), with the combination of lag, but it's possible to read all other mail in the inbox at the time.

Zoning, reloading UI, etc, does not allow you to read this. The next time it happens I'll try to take more extensive screenshots and post here with a step-by-step of exactly what happened, but as far as I recall this is what happened.
  • Purchase multiple items from guild store
  • Zone to a new location to refresh mailbox
  • Open mailbox immediately -- see list of purchased items in mail but be unable to click on them
  • First mail in the list is focussed automatically but nothing displays in the mail contents tab
  • Optionally: unable to view the contents of any other mail
  • Close mail and wait a few seconds, re-open
  • First mail still displays nothing in contents tab (no EVENT_MAIL_READABLE?)
  • Switch to another mail and be able to see contents of that mail
  • Switch back to initial mail but see nothing

As I'm from Australia I'm almost always playing with upwards of 300ms of lag. I'm not sure whether this has a significant impact on the matter or not.
 
03/14/17, 06:22 AM   #8
AssemblerManiac
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 51
I've had this issue occur more times since housing was released than in the previous year. Something has definitely changed for the worse.

I've received mails within 5-10 seconds of them being sent, and neither of us zone changed. I've also had full mail lists refuse to populate the details of the mail, where all I had was the list of subjects and no way to see the content for any of them (usually it's a single mail not working). Reloadui worked to let me read them, so the "tied to save" concept probably forced it to resync. I also don't use any mail helper addons.

Any way we can maybe get an error back to find out what the cause of this is? Even if it doesn't show it to the user, storing an error var in the mail handler object would really help us diagnose for you.
 
03/14/17, 11:39 AM   #9
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
I've added a result code return to RequestReadMail which will at least tell us if it is sending the request properly.
 
03/15/17, 09:22 PM   #10
silvereyes
 
silvereyes's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2015
Posts: 66
I was able to reliably reproduce a couple of the issues with no addons enabled today, other than Zgoo. I took some video. I hope it helps:

Last edited by silvereyes : 03/15/17 at 09:24 PM.
 
03/16/17, 07:26 AM   #11
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
I see that bug too from time to time. I think it has something to do with the internal state of the non-lua part of the mailbox. I briefly looked into it a long time ago and the API methods did not return the expected values when it happened.

I also sometimes don't get all 5 hireling mails until I relog, but that's likely a different bug.
 
03/16/17, 04:46 PM   #12
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
Thanks for the video. We'll take a look.
 
03/17/17, 04:35 AM   #13
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
I got the same problem shown in silvereyes video (1st error in the video) without addons enabled directly after login into the game.

If I use the keybind to open the mailbox directly after getting into the game, and being able to do something:
The mailbox openes and shows my mails.
I'm able to click the different mails but the new mail info is not updated. It's always showing the first mail in the list.
And I'm not able to take attachments.

I need to close the mailbox, reopen it, sometimes change from mail inbox to send and back and afterwards it works again as intended,
 
03/17/17, 08:51 AM   #14
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
Originally Posted by Baertram View Post
I got the same problem shown in silvereyes video (1st error in the video) without addons enabled directly after login into the game.

If I use the keybind to open the mailbox directly after getting into the game, and being able to do something:
The mailbox openes and shows my mails.
I'm able to click the different mails but the new mail info is not updated. It's always showing the first mail in the list.
And I'm not able to take attachments.

I need to close the mailbox, reopen it, sometimes change from mail inbox to send and back and afterwards it works again as intended,
Did you also experience the current interaction being 0 while in mail?
 
03/17/17, 10:52 AM   #15
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
I'll need to check this and will write you the result here in this post then.

Edit for Chip:

This more or less relates to the 2nd error from silvereyes movie:
Today I opened the mailbox directly after login and my inbox was empty, no new mails were shown. But I definately got 4 new hireling mails and severla older ones in there.

As you can see I'm using the German client language.
-> GetInteractionType() was 0 at this moment.

Changing the mail tabs from inbox to send and back didn#t fix this!
I closed the mail inbox and reopened it again. Eh voila my mails are shown correctly and I was able to get the attachments.


If I manage to get the 1st shown error from the video too I'll post the GetInteractionType results here too.

Edit:
Got the bug 1 from the video and GetInteractionType() returns 0 here too
It happend directly after a character change as I opened the mail inbox by help of the keybind the first time.

Closing the mail and reopening it solves the problem.

Last edited by Baertram : 03/17/17 at 01:10 PM.
 
03/20/17, 08:08 AM   #16
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
It seems like somehow the mail interaction is being terminated. The mail interaction should be exclusively controlled by ZO_MailInteractionFragment being shown or hidden.
 
03/20/17, 08:47 AM   #17
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
If I open my mail too quickly after a character change (but after the game has already said it arrived), I won't be able to actually view/take the items from it (even though the mail is visibly in the inbox). I then have to open/close it a few times. However, just waiting long enough before opening it usually keeps this from happening. Might be unrelated but: do addons loading affect the mail? I don't mean things like MM that have a massive footprint, but just having many in general. This sort of issue never happened to me early on, but I have far more addons now.
 
03/20/17, 09:38 AM   #18
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
Originally Posted by ZOS_ChipHilseberg View Post
It seems like somehow the mail interaction is being terminated. The mail interaction should be exclusively controlled by ZO_MailInteractionFragment being shown or hidden.
I have 4 addons (CookeryWiz, GodSend, LoreBooks, MailLooter) installed which call RequestOpenMailbox and CloseMailbox on their own. None of them uses said fragment, so that could be part of the problem.
 
03/20/17, 10:15 AM   #19
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 171
Can anyone who is able to repro the issue reliably let me know, when they open the mail UI but have an interaction type of 0, if they ever received the EVENT_MAIL_OPEN_MAILBOX?
 
03/20/17, 11:25 AM   #20
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
I've just checked the event and put a d() message in there.

Directly after login I've opened the mailbox via keybind.
The mailbox is empty. It showsa 4 new mails but no mails are listed at all (see my post from 17.03.2017 above for a screenshot).

The event's message is shown in chat "Event mail open mailbox triggered!" so the event is executed.
GetInteractionType() returns 0 again.
 

ESOUI » Developer Discussions » Bug Reports » [fixed] Fix for recurring RequestReadMail failure

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off