afterlogic / webmail-lite-8

Open-source webmail script for existing IMAP server
https://afterlogic.org/webmail-lite-8
GNU Affero General Public License v3.0
336 stars 72 forks source link

I finally finished setting up my email account, and get an error when I try to read the email. #84

Closed NebulaBC closed 2 years ago

NebulaBC commented 3 years ago

When I click on a incoming email I get the error

Uncaught TypeError: e.threadCount is not a function
    startThreadListPrefetch https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    b https://mail.mysite.tld/static/js/app.min.js?92073:1
    forEach https://mail.mysite.tld/static/js/app.min.js?92073:1
    startThreadListPrefetch https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    startAll https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    prefetchAll https://mail.mysite.tld/static/js/app.min.js?92073:1
    forEach https://mail.mysite.tld/static/js/app.min.js?92073:1
    prefetchAll https://mail.mysite.tld/static/js/app.min.js?92073:1
    start https://mail.mysite.tld/static/js/app.min.js?92073:1
    PXAa https://mail.mysite.tld/static/js/app.min.js?92073:1
    g https://mail.mysite.tld/static/js/app.min.js?92073:1
    forEach https://mail.mysite.tld/static/js/app.min.js?92073:1
    g https://mail.mysite.tld/static/js/app.min.js?92073:1
    notifySubscribers https://mail.mysite.tld/static/js/app.min.js?92073:1
    valueHasMutated https://mail.mysite.tld/static/js/app.min.js?92073:1
    t https://mail.mysite.tld/static/js/app.min.js?92073:1
    filterRequests https://mail.mysite.tld/static/js/app.min.js?92073:1
    always https://mail.mysite.tld/static/js/app.min.js?92073:1
    c https://mail.mysite.tld/static/js/app.min.js?92073:1
    fireWith https://mail.mysite.tld/static/js/app.min.js?92073:1
    T https://mail.mysite.tld/static/js/app.min.js?92073:1
    t https://mail.mysite.tld/static/js/app.min.js?92073:1
    send https://mail.mysite.tld/static/js/app.min.js?92073:1
    ajax https://mail.mysite.tld/static/js/app.min.js?92073:1
    doSend https://mail.mysite.tld/static/js/app.min.js?92073:1
    send https://mail.mysite.tld/static/js/app.min.js?92073:1
    send https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    executeCheckMail https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    L https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    broadcastEvent https://mail.mysite.tld/static/js/app.min.js?92073:1
    forEach https://mail.mysite.tld/static/js/app.min.js?92073:1
    broadcastEvent https://mail.mysite.tld/static/js/app.min.js?92073:1
    executeResponseHandler https://mail.mysite.tld/static/js/app.min.js?92073:1
    done https://mail.mysite.tld/static/js/app.min.js?92073:1
    c https://mail.mysite.tld/static/js/app.min.js?92073:1
    fireWith https://mail.mysite.tld/static/js/app.min.js?92073:1
    T https://mail.mysite.tld/static/js/app.min.js?92073:1
    t https://mail.mysite.tld/static/js/app.min.js?92073:1
    send https://mail.mysite.tld/static/js/app.min.js?92073:1
    ajax https://mail.mysite.tld/static/js/app.min.js?92073:1
    doSend https://mail.mysite.tld/static/js/app.min.js?92073:1
    checkConnection https://mail.mysite.tld/static/js/app.min.js?92073:1
    executeResponseHandler https://mail.mysite.tld/static/js/app.min.js?92073:1
    fail https://mail.mysite.tld/static/js/app.min.js?92073:1
    c https://mail.mysite.tld/static/js/app.min.js?92073:1
    fireWith https://mail.mysite.tld/static/js/app.min.js?92073:1
    T https://mail.mysite.tld/static/js/app.min.js?92073:1
    t https://mail.mysite.tld/static/js/app.min.js?92073:1
    send https://mail.mysite.tld/static/js/app.min.js?92073:1
    ajax https://mail.mysite.tld/static/js/app.min.js?92073:1
    doSend https://mail.mysite.tld/static/js/app.min.js?92073:1
    send https://mail.mysite.tld/static/js/app.min.js?92073:1
    send https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    getCompletelyFilledMessage https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    setCurrentMessage https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    onRoute https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    onRoute https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    onRouteCallback https://mail.mysite.tld/static/js/app.min.js?92073:1
    route https://mail.mysite.tld/static/js/app.min.js?92073:1
    chooseScreen https://mail.mysite.tld/static/js/app.min.js?92073:1
    parseRouting https://mail.mysite.tld/static/js/app.min.js?92073:1
    execute https://mail.mysite.tld/static/js/app.min.js?92073:1
    dispatch https://mail.mysite.tld/static/js/app.min.js?92073:1
    dispatch https://mail.mysite.tld/static/js/app.min.js?92073:1
    M https://mail.mysite.tld/static/js/app.min.js?92073:1
    a https://mail.mysite.tld/static/js/app.min.js?92073:1
    init https://mail.mysite.tld/static/js/app.min.js?92073:1
    init https://mail.mysite.tld/static/js/app.min.js?92073:1
    init https://mail.mysite.tld/static/js/app.min.js?92073:1
    H https://mail.mysite.tld/static/js/app.min.js?92073:1
    l https://mail.mysite.tld/static/js/app.min.js?92073:1
    _settlePromiseFromHandler https://mail.mysite.tld/static/js/app.min.js?92073:1
    _settlePromise https://mail.mysite.tld/static/js/app.min.js?92073:1
    _settlePromise0 https://mail.mysite.tld/static/js/app.min.js?92073:1
    _settlePromises https://mail.mysite.tld/static/js/app.min.js?92073:1
