notes-android icon indicating copy to clipboard operation
notes-android copied to clipboard

Notes can not connect to server

Open gennari-dkt opened this issue 6 years ago • 9 comments

Describe the bug I can not log into my account after last update.

To Reproduce Steps to reproduce the behavior:

  1. Open the app and error appears

Expected behavior Showing notes

Screenshots

Server

  • Nextcloud-Version: 17.0.3
  • Nextcloud Notes-Version (server app): 3.1.4
  • PHP-Version: 7.3

Smartphone (please complete the following information):

  • Nextcloud Notes-Version (android app): 2.10.1
  • F-Droid or Play Store: f-droid
  • Device: pocophone F1
  • Android-Version: 10

Stacktrace

App Version: 2.10.1
App Version Code: 79
Files App Version Code: 30100190

---

OS Version: 4.9.212-arter97-r20b7-gbe4cc517cdef(eng.gwolf2.20200201.193324)
OS API Level: 29
Device: beryllium
Model (and Product): POCO F1 (beryllium)

---

com.nextcloud.android.sso.exceptions.TokenMismatchException: Provided authentication token does not match or package name is not permitted to perform this action
	at com.nextcloud.android.sso.api.AidlNetworkRequest.performNetworkRequestV2(AidlNetworkRequest.java:155)
	at com.nextcloud.android.sso.api.NextcloudAPI.performNetworkRequestV2(NextcloudAPI.java:148)
	at it.niedermann.owncloud.notes.persistence.NotesClient.requestServer(NotesClient.java:163)
	at it.niedermann.owncloud.notes.persistence.NotesClient.getNotes(NotesClient.java:98)
	at it.niedermann.owncloud.notes.persistence.NoteServerSyncHelper$SyncTask.pullRemoteChanges(NoteServerSyncHelper.java:413)
	at it.niedermann.owncloud.notes.persistence.NoteServerSyncHelper$SyncTask.doInBackground(NoteServerSyncHelper.java:320)
	at it.niedermann.owncloud.notes.persistence.NoteServerSyncHelper$SyncTask.doInBackground(NoteServerSyncHelper.java:284)
	at android.os.AsyncTask$3.call(AsyncTask.java:378)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:919)

Version 2.10.0 seems to work correctly.

Kind regards.

Alessio

gennari-dkt avatar Feb 10 '20 07:02 gennari-dkt

Can you try to delete cache / data from the notes app?

stefan-niedermann avatar Feb 10 '20 08:02 stefan-niedermann

Same here, but maybe a bit different. I can create Notes and they will synced to the server. But old notes didn't show up. If I delete the new created and synced message on the server. After sync with error, it will still remain on device.

Phone: Oneplus 6T Android-Version: 10 Play Store Nextcloud Notes-Version (android app): 2.10.1 and 2.5.0

App Version: 2.10.1
App Version Code: 79
Files App Version Code: 30100190

---

OS Version: 4.9.179-perf+(2001151848)
OS API Level: 29
Device: OnePlus6T
Model (and Product): ONEPLUS A6013 (OnePlus6T)

---

com.nextcloud.android.sso.exceptions.NextcloudHttpRequestFailedException: HTTP request failed with HTTP status-code: 500
	at com.nextcloud.android.sso.api.AidlNetworkRequest.performNetworkRequestV2(AidlNetworkRequest.java:155)
	at com.nextcloud.android.sso.api.NextcloudAPI.performNetworkRequestV2(NextcloudAPI.java:148)
	at it.niedermann.owncloud.notes.persistence.NotesClient.requestServer(NotesClient.java:163)
	at it.niedermann.owncloud.notes.persistence.NotesClient.getNotes(NotesClient.java:98)
	at it.niedermann.owncloud.notes.persistence.NoteServerSyncHelper$SyncTask.pullRemoteChanges(NoteServerSyncHelper.java:413)
	at it.niedermann.owncloud.notes.persistence.NoteServerSyncHelper$SyncTask.doInBackground(NoteServerSyncHelper.java:320)
	at it.niedermann.owncloud.notes.persistence.NoteServerSyncHelper$SyncTask.doInBackground(NoteServerSyncHelper.java:284)
	at android.os.AsyncTask$3.call(AsyncTask.java:378)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:919)
Caused by: java.lang.IllegalStateException: <!DOCTYPE html>
<html class="ng-csp" data-placeholder-focus="false" lang="en" data-locale="gsw" >
	<head
 data-requesttoken="">
		<meta charset="utf-8">
		<title>
		Nerd Cloud		</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
				<meta name="apple-itunes-app" content="app-id=1125420102">
				<meta name="theme-color" content="#0082c9">
		<link rel="icon" href="/cloud/core/img/favicon.ico">
		<link rel="apple-touch-icon" href="/cloud/core/img/favicon-touch.png">
		<link rel="mask-icon" sizes="any" href="/cloud/core/img/favicon-mask.svg" color="#0082c9">
		<link rel="manifest" href="/cloud/index.php/apps/theming/manifest?v=14">
		<link rel="stylesheet" href="/cloud/apps/files_pdfviewer/css/style.css?v=ca9f0d77-14">
