Inbox should populate with emails from mail server.
For a brief moment in time, "Inbox" text in center of page with a loading screen, then the error is displayed at top and center of page.
I am using hMailServer as my back-end email server.
Nextcloud version 13.0.3 RC2 (but also does not work for 13.0.2)
Mail version 0.8.1
Cannot read property 'label' of undefined
TypeError: Cannot read property 'label' of undefined
at r.onRender (https://mynextcloud.server/beta/apps/mail/js/build/build.js:225:1389)
at r.f (https://mynextcloud.server/beta/apps/mail/js/build/build.js:39:84548)
at r.triggerMethod (https://mynextcloud.server/beta/apps/mail/js/build/build.js:39:96258)
at render (https://mynextcloud.server/beta/apps/mail/js/build/build.js:39:105722)
at O (https://mynextcloud.server/beta/apps/mail/js/build/build.js:39:141364)
at r.<anonymous> (https://mynextcloud.server/beta/apps/mail/js/build/build.js:39:141566)
at r.render (https://mynextcloud.server/beta/apps/mail/js/build/build.js:39:134779)
at rt (https://mynextcloud.server/beta/apps/mail/js/build/build.js:39:97083)
at r.addChildView (https://mynextcloud.server/beta/apps/mail/js/build/build.js:39:115039)
at r._addChild (https://mynextcloud.server/beta/apps/mail/js/build/build.js:39:114695)
A quick search through our code base gives me the suspicion that the bug is triggered by one of the messages: https://github.com/nextcloud/mail/search?q=.label&unscoped_q=.label
Will take a closer look soon.
Thank you for your report :)
Hi,
i have the same problem with our mail client on nextcloud.
With my account i have no Problem with the Inbox but another user has the same problem like above.
unfortunately i get no clue for solving this issue.
Can you help me?
I have this problem if I click on "Mailto" links in the browser and select Nextcloud Mail as an application. Then I get redirected to the Nextcloud Mail app, but I can only see the error message "e.label is undefined" and my inbox.
I get the following error message in the browser console:
TypeError: "e.label is undefined" build.js:60:94
rhttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:75:21339
Ihttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:39:135940
Ihttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:39:135810
rhttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:75:21291
mainhttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:246:144709
chttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:246:150005
ahttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:246:150127
renderhttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:39:104468
_renderHtmlhttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:39:106040
_renderTemplatehttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:39:105907
renderhttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:39:105682
qhttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:39:141453
rhttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:39:141657
whttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:39:134807
rthttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:39:97111
showhttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:39:98184
showChildViewhttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:39:104118
onShowComposerhttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:283:10046
vhttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:39:155072
ghttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:39:154881
hhttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:39:152827
triggerhttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:39:154774
_handleMailtohttps://my.domain/apps/mail/js/build/build.js?v=df66b9a0-4:201:2991
report https://my.domain/apps/mail/js/build/build.js:60:94
cc @sagorika1996 because you were working on some stuff related to the mailto handling logic :)
since the update to Mail 0.8.3
i can not used this APP any more
got error message: Cannot read property 'label' of undefined
@akaro I'm sorry for the inconvenience. This bug is, however, definitely not caused by Mail 0.8.3 as absolutely no code was changed in this regard, so this is an old bug that popped up now because one of your messages triggers it.
Glad to have reported the bug. I have also tested on Nextcloud 14 Beta 3 using version 0.9.0. However, results in the same error. Yes, I see that it might be fixed in release 0.10.0. Thank you for all your hard work and spending the time in researching this for me (us).
Being very unfamiliar with the code, my best guess is in Address.php Line 43:
public function __construct($label, $email) {
$this->wrapped = new Horde_Mail_Rfc822_Address($email);
// If no label is set we use the email
if ($label !== $email && !is_null($label)) {
$this->wrapped->personal = $label;
}
}
Should (maybe) be:
public function __construct($label, $email) {
$this->wrapped = new Horde_Mail_Rfc822_Address($email);
// If no label is set we use the email
if (($label !== $email && !is_null($label)) || (is_null($label))) {
$this->wrapped->personal = $label;
}
}
@iamdoubz did you test your changes?
From what I can tell from the error message, the problem isn't that label is undefined, but the object on which the label object is accessed is undefined.
@iamdoubz @itchytm @e-alfred @akaro please see #1031 :wink:
Thanks for the bug fix. It appears to be working now. I submitted a review, even though I do not really know what that does. But, it did fix my issue and I can still send/receive emails through the client and all existing labels appear as they should so I believe, from my point of view, that it is ready to go!
Mailto links still don't work with the version provided in https://github.com/nextcloud/mail/pull/1031. The error is still the same (TypeError: e.label is undefined).
Mailto links still don't work with the version provided in #1031. The error is still the same (TypeError: e.label is undefined).
Different bug, that's not what the linked PR fixes.
Same Problem over here
"Error: Cannot read property 'label' of undefined." when i click on a Mail in label for microsoft mail account.
Funny fact, if i leave the mail tab in nextcloud and rejoin Problem seems to apply randomly.
The Mail Mailfunction is really nice because i got 5 Accounts on several providers but this Error is massively annoying...
Nextcloud 13 Fresh install per snap image under Ubuntu 18.04 Server
Logmessage:
"Error | PHP | Attempted to retrieve non-existent variable CurrentAttr at /var/snap/nextcloud/8267/nextcloud/extra-apps/mail/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Context.php#48 | 2018-09-13T12:22:34+0200
-- | -- | -- | --"
@koneone1 the patch will be released with the next version of Mail.