roundcube / roundcubemail

The Roundcube Webmail suite
https://roundcube.net
GNU General Public License v3.0
5.8k stars 1.63k forks source link

Composer redirects to previous page #5593

Closed heinrichmartin closed 6 years ago

heinrichmartin commented 7 years ago

Environment

RC 1.2.3 UA Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0 PHP ? (hosted) Mail server ? (hosted) logs ? (hosted) Reproducible yes Persisting w/o plugins ? (hosted)

Problem

The following behaviour started all of a sudden today. My provider did not change a thing. He cannot reproduce it either.

Symptoms

Whenever I open the composer (tasks compose or reply), it loads, but immediately navigates back to the previous page.

Requests

GET https://example.com/roundcube/?_task=mail&_mbox=INBOX&_action=compose -> 302 Moved Temporarily GET https://example.com/roundcube/?_task=mail&_action=compose&_id=xxx -> 200 OK GET assets [...] -> 200 OK (cached) GET https://example.com/roundcube/?_task=mail&_mbox=INBOX -> 200 OK [...]

Debug analysis

The last of the above requests is caused by https://example.com/roundcube/program/js/app.min.js?s=xxx (169:404:opener.history.back()). This might be https://github.com/roundcube/roundcubemail/blob/release-1.2/program/js/app.js#L3976.

Interpretation

I am quite puzzled about the code that says: If the action is "compose", then go back in history. The stack trace only shows this.init() from the if-branch (this.env.action == 'compose') as the calling function; so how would this ever work? The code continues with "this.env.opened_extwin = true;", but I cannot recall that I ever composed messages in an external window. On the other hand, app.js is a static asset, so it can't depend on my settings, can it?

Open questions

Now, I am no longer sure whether this should be an issue or a forum thread - sorry if it feels wrong. As I am not familiar with the architecture of RC: What is the intention of the following code sequence? And how is it supposed to work? if (this.env.action == 'compose') { if (opener_rc && opener_rc.env.action == 'compose') { setTimeout(function(){ opener.history.back(); }, 100); } } // stripped some code including the call to init_messageform()

heinrichmartin commented 7 years ago

This issue vanished just as unexpectedly as it started - still puzzled. Feel free to move the discussion to http://www.roundcubeforum.net/index.php/topic,23831.msg64570.html#msg64570.

nicolasbadia commented 6 years ago

A customer reported me the same issue today. It happened with RC 1.3.1 and Chrome. My customer still can't compose message on Chrome... For me it is definitely a bug.

@heinrichmartin would you mind reopening the issue as you did a great job identifying the problem?

heinrichmartin commented 6 years ago

@nicolasbadia feel free to do so. I was quite sure that I identified a bug or at least odd behavior until it suddenly worked again. I am not a RC developer. If the described behavior is exactly your issue, I'd re-use this issue rather than creating a new one.

nicolasbadia commented 6 years ago

@heinrichmartin It is exactly the issue I have. But as I'm not an RC developer either, I do not have the permissions to re-open this issue...

heinrichmartin commented 6 years ago

I see. I can re-open it (because I wrote/closed it), but I cannot take care of it.

alecpl commented 6 years ago

Can you reproduce the issue with Chrome on a different computer? If not, then see the customer's Chrome settings/addons. Works for me.

web20ab commented 6 years ago

Many of our hosting customers have the same problem, around 10-20%. We can't reproduce the error our self. Our roundcube is a fresh 1.3.0 install that just now was updated to 1.3.2. The problem appears with both chrome and firefox.

web20ab commented 6 years ago

Can we expect any solution for this?

heinrichmartin commented 6 years ago

@web20ab I am not a RC dev, but this issue is labelled with "need feedback". Unfortunately, my issue is no longer reproducible and I was not the RC provider either - you might want to read https://github.com/roundcube/roundcubemail/wiki/Howto-Report-Issues and provide more details.

alecpl commented 6 years ago

We can do nothing without a way to reproduce the issue. Also, there were some history related changes in git-master, so you should check this. Closing.

bobemoe commented 3 years ago

Just happened to a client of mine using Firefox too. I got them to close Firefox and when they reopened it, it installed updates! Now it is working. Seems like Firefox was mid update or something.