MailWebclient.app.953e7de7e16d4052f0fe.min.js:1:264121
Uncaught TypeError: e.threadCount is not a function
    startThreadListPrefetch https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    b https://mail.mysite.tld/static/js/app.min.js?92073:1
    forEach https://mail.mysite.tld/static/js/app.min.js?92073:1
    startThreadListPrefetch https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    startAll https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    prefetchAll https://mail.mysite.tld/static/js/app.min.js?92073:1
    forEach https://mail.mysite.tld/static/js/app.min.js?92073:1
    prefetchAll https://mail.mysite.tld/static/js/app.min.js?92073:1
    start https://mail.mysite.tld/static/js/app.min.js?92073:1
    PXAa https://mail.mysite.tld/static/js/app.min.js?92073:1
    g https://mail.mysite.tld/static/js/app.min.js?92073:1
    forEach https://mail.mysite.tld/static/js/app.min.js?92073:1
    g https://mail.mysite.tld/static/js/app.min.js?92073:1
    notifySubscribers https://mail.mysite.tld/static/js/app.min.js?92073:1
    valueHasMutated https://mail.mysite.tld/static/js/app.min.js?92073:1
    t https://mail.mysite.tld/static/js/app.min.js?92073:1
    filterRequests https://mail.mysite.tld/static/js/app.min.js?92073:1
    o0Bx https://mail.mysite.tld/static/js/app.min.js?92073:1
    TKFr https://mail.mysite.tld/static/js/app.min.js?92073:1
    forEach https://mail.mysite.tld/static/js/app.min.js?92073:1
    TKFr https://mail.mysite.tld/static/js/app.min.js?92073:1
    setInterval handler*TKFr https://mail.mysite.tld/static/js/app.min.js?92073:1
    i https://mail.mysite.tld/static/js/app.min.js?92073:1
    o0Bx https://mail.mysite.tld/static/js/app.min.js?92073:1
    i https://mail.mysite.tld/static/js/app.min.js?92073:1
    tYdA https://mail.mysite.tld/static/js/ContactsWebclient.app.4838b9aa9aead6d1aa8b.min.js:1
    i https://mail.mysite.tld/static/js/app.min.js?92073:1
    v6sP https://mail.mysite.tld/static/js/ContactsWebclient.app.4838b9aa9aead6d1aa8b.min.js:1
    i https://mail.mysite.tld/static/js/app.min.js?92073:1
    exports https://mail.mysite.tld/static/js/ContactsWebclient.app.4838b9aa9aead6d1aa8b.min.js:1
    init https://mail.mysite.tld/static/js/app.min.js?92073:1
    forEach https://mail.mysite.tld/static/js/app.min.js?92073:1
    init https://mail.mysite.tld/static/js/app.min.js?92073:1
    H https://mail.mysite.tld/static/js/app.min.js?92073:1
    l https://mail.mysite.tld/static/js/app.min.js?92073:1
    _settlePromiseFromHandler https://mail.mysite.tld/static/js/app.min.js?92073:1
    _settlePromise https://mail.mysite.tld/static/js/app.min.js?92073:1
    _settlePromise0 https://mail.mysite.tld/static/js/app.min.js?92073:1
    _settlePromises https://mail.mysite.tld/static/js/app.min.js?92073:1
    _fulfill https://mail.mysite.tld/static/js/app.min.js?92073:1
    _resolve https://mail.mysite.tld/static/js/app.min.js?92073:1
    _promiseFulfilled https://mail.mysite.tld/static/js/app.min.js?92073:1
    _settlePromise https://mail.mysite.tld/static/js/app.min.js?92073:1
    _settlePromise0 https://mail.mysite.tld/static/js/app.min.js?92073:1
    _settlePromises https://mail.mysite.tld/static/js/app.min.js?92073:1
    u https://mail.mysite.tld/static/js/app.min.js?92073:1
    c https://mail.mysite.tld/static/js/app.min.js?92073:1
    _drainQueues https://mail.mysite.tld/static/js/app.min.js?92073:1
    drainQueues https://mail.mysite.tld/static/js/app.min.js?92073:1
    promise callback*a https://mail.mysite.tld/static/js/app.min.js?92073:1
    _queueTick https://mail.mysite.tld/static/js/app.min.js?92073:1
    settlePromises https://mail.mysite.tld/static/js/app.min.js?92073:1
    _fulfill https://mail.mysite.tld/static/js/app.min.js?92073:1
    _resolveCallback https://mail.mysite.tld/static/js/app.min.js?92073:1
    u https://mail.mysite.tld/static/js/app.min.js?92073:1
    promise callback*l https://mail.mysite.tld/static/js/app.min.js?92073:1
    exports https://mail.mysite.tld/static/js/app.min.js?92073:1
    exports https://mail.mysite.tld/static/js/app.min.js?92073:1
    _iterate https://mail.mysite.tld/static/js/app.min.js?92073:1
    e https://mail.mysite.tld/static/js/app.min.js?92073:1
    s https://mail.mysite.tld/static/js/app.min.js?92073:1
    all https://mail.mysite.tld/static/js/app.min.js?92073:1
    H https://mail.mysite.tld/static/js/app.min.js?92073:1
    u https://mail.mysite.tld/static/js/app.min.js?92073:1
    l https://mail.mysite.tld/static/js/app.min.js?92073:1
    setTimeout handler*a/< https://mail.mysite.tld/static/js/app.min.js?92073:1
    c https://mail.mysite.tld/static/js/app.min.js?92073:1
    fireWith https://mail.mysite.tld/static/js/app.min.js?92073:1
    fire https://mail.mysite.tld/static/js/app.min.js?92073:1
    c https://mail.mysite.tld/static/js/app.min.js?92073:1
    fireWith https://mail.mysite.tld/static/js/app.min.js?92073:1
    ready https://mail.mysite.tld/static/js/app.min.js?92073:1
    X https://mail.mysite.tld/static/js/app.min.js?92073:1
    EVdn https://mail.mysite.tld/static/js/app.min.js?92073:1
    EVdn https://mail.mysite.tld/static/js/app.min.js?92073:1
    EVdn https://mail.mysite.tld/static/js/app.min.js?92073:1
    i https://mail.mysite.tld/static/js/app.min.js?92073:1
    H https://mail.mysite.tld/static/js/app.min.js?92073:1
    i https://mail.mysite.tld/static/js/app.min.js?92073:1
    <anonymous> https://mail.mysite.tld/static/js/app.min.js?92073:1
    <anonymous> https://mail.mysite.tld/static/js/app.min.js?92073:1
