You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Catch ajax errors globally when server goes away or other errors occur #16392
I agree. When uploading a new version of an app, I always have to check the network tab to see if I'm getting 503 errors because the app doesn't stop working when it gets them.
since #16783 is closed I am adding this to oc9 to test if shibboleth session timeouts are handled gracefully with tha webdav based approach. However, since ANY ajax call will be redirected I don't think it matters an we will need to reopen #16783 anyway ...
This reminds me of the old topic about detecting whether we're getting a full page as a response by checking if Content-Type was JSON or XML: #15357 (or not 100% that)
@butonic what page does a SSO fail redirects to ? ownCloud's login page ?
There is also a suggest to add a special header on the login page's response. Then check for that response in the ajax response to find out if we just got the login page, and react accordingly (redirect to the real login page)
I'm first going to revive #16783.
But also I'll check whether it is still possible for apps to override this and have their own handlers, just in case.
Activity
nickvergessen commentedon May 18, 2015
Can not find the issue anymore, so maybe we just discussed it and never created it.
oparoz commentedon May 18, 2015
I agree. When uploading a new version of an app, I always have to check the network tab to see if I'm getting 503 errors because the app doesn't stop working when it gets them.
DeepDiver1975 commentedon Sep 22, 2015
@PVince81 is there a solution at hand? Something we can fix for 8.2? or 9.0?
PVince81 commentedon Sep 28, 2015
@DeepDiver1975 the only solution I know of is what you implemented yourself: #16783
butonic commentedon Dec 9, 2015
since #16783 is closed I am adding this to oc9 to test if shibboleth session timeouts are handled gracefully with tha webdav based approach. However, since ANY ajax call will be redirected I don't think it matters an we will need to reopen #16783 anyway ...
PVince81 commentedon Dec 9, 2015
@butonic the current webdav approach will redirect if a 401 error is returned by the server.
8 remaining items
PVince81 commentedon Dec 10, 2015
So far it seems that ajax calls automatically follows redirects.
Doing some research, maybe there are workarounds: http://stackoverflow.com/questions/9177252/detecting-a-redirect-in-jquery-ajax
PVince81 commentedon Dec 10, 2015
This says it is impossible: http://stackoverflow.com/a/2573589
But one trick proposed here http://stackoverflow.com/a/24715958 is that we set a specific custom header in ALL our ajax responses. Then if the jQuery ajax response doesn't contain it, then it means it was a redirect or not an ajax answer (but a plain page instead).
This reminds me of the old topic about detecting whether we're getting a full page as a response by checking if Content-Type was JSON or XML: #15357 (or not 100% that)
PVince81 commentedon Dec 10, 2015
@butonic what page does a SSO fail redirects to ? ownCloud's login page ?
There is also a suggest to add a special header on the login page's response. Then check for that response in the ajax response to find out if we just got the login page, and react accordingly (redirect to the real login page)
DeepDiver1975 commentedon Dec 10, 2015
the redirect goes to the web page of the idp - a redirect to some url out there in the wild
PVince81 commentedon Dec 10, 2015
Hmmmm... and if that URL isn't in the same domain we might even get a cross-domain fail
butonic commentedon Dec 10, 2015
@PVince81 yes, cors needs to be set in the config to allow ajax to the idp to make this detectable without Errors.
PVince81 commentedon Dec 10, 2015
Ok, so this means we need to not only detect 503, 401 but also detect:
PVince81 commentedon Dec 10, 2015
I'm first going to revive #16783.
But also I'll check whether it is still possible for apps to override this and have their own handlers, just in case.
MorrisJobke commentedon Feb 17, 2016
Fixed by #16783
lock commentedon Aug 6, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.