Author Topic: Unable to login with Safari (Mac/iPad)  (Read 8434 times)

Offline DiscoNova

  • Jr. Member
  • **
  • Posts: 15
Unable to login with Safari (Mac/iPad)
« on: November 13, 2012, 05:43:25 AM »
Since the previous problem was so easily solved, here's another one that has manifested itself after upgrading to 0.8.3 - originally reported to me by another user, but I can get this to happen on both my Macbook (with Safari 6.0.2, OS X 10.7.5) and iPad 2 (iOS 5.1.1).

As soon as I type in my username and password, Safari starts loading, but at th e moment when I'd expect the UI to load, I get a "kCFErrorDomainCFNetwork error 303" instead. I am assuming that this has something to do with the loading of the actual UI, because if a provide invalid credentials, I get the normal response.

I have also tested this on other browsers, and Firefox, Opera and Chrome are all happy with the site. Unfortunately I do not have a Windows-box, so I've been unable to determine whether IE or Windows-version of Safari are similarly affected.

Any suggestions are welcome. Many of our users are on Mac, and while getting this to work is as simple as using another browser, many are not that delighted of changing something they've used for a long time into something else ... you know how us Mac-people can be ;)

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,568
    • http://SKaero.com/
Re: Unable to login with Safari (Mac/iPad)
« Reply #1 on: November 13, 2012, 06:02:03 AM »
I don't have a iPad so I can't test that but it works fine for me on Safari 6 on Mac. Does it happen every time? Is there anything in your RoundCube error log? Are you using any plugins?

Offline DiscoNova

  • Jr. Member
  • **
  • Posts: 15
Re: Unable to login with Safari (Mac/iPad)
« Reply #2 on: November 13, 2012, 09:49:48 AM »
For me at least, this happens every time. I must admit that this might be a Safari-problem... pretty hard to follow what is going on inside.

Unfortunately, before friday, I am unable to access the error logs (I am at Cambodia at the moment). But as soon as I have more data, I will post it. This might well be caused of my own paranoia; I've blocked the directories Apache should not be allowed to access - there might be something Safari needs, but which is not required by other browsers.

Offline DiscoNova

  • Jr. Member
  • **
  • Posts: 15
Re: Unable to login with Safari (Mac/iPad)
« Reply #3 on: November 13, 2012, 09:57:27 AM »
Also, I am interested in your version of OS X? Are you already on Mountain Lion (10.8.x) ... cause I have not yet upgraded - and thus do not have the latest Safari. Same with my iPad; some apps I need are not yet available for 10.8.x (and/or iOS6), so I've delayed myself - like many of our users...
« Last Edit: November 13, 2012, 10:34:15 AM by DiscoNova »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,568
    • http://SKaero.com/
Re: Unable to login with Safari (Mac/iPad)
« Reply #4 on: November 13, 2012, 06:50:55 PM »
I'm using OS X 10.7.5.

Offline DiscoNova

  • Jr. Member
  • **
  • Posts: 15
Re: Unable to login with Safari (Mac/iPad)
« Reply #5 on: November 20, 2012, 10:21:36 AM »
Ok, just (finally) got around to collecting a bit more data...

Interestingly, RoundCube's logs show nothing interesting. Apache's log shows that I'm loading a lot of skins, and a number of scripts from /program ... a few POST-requests for data, a few GET-requests for (what I assume to be) static parts of the UI ... no HTTP error codes anywhere.

Everything I see appears to be going exactly as I'd expect it to. Still Safari fails with an error message? From the logs I don't see anything hoing wrong. Also, with Mac-Safari's developer tools I don't see anything strange happening - except of course at the exact moment I'd expect to see the "actual UI", I get a built-in resource page instead (stating that there was a problem and that the page can not be shown ... as described in my first message).

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,568
    • http://SKaero.com/
Re: Unable to login with Safari (Mac/iPad)
« Reply #6 on: November 21, 2012, 02:27:21 AM »
Its a very interesting error, it seems that in can be caused by the server (like if its overloaded) or be the scripts fault. However nether seems to likely since its working fine in other browsers and not breaking on all servers. My guess is its a WebKit bug or maybe a problem with Apache modules. I'd be interested in seeing if I could reproduce the problem on my computer if you could give me a test account.

Offline DiscoNova

  • Jr. Member
  • **
  • Posts: 15
Re: Unable to login with Safari (Mac/iPad)
« Reply #7 on: November 21, 2012, 01:03:06 PM »
PM sent.
l
But I really much think that this might be a Safari-bug... Chrome uses WebKit too, but on that browser, I have no problems :-p

--
Markku Uttula

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,568
    • http://SKaero.com/
Re: Unable to login with Safari (Mac/iPad)
« Reply #8 on: November 21, 2012, 08:32:39 PM »
I've taken a look and I can confirm that the problem occurs for me as well. It doesn't seem to be related to the main UI, if you copy the cookies from a browser where the session is already started it will load the main UI and emails just fine. It appears that the problem is when the browser tries to redirect after a successfully login even though the headers look alright it doesn't even set the new session cookies. This problem maybe related to a piece code that had to be removed because it was causing problems https://github.com/roundcube/roundcubemail/commit/af18b5b06f7045d0d2f76d618ed8831a788931af it was originally added in 0.8.3 and it was removed in 0.8.4 so I'd recommend upgrading and see if that fixes the problem.

Offline DiscoNova

  • Jr. Member
  • **
  • Posts: 15
Re: Unable to login with Safari (Mac/iPad)
« Reply #9 on: November 29, 2012, 06:45:20 AM »
Firstly, I must apologise for not getting around to this problem sooner. However, I believe I may have found the culprit during a completely different bughunting; for some reason any file uploads were ending up completely botched up. It took me a while, but once I had overruled that the problem was not in our code, I started looking at what had changed in Apache and/or PHP.

Interestingly, I found that at some point in the very near past, PHP had changed from "module" into a "filter". As soon as I (re-)installed the module-version and removed the filter, things started working just as I would expect them to. Logging in from Safari is possible again, file uploads are no longer messed up, and - interestingly - my server is now serving pages faster than ever, don't know if it is only due to the change or because of some other optimisations I did while trying to figure out what was wrong, but whatever it is, I'm not complaining ;)

In case you wish to test this yourself, the test account is still active (though I will disable in a few days)...
« Last Edit: November 29, 2012, 06:52:51 AM by DiscoNova »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,568
    • http://SKaero.com/
Re: Unable to login with Safari (Mac/iPad)
« Reply #10 on: November 30, 2012, 03:48:33 AM »
I've never heard of PHP running as a filter, is there a simple way to test if PHP is running as a filter in case something simpler comes up again?

Offline DiscoNova

  • Jr. Member
  • **
  • Posts: 15
Re: Unable to login with Safari (Mac/iPad)
« Reply #11 on: November 30, 2012, 04:39:39 AM »
Well, phpinfo() lists this under

Server API => Apache 2.0 Handler (this is ok)
or
Server API => Apache 2.0 Filter (this is strange)

Not sure if this can be easily checked in code; it could be useful if Roundcube were able determine itself if it is in a "healthy environment" or not.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,568
    • http://SKaero.com/
Re: Unable to login with Safari (Mac/iPad)
« Reply #12 on: November 30, 2012, 06:36:41 PM »
Thanks, I've never seen it before but its good to know in case it comes up again.