MailWebclient.app.953e7de7e16d4052f0fe.min.js:1:264121
Uncaught TypeError: e.threadCount is not a function
    startThreadListPrefetch https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    b https://mail.mysite.tld/static/js/app.min.js?92073:1
    forEach https://mail.mysite.tld/static/js/app.min.js?92073:1
    startThreadListPrefetch https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    startAll https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    prefetchAll https://mail.mysite.tld/static/js/app.min.js?92073:1
    forEach https://mail.mysite.tld/static/js/app.min.js?92073:1
    prefetchAll https://mail.mysite.tld/static/js/app.min.js?92073:1
    start https://mail.mysite.tld/static/js/app.min.js?92073:1
    PXAa https://mail.mysite.tld/static/js/app.min.js?92073:1
    g https://mail.mysite.tld/static/js/app.min.js?92073:1
    forEach https://mail.mysite.tld/static/js/app.min.js?92073:1
    g https://mail.mysite.tld/static/js/app.min.js?92073:1
    notifySubscribers https://mail.mysite.tld/static/js/app.min.js?92073:1
    valueHasMutated https://mail.mysite.tld/static/js/app.min.js?92073:1
    t https://mail.mysite.tld/static/js/app.min.js?92073:1
    filterRequests https://mail.mysite.tld/static/js/app.min.js?92073:1
    always https://mail.mysite.tld/static/js/app.min.js?92073:1
    c https://mail.mysite.tld/static/js/app.min.js?92073:1
    fireWith https://mail.mysite.tld/static/js/app.min.js?92073:1
    T https://mail.mysite.tld/static/js/app.min.js?92073:1
    t https://mail.mysite.tld/static/js/app.min.js?92073:1
    send https://mail.mysite.tld/static/js/app.min.js?92073:1
    ajax https://mail.mysite.tld/static/js/app.min.js?92073:1
    doSend https://mail.mysite.tld/static/js/app.min.js?92073:1
    send https://mail.mysite.tld/static/js/app.min.js?92073:1
    send https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    executeCheckMail https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    iAutoCheckMailTimer https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    setTimeout handler*4+IO/L.prototype.setAutocheckmailTimer https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    onGetRelevantFoldersInformationResponse https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    send https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    executeResponseHandler https://mail.mysite.tld/static/js/app.min.js?92073:1
    done https://mail.mysite.tld/static/js/app.min.js?92073:1
    c https://mail.mysite.tld/static/js/app.min.js?92073:1
    fireWith https://mail.mysite.tld/static/js/app.min.js?92073:1
    T https://mail.mysite.tld/static/js/app.min.js?92073:1
    t https://mail.mysite.tld/static/js/app.min.js?92073:1
    send https://mail.mysite.tld/static/js/app.min.js?92073:1
    ajax https://mail.mysite.tld/static/js/app.min.js?92073:1
    doSend https://mail.mysite.tld/static/js/app.min.js?92073:1
    send https://mail.mysite.tld/static/js/app.min.js?92073:1
    send https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    executeCheckMail https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    L https://mail.mysite.tld/static/js/MailWebclient.app.953e7de7e16d4052f0fe.min.js:1
    broadcastEvent https://mail.mysite.tld/static/js/app.min.js?92073:1
    forEach https://mail.mysite.tld/static/js/app.min.js?92073:1
    broadcastEvent https://mail.mysite.tld/static/js/app.min.js?92073:1
    executeResponseHandler https://mail.mysite.tld/static/js/app.min.js?92073:1
    done https://mail.mysite.tld/static/js/app.min.js?92073:1
    c https://mail.mysite.tld/static/js/app.min.js?92073:1
    fireWith https://mail.mysite.tld/static/js/app.min.js?92073:1
    T https://mail.mysite.tld/static/js/app.min.js?92073:1
    t https://mail.mysite.tld/static/js/app.min.js?92073:1
    send https://mail.mysite.tld/static/js/app.min.js?92073:1
    ajax https://mail.mysite.tld/static/js/app.min.js?92073:1
    doSend https://mail.mysite.tld/static/js/app.min.js?92073:1
    checkConnection https://mail.mysite.tld/static/js/app.min.js?92073:1
    executeResponseHandler https://mail.mysite.tld/static/js/app.min.js?92073:1
    fail https://mail.mysite.tld/static/js/app.min.js?92073:1
    c https://mail.mysite.tld/static/js/app.min.js?92073:1
    fireWith https://mail.mysite.tld/static/js/app.min.js?92073:1

