Android: Host not found! basic authentication scheme selected

Created on 27 Feb 2018  路  9Comments  路  Source: nextcloud/android

Actual behaviour

Host not found!

Steps to reproduce

  1. start nextcloud client
  2. put server address: "http://myowncloud.local.net/owncloud/"
  3. receive success message "Host found"
  4. put user and password
  5. click "connect"
  6. receive error message "Host not found"

Environment data

Android version: LineageOS 14.1-20180208

Device model: m8

Nextcloud app version: 3.0.1

server version: ownCloud 8.1.9 (stable)

Logs

Web server error log: nothing found

owncloud.log

{"reqId":"t4HPGCd7uEllf9BgYI4R","remoteAddr":"192.168.178.31","app":"PHP","message":"Cannot modify header information - headers already sent by (output started at \/var\/www\/owncloud\/3rdparty\/sabre\/http\/lib\/Sapi.php:70) at \/var\/www\/owncloud\/3rdparty\/sabre\/http\/lib\/Sapi.php#58","level":3,"time":"2018-02-27T08:21:06+00:00"}

logcat


02-27 09:20:57.379  7357  7801 D SimpleFactoryManager: getClientFor(OwnCloudAccount ... : 
02-27 09:20:57.438  7357  7801 D NetworkUtils: Searching known-servers store at /data/user/0/com.nextcloud.client/files/knownServers.bks
02-27 09:20:57.459  7357  7801 D NetworkSecurityConfig: Using Network Security Config from resource network_security_config debugBuild: false
02-27 09:20:57.504  7357  7801 D OwnCloudClient #0: Creating OwnCloudClient
02-27 09:20:57.505  7357  7801 V SimpleFactoryManager:     new client {@myowncloud.local.net/owncloud, 214316326}
02-27 09:20:57.516  7357  7801 D OwnCloudClient #0: REQUEST GET /owncloud/status.php
02-27 09:20:57.625  7357  7801 I GetRemoteStatusOperation: Connection check at http://myowncloud.local.net/owncloud: Operation finished with HTTP status code -1 (success)
02-27 09:20:57.625  7357  7801 D GetServerInfoOperation: Trying empty authorization to detect authentication method
02-27 09:20:57.632  7357  7801 D OwnCloudClient #0: REQUEST HEAD /owncloud/remote.php/webdav/
02-27 09:20:57.759  7357  7801 I AuthChallengeProcessor: basic authentication scheme selected
02-27 09:20:57.760  7357  7801 I HttpMethodDirector: No credentials available for BASIC 'ownCloud'@myowncloud.local.net:80
02-27 09:20:57.761  7357  7801 D ExistenceCheckRemoteOperation: Existence check for http://myowncloud.local.net/owncloud/remote.php/webdav/ targeting for  existence finished with HTTP status 401(FAIL)
02-27 09:20:57.762  7357  7801 D DetectAuthenticationMethodOperation: Authentication method found: BASIC_HTTP_AUTH
02-27 09:20:57.762  7357  7801 D OperationsService: Called 1 listeners
02-27 09:20:57.762  7357  7801 D OperationsService: Stopping after command with id 1
02-27 09:20:58.633 11826 12478 I CastDatabase: Saving the database
02-27 09:20:58.666 11826 12478 I SQLiteCastStore: [CastNetworkInfo] saved: 0, skipped: 0, [CastDeviceInfo]: saved 0, skipped 0, Paired Guest Mode DeviceInfo] saved: 0, skipped: 0.
02-27 09:20:59.901   838  1210 D ConnectivityService: handleLingerComplete for NetworkAgentInfo [MOBILE (LTE) - 250]
02-27 09:20:59.904  1516  1673 D DcNetworkAgent: NetworkAgent: NetworkAgent channel lost
02-27 09:20:59.905  1516  1673 D DcNetworkAgent: NetworkAgent: DcNetworkAgent: [unwanted]: disconnect apnContext={mApnType=default mState=CONNECTED mWaitingApns={[[ApnSettingV3] T-Mobile Internet, 956, 26201, internet.t-mobile, , http://mms.t-mobile.de/servlets/mms, 172.28.23.131, 8008, , 1, default | supl | mms, IP, IP, true, 0, 0, 0, false, 0, 0, 0, 0, , , false]} mApnSetting={[ApnSettingV3] T-Mobile Internet, 956, 26201, internet.t-mobile, , http://mms.t-mobile.de/servlets/mms, 172.28.23.131, 8008, , 1, default | supl | mms, IP, IP, true, 0, 0, 0, false, 0, 0, 0, 0, , , false} mReason=dataDisabled mDataEnabled=false mDependencyMet=true}
02-27 09:20:59.930   838  1210 D ConnectivityService: NetworkAgentInfo [MOBILE (LTE) - 250] got DISCONNECTED, was satisfying 9
02-27 09:20:59.984   838  1210 W ConnectivityExtension: ConnectivityExt jar file not present
02-27 09:21:00.176   337   745 E Netd    : netlink response contains error (No such file or directory)
02-27 09:21:03.490  7357  7357 W IInputConnectionWrapper: finishComposingText on inactive InputConnection
02-27 09:21:06.475  2217  2513 E NetworkScheduler: ignoring stale queue check message
02-27 09:21:07.263  7357  7357 W IInputConnectionWrapper: finishComposingText on inactive InputConnection
02-27 09:21:11.540  7357  7987 D OwnCloudClient #1: Creating OwnCloudClient
02-27 09:21:11.541  7357  7987 D OwnCloudClient #1: REQUEST HEAD /owncloud/remote.php/webdav/
02-27 09:21:12.070  7357  7987 D ExistenceCheckRemoteOperation: Existence check for http://myowncloud.local.net/owncloud/remote.php/webdav/ targeting for  existence finished with HTTP status 200
02-27 09:21:12.079  7357  7987 D OwnCloudClient #1: REQUEST GET /owncloud/ocs/v1.php/cloud/user
02-27 09:21:12.579  7357  7987 E GetRemoteUserInfoOperation: Exception while getting OC user information
02-27 09:21:12.579  7357  7987 E GetRemoteUserInfoOperation: java.lang.NullPointerException: Attempt to invoke virtual method 'long com.owncloud.android.lib.common.Quota.getQuota()' on a null object reference
02-27 09:21:12.579  7357  7987 E GetRemoteUserInfoOperation:    at com.owncloud.android.lib.resources.users.GetRemoteUserInfoOperation.run(GetRemoteUserInfoOperation.java:130)
02-27 09:21:12.579  7357  7987 E GetRemoteUserInfoOperation:    at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:151)
02-27 09:21:12.579  7357  7987 E GetRemoteUserInfoOperation:    at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:155)
02-27 09:21:12.579  7357  7987 E GetRemoteUserInfoOperation:    at com.owncloud.android.authentication.AuthenticatorAsyncTask.doInBackground(AuthenticatorAsyncTask.java:84)
02-27 09:21:12.579  7357  7987 E GetRemoteUserInfoOperation:    at com.owncloud.android.authentication.AuthenticatorAsyncTask.doInBackground(AuthenticatorAsyncTask.java:41)
02-27 09:21:12.579  7357  7987 E GetRemoteUserInfoOperation:    at android.os.AsyncTask$2.call(AsyncTask.java:305)
02-27 09:21:12.579  7357  7987 E GetRemoteUserInfoOperation:    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
02-27 09:21:12.579  7357  7987 E GetRemoteUserInfoOperation:    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
02-27 09:21:12.579  7357  7987 E GetRemoteUserInfoOperation:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
02-27 09:21:12.579  7357  7987 E GetRemoteUserInfoOperation:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
02-27 09:21:12.579  7357  7987 E GetRemoteUserInfoOperation:    at java.lang.Thread.run(Thread.java:761)
02-27 09:21:12.636   838  2304 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4a685c5 attribute=null, token = android.os.BinderProxy@b3147ba
02-27 09:21:14.472  1256  1256 I SlideTouchEvent: vel=0.0, MinimumFlingVelocity=150
bug

Most helpful comment

server version: ownCloud 8.1.9 (stable)

Just a little hint: You can easily migrate to Nextcloud with our migration script: https://nextcloud.com/migration/ 馃槈

All 9 comments

server version: ownCloud 8.1.9 (stable)

Just a little hint: You can easily migrate to Nextcloud with our migration script: https://nextcloud.com/migration/ 馃槈

@lars-vom-mars-x thanks for the report. The upcoming 3.0.2 (soon to be released) will fix the issue you reported (error on loading Quota info) via https://github.com/nextcloud/android-library/releases/tag/1.0.39


Beware that we do not officially support ownCloud _and_ v8.x is not even supported by ownCloud anymore (since 02/2017) so either way I'd strongly suggest to update the server version to a recent release may it be ownCloud or Nextcloud. Since this is likely also a security matter.

@lars-vom-mars-x please let us know it you still have issues after the 3.0.2 update has been released. For now I'll close the issue since 3.0.2 should ship the fix.

@AndyScherzinger very thanks. I'll inform you with 3.0.2.
@MorrisJobke very thanks. Migration to nextcloud after test 3.0.2, okay?

@MorrisJobke very thanks. Migration to nextcloud after test 3.0.2, okay?

Perfect 馃憤

While the error above is fixed, refreshing a folder with oC10 results in a login screen with 3.0.2...So this will not help very much.

@AndyScherzinger: NC-Client 3.0.2: not working, sorry. :-(
The client ends without any messages.

  • is there an issue with AccountManagerService? logcat: skipping since the account already exists
  • AccountManagerService: insertAccountIntoDatabase: Account {[email protected]/owncloud, type=nextcloud}, skipping since the account already exists
  • But i can not found any NC Account?!
  • should i try this [issue 2032 comment-370811027] (https://github.com/nextcloud/android/issues/2032#issuecomment-370811027) ?
  • logcat
03-07 07:45:46.531   721   769 I ActivityManager: Displayed com.nextcloud.client/com.owncloud.android.authentication.AuthenticatorActivity: +376ms (total +3s406ms)
03-07 07:45:46.551 24538 24538 V FileDisplayActivity: onSaveInstanceState() start
03-07 07:45:46.554 24538 24538 D FileDisplayActivity: onSaveInstanceState(Bundle) starting
03-07 07:45:46.554 24538 24538 D ExtendedListFragment: onSaveInstanceState()
03-07 07:45:46.557 24538 24538 V FileDisplayActivity: onSaveInstanceState() end
03-07 07:45:46.562 24538 24538 D FileDisplayActivity: onStop() ending
03-07 07:45:53.503 24538 24538 D OperationsService: Starting command with id 1
03-07 07:45:53.514 24538 24622 D SimpleFactoryManager: getClientFor(OwnCloudAccount ... : 
03-07 07:45:53.545 24538 24622 D NetworkUtils: Searching known-servers store at /data/user/0/com.nextcloud.client/files/knownServers.bks
03-07 07:45:53.546 24538 24622 D NetworkSecurityConfig: Using Network Security Config from resource network_security_config debugBuild: false
03-07 07:45:53.616 24538 24622 D OwnCloudClient #0: Creating OwnCloudClient
03-07 07:45:53.617 24538 24622 V SimpleFactoryManager:     new client {@myowncloud.local.net/owncloud, 97848264}
03-07 07:45:53.626 24538 24622 D OwnCloudClient #0: REQUEST GET /owncloud/status.php
03-07 07:45:53.740 24538 24622 I GetRemoteStatusOperation: Connection check at http://myowncloud.local.net/owncloud: Operation finished with HTTP status code -1 (success)
03-07 07:45:53.741 24538 24622 D GetServerInfoOperation: Trying empty authorization to detect authentication method
03-07 07:45:53.744 24538 24622 D OwnCloudClient #0: REQUEST HEAD /owncloud/remote.php/webdav/
03-07 07:45:53.868 24538 24622 I AuthChallengeProcessor: basic authentication scheme selected
03-07 07:45:53.872 24538 24622 I HttpMethodDirector: No credentials available for BASIC 'ownCloud'@myowncloud.local.net:80
03-07 07:45:53.876 24538 24622 D ExistenceCheckRemoteOperation: Existence check for http://myowncloud.local.net/owncloud/remote.php/webdav/ targeting for  existence finished with HTTP status 401(FAIL)
03-07 07:45:53.877 24538 24622 D DetectAuthenticationMethodOperation: Authentication method found: BASIC_HTTP_AUTH
03-07 07:45:53.881 24538 24622 D OperationsService: Called 1 listeners
03-07 07:45:53.882 24538 24622 D OperationsService: Stopping after command with id 1
03-07 07:45:54.569   721   883 D WifiStateMachine: updateCapabilities for config:ccb78d646245f616e1false,false
03-07 07:45:55.912 24538 24538 W IInputConnectionWrapper: finishComposingText on inactive InputConnection
03-07 07:45:59.374 24538 24538 W IInputConnectionWrapper: finishComposingText on inactive InputConnection
03-07 07:46:02.995 24538 24620 D OwnCloudClient #1: Creating OwnCloudClient
03-07 07:46:03.136 24538 24620 D OwnCloudClient #1: REQUEST HEAD /owncloud/remote.php/webdav/
03-07 07:46:03.686 24538 24620 D ExistenceCheckRemoteOperation: Existence check for http://myowncloud.local.net/owncloud/remote.php/webdav/ targeting for  existence finished with HTTP status 200
03-07 07:46:03.698 24538 24620 D OwnCloudClient #1: REQUEST GET /owncloud/ocs/v1.php/cloud/user
03-07 07:46:04.804 24538 24538 D AuthenticatorActivity: Successful access - time to save the account
03-07 07:46:04.813   721 18983 W AccountManagerService: insertAccountIntoDatabase: Account {[email protected]/owncloud, type=nextcloud}, skipping since the account already exists
03-07 07:46:04.834   721 21689 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@ef73b46 attribute=null, token = android.os.BinderProxy@d202672
03-07 07:46:04.838   721 19159 I ActivityManager: START u0 {flg=0x4000000 cmp=com.nextcloud.client/com.owncloud.android.ui.activity.FileDisplayActivity} from uid 10136 on display 0
03-07 07:46:04.860   721  2507 I ActivityManager: moveTaskToBack: TaskRecord{2dbc5d2 #1984 A=com.nextcloud.client U=0 StackId=1 sz=3}
03-07 07:46:04.870 24538 24538 D AuthenticatorActivity: onPause() ending
03-07 07:46:04.870 24538 24786 D ExternalLinks: links disabled
03-07 07:46:04.932 24538 24538 D FileDisplayActivity: onDestroy() ending
03-07 07:46:04.982 24538 24538 V FileDownloader: Destroying service
03-07 07:46:04.984 24538 24538 V FileUploader: Destroying service

@lars-vom-mars-x yes, this is unfortunately the only known solution.
Background can be found here: https://github.com/nextcloud/android/issues/2032#issuecomment-371503315

very thanks! it works.

  • That's stupid with the sdcard as "internal storage". At this point all apps will be installed on sdcard, without warnings.
  • > Another solution is to use a different server address if possible.

Sometimes you don't get the simplest things. Thanks again! :-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AndyScherzinger picture AndyScherzinger  路  3Comments

JSoko picture JSoko  路  3Comments

ezaquarii picture ezaquarii  路  3Comments

toobie83 picture toobie83  路  3Comments

markbryanduncan picture markbryanduncan  路  3Comments