While trying follow this guide (https:// www .davx5.com/tested-with/nextcloud) on DAVx5 official webpage, I got the following exception:
EXCEPTION
at.bitfire.dav4jvm.exception.HttpException: HTTP 301 Moved Permanently
at at.bitfire.davdroid.ui.setup.NextcloudLoginFlowFragment$LoginFlowModel.postForJson(NextcloudLoginFlowFragment.kt:19)
at at.bitfire.davdroid.ui.setup.NextcloudLoginFlowFragment$LoginFlowModel.access$postForJson(NextcloudLoginFlowFragment.kt:1)
at at.bitfire.davdroid.ui.setup.NextcloudLoginFlowFragment$LoginFlowModel$checkResult$1.invokeSuspend(NextcloudLoginFlowFragment.kt:13)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:15)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:1)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:11)HTTP REQUEST
Request{method=POST, url=http://my.opendesktop.org/login/v2/poll, headers=[Accept-Encoding:br,gzip]}HTTP RESPONSE
301 Moved Permanently
Response{protocol=http/1.1, code=301, message=Moved Permanently, url=http://my.opendesktop.org/login/v2/poll}301 Moved Permanently
nginx
The login process accessing the “Sync calendar & contacts” option on nextcloud app is as follows:
- Select “Sync calendar & contacts”,
- The Nexcloud App calls DAVx5 app
- DAVx5 calls the system default browser to proceed with the login
Curiously, while on the login process, the browser warned me that the information i was passing “wasn’t secure” (but I’m pretty sure I’m both logged in with https on Nextcloud and my login process was using my Primary CalDav Address, which is https:// my .opendesktop.org/remote.php/dav/) and then, when I’m promped to close the browser, the DAVx5 app throws the exception above.
As the http request is made on opendesktop(dot)org, which also gives the response, I’m prone to believe that here is where I should post this issue.
So, what is happening? Why is this response being sent?