I also get the error POST https://mail.mysite.tld/?/Api/ when I try to send an email

Status
500
Internal Server Error
VersionHTTP/3
Transferred2.82 KB (0 B size)
Referrer Policystrict-origin-when-cross-origin
afterlogic-support commented 3 years ago

When I click on a incoming email I get the error Uncaught TypeError: e.threadCount is not a function

Can you confirm whether you have installed WebMail Lite from ZIP package, or from repository?

I also get the error POST https://mail.mysite.tld/?/Api/ when I try to send an email

That looks like a failure of trying to use a blocked SMTP port, it's not unusual for ISPs to block port 25 for spam-prevention reasons. Check webserver log as well as WebMail logs to find out what's causing that.

afterlogic-support commented 3 years ago

Also, is the JavaScript error reproduced reliably, or when certain conditions are met - for example, when opening a threaded mail?

And by the way, you can try disabling message threading either in account settings or in mail server options, and see if the issue occurs then.

NebulaBC commented 3 years ago

That looks like a failure of trying to use a blocked SMTP port, it's not unusual for ISPs to block port 25 for spam-prevention reasons. Check webserver log as well as WebMail logs to find out what's causing that.

I am using Microsoft Azure, and have port 25 unblocked on the mail server. Do I need port 25 unblocked on the server hosting WebMail Lite too? (SMTP works with my mutt client.)