<link rel="stylesheet" href="/cloud/core/css/guest.css?v=b3c97061-14">
		<script nonce="UHpMb2gzS3JtSS9CRStYVEhSZUlNanpnRTFHeE45MEFkRHhYQzJGekJ4bz06U1ZTZDl3WGs4TTJMUzVTWVdGL0hkWFc0ZXhmY0hPeFhBRTBVUFE0UVgxcz0=" defer src="/cloud/core/js/dist/main.js?v=b3c97061-14"></script>
<script nonce="UHpMb2gzS3JtSS9CRStYVEhSZUlNanpnRTFHeE45MEFkRHhYQzJGekJ4bz06U1ZTZDl3WGs4TTJMUzVTWVdGL0hkWFc0ZXhmY0hPeFhBRTBVUFE0UVgxcz0=" defer src="/cloud/index.php/js/core/merged-template-prepend.js?v=b3c97061-14"></script>
<script nonce="UHpMb2gzS3JtSS9CRStYVEhSZUlNanpnRTFHeE45MEFkRHhYQzJGekJ4bz06U1ZTZDl3WGs4TTJMUzVTWVdGL0hkWFc0ZXhmY0hPeFhBRTBVUFE0UVgxcz0=" defer src="/cloud/core/search/js/search.js?v=b3c97061-14"></script>
<script nonce="UHpMb2gzS3JtSS9CRStYVEhSZUlNanpnRTFHeE45MEFkRHhYQzJGekJ4bz06U1ZTZDl3WGs4TTJMUzVTWVdGL0hkWFc0ZXhmY0hPeFhBRTBVUFE0UVgxcz0=" defer src="/cloud/apps/files_pdfviewer/js/previewplugin.js?v=b3c97061-14"></script>
<script nonce="UHpMb2gzS3JtSS9CRStYVEhSZUlNanpnRTFHeE45MEFkRHhYQzJGekJ4bz06U1ZTZDl3WGs4TTJMUzVTWVdGL0hkWFc0ZXhmY0hPeFhBRTBVUFE0UVgxcz0=" defer src="/cloud/core/js/dist/share_backend.js?v=b3c97061-14"></script>
<script nonce="UHpMb2gzS3JtSS9CRStYVEhSZUlNanpnRTFHeE45MEFkRHhYQzJGekJ4bz06U1ZTZDl3WGs4TTJMUzVTWVdGL0hkWFc0ZXhmY0hPeFhBRTBVUFE0UVgxcz0=" defer src="/cloud/apps/files_videoplayer/js/main.js?v=b3c97061-14"></script>
<script nonce="UHpMb2gzS3JtSS9CRStYVEhSZUlNanpnRTFHeE45MEFkRHhYQzJGekJ4bz06U1ZTZDl3WGs4TTJMUzVTWVdGL0hkWFc0ZXhmY0hPeFhBRTBVUFE0UVgxcz0=" defer src="/cloud/apps/notifications/js/notifications.js?v=b3c97061-14"></script>
<script nonce="UHpMb2gzS3JtSS9CRStYVEhSZUlNanpnRTFHeE45MEFkRHhYQzJGekJ4bz06U1ZTZDl3WGs4TTJMUzVTWVdGL0hkWFc0ZXhmY0hPeFhBRTBVUFE0UVgxcz0=" defer src="/cloud/apps/rainloop/js/rainloop.js?v=b3c97061-14"></script>
<script nonce="UHpMb2gzS3JtSS9CRStYVEhSZUlNanpnRTFHeE45MEFkRHhYQzJGekJ4bz06U1ZTZDl3WGs4TTJMUzVTWVdGL0hkWFc0ZXhmY0hPeFhBRTBVUFE0UVgxcz0=" defer src="/cloud/core/search/js/searchprovider.js?v=b3c97061-14"></script>
<script nonce="UHpMb2gzS3JtSS9CRStYVEhSZUlNanpnRTFHeE45MEFkRHhYQzJGekJ4bz06U1ZTZDl3WGs4TTJMUzVTWVdGL0hkWFc0ZXhmY0hPeFhBRTBVUFE0UVgxcz0=" defer src="/cloud/core/js/files/fileinfo.js?v=b3c97061-14"></script>
<script nonce="UHpMb2gzS3JtSS9CRStYVEhSZUlNanpnRTFHeE45MEFkRHhYQzJGekJ4bz06U1ZTZDl3WGs4TTJMUzVTWVdGL0hkWFc0ZXhmY0hPeFhBRTBVUFE0UVgxcz0=" defer src="/cloud/core/js/files/client.js?v=b3c97061-14"></script>
		<link rel="stylesheet" href="/cloud/index.php/apps/accessibility/css/user-a0df5a86d89b23eca3df70c015abdbee"/><script defer src="/cloud/index.php/apps/accessibility/js/accessibility?v=0" nonce="UHpMb2gzS3JtSS9CRStYVEhSZUlNanpnRTFHeE45MEFkRHhYQzJGekJ4bz06U1ZTZDl3WGs4TTJMUzVTWVdGL0hkWFc0ZXhmY0hPeFhBRTBVUFE0UVgxcz0="></script><link rel="stylesheet" href="/cloud/index.php/apps/theming/styles?v=14"/><script defer src="/cloud/index.php/apps/theming/js/theming?v=14" nonce="UHpMb2gzS3JtSS9CRStYVEhSZUlNanpnRTFHeE45MEFkRHhYQzJGekJ4bz06U1ZTZDl3WGs4TTJMUzVTWVdGL0hkWFc0ZXhmY0hPeFhBRTBVUFE0UVgxcz0="></script>	</head>
	<body id="body-login">
		<noscript>
	<div id="nojavascript">
		<div>
			This application requires JavaScript for correct operation. Please <a href="https://www.enable-javascript.com/" target="_blank" rel="noreferrer noopener">enable JavaScript</a> and reload the page.		</div>
	</div>
</noscript>
				<div class="wrapper">
			<div class="v-align">
									<header role="banner">
						<div id="header">
							<div class="logo">
								<h1 class="hidden-visually">
									Nerd Cloud								</h1>
																	<img src="/cloud/index.php/apps/theming/image/logo?useSvg=1&amp;v=14"/>
															</div>
						</div>
					</header>
								<main>
					<div class="error error-wide">
	<h2>Internal Server Error</h2>
	<p>The server was unable to complete your request.</p>
	<p>If this happens again, please send the technical details below to the server administrator.</p>
	<p>More details can be found in the server log.</p>

	<h3>Technical details</h3>
	<ul>
		<li>Remote Address: 83.222.150.93</li>
		<li>Request ID: hEsgOblt5CVssZvLGouD</li>
			</ul>

	</div>
				</main>
			</div>
		</div>
		<footer role="contentinfo">
			<p class="info">
				<a href="https://nextcloud.com" target="_blank" rel="noreferrer noopener" class="entity-name">Nerd Cloud</a> – The choice of a new generation			</p>
		</footer>
	</body>
</html>

	at com.nextcloud.android.sso.InputStreamBinder.processRequestV2(InputStreamBinder.java:433)
	at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestAndBodyStreamV2(InputStreamBinder.java:134)
	at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestV2(InputStreamBinder.java:117)
	at com.nextcloud.android.sso.aidl.IInputStreamService$Stub.onTransact(IInputStreamService.java:134)
	at android.os.Binder.execTransactInternal(Binder.java:1032)
	at android.os.Binder.execTransact(Binder.java:1005)

d0dg3r avatar Feb 10 '20 17:02 d0dg3r

@d0dg3r this issue is different. Can you please reopen a new issue? Your error message says, that there is a serverside problem. Please post the logs of your server, too (you can find them in your nextcloud -> your profile image -> settings -> protocol).

Thank you :)

stefan-niedermann avatar Feb 10 '20 17:02 stefan-niedermann

Hi Stefan, i found the bug. It is not your app, it is caused by Ransomware protection App by Joas Schilling. He is denying some txt files e.g. Prevented upload of Notes/GITHUB Recovery Codes.txt because it matches note file pattern "Recovery(.{6}).txt$". this triggered Doctrine\DBAL\Exception\NotNullConstraintViolationException: An exception occurred while executing 'INSERT INTO "oc_notes_meta" ("user_id", "file_id", "last_update") VALUES(?, ?, ?)' with params ["[email protected]", 5417, 1581355912]: SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: oc_notes_meta.etag

Deleted it and your stuff works just fine. Sorry for false alarm and keep up the good work!

d0dg3r avatar Feb 10 '20 17:02 d0dg3r

Thank you, maybe related to https://github.com/undo-ransomware/ransomware_detection/issues/26

stefan-niedermann avatar Feb 10 '20 18:02 stefan-niedermann

ping @gennari-dkt

stefan-niedermann avatar Feb 11 '20 20:02 stefan-niedermann

Close because of missing feedback - @gennari-dkt please reopen the issue if you can still reproduce it after executing the steps from https://github.com/stefan-niedermann/nextcloud-notes/issues/725#issuecomment-584003142

Thank you

stefan-niedermann avatar Feb 13 '20 09:02 stefan-niedermann

I am sorry for the delay.

After deleting cache, everything works done.

Thank you very much.

Alessio

gennari-dkt avatar Feb 13 '20 09:02 gennari-dkt

You're welcome. If you have time and want, it would be helpful if you could install the previous version and upgrade, so we can try to reproduce and fix the issue (ideal would be a logcat).

Otherwise just let me know if the issue occurs again after some time. 🙂

stefan-niedermann avatar Feb 13 '20 09:02 stefan-niedermann