Can you confirm whether you have installed WebMail Lite from ZIP package, or from repository?

I am using the zip package.

Also, is the JavaScript error reproduced reliably, or when certain conditions are met - for example, when opening a threaded mail?

I have gotten an email from google and one from letsencrypt, and they both loaded fine, but any I sent to myself or sent to my email with my gmail account (plus an email I got from sendgrid) cause that error.

And by the way, you can try disabling message threading either in account settings or in mail server options, and see if the issue occurs then.

The error still occurs when I turn threading off.

afterlogic-support commented 3 years ago

Do I need port 25 unblocked on the server hosting WebMail Lite too? (SMTP works with my mutt client.)

Yes, WebMail needs to be able to access port 25 or 465 depending on which one you use to connect to SMTP server.

To check whether it's possible to establish connection to specific port from PHP you can try running this script. Extract the file from .ZIP archive, edit host and port information there, upload it onto the server where you have WebMail installed, and run it from the browser. If you connect to your mailserver via SSL (port 993 for IMAP, 465 for SMTP) you'll need this script instead.

Also, checking PHP error logs may still be needed.

The error still occurs when I turn threading off.

We've never encountered such an error. We do have a test installation of WebMail 9.2 running on Azure, works just fine. We suspect the issue might be specific to email account you use. Trying some other account on a different mail server could be worth a shot. If an issue is reliably reproduced on a specific email message, regardless of mail server used, you can save it as EML file (with some other email client) and submit it for examination.

MagnusB75 commented 2 years ago

Did you ever find a solution for this? I have the same issue, webmail lite 9.1.1, hMail 5.6.7. I tested both with and without SSL without any luck. Ran the connection test scripts successfully on all ports (25/143/587/993) Tried different accounts and domains, we only have one mailserver but with several domains.

We have an older webmail lite install that works just fine.

Thanks,

MagnusB75 commented 2 years ago

After having this issue for a long time I tried upgrading to the latest version of webmail lite 9.2 and it magically started to work just fine. Just to let anyone else that might find themselves with this issue know.