Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All notes deleted #609

Open
silas229 opened this issue Oct 24, 2019 · 9 comments

Comments

@silas229
Copy link

@silas229 silas229 commented Oct 24, 2019

The app crashed when I tried to cut out some text. This deleted all my notes in my Nextcloud!

Sorry, but I forgot to copy the crash report.

@stefan-niedermann

This comment has been minimized.

Copy link
Owner

@stefan-niedermann stefan-niedermann commented Oct 24, 2019

Are they still available in the Nextcloud?

Please also have a look at the trashbin - The android app is not even capable of finally deleting a file on the Nextcloud server. It only can "ask" the server all to move something to the trashbin.

Also: Please use the issue template so we get necessairy informations like android app version, server app version, Nextcloud version etc...

@stefan-niedermann

This comment has been minimized.

Copy link
Owner

@stefan-niedermann stefan-niedermann commented Oct 24, 2019

cc @korelstar I guess the server app doesn't do direct complete deletions either? Only moving files to the trashbin, right?

In this case there might be an issue with the Nextcloud instance itself (filesystem not in sync or so) - Did you maybe copy your Notes directly in the filesystem and not use an sync client for that @silas229?

@korelstar

This comment has been minimized.

Copy link
Collaborator

@korelstar korelstar commented Oct 24, 2019

The app uses the Nextcloud API in order to delete a file. By default, Nextcloud moves that file to the trashbin. AFAIK, this can be disabled in the server configuration. However, this is not recommended, since files are removed directly then.

Hence, please check your server configuration regarding trash bin.

In order to investigate, why notes where deleted, we need some log files and more information about the environment.

@silas229

This comment has been minimized.

Copy link
Author

@silas229 silas229 commented Oct 26, 2019

No, the notes aren't in the trashbin.
This is the crash report:

Version: 1.0.1

java.lang.IndexOutOfBoundsException: charAt: 691 >= length 691
	at android.text.SpannableStringBuilder.charAt(SpannableStringBuilder.java:123)
	at android.text.CharSequenceCharacterIterator.current(CharSequenceCharacterIterator.java:58)
	at android.text.CharSequenceCharacterIterator.setIndex(CharSequenceCharacterIterator.java:83)
	at android.icu.text.RuleBasedBreakIterator.CISetIndex32(RuleBasedBreakIterator.java:1126)
	at android.icu.text.RuleBasedBreakIterator.isBoundary(RuleBasedBreakIterator.java:503)
	at android.text.method.WordIterator.isBoundary(WordIterator.java:95)
	at android.widget.Editor$SelectionHandleView.positionAtCursorOffset(Editor.java:5491)
	at android.widget.Editor$HandleView.invalidate(Editor.java:4592)
	at android.widget.Editor$SelectionModifierCursorController.invalidateHandles(Editor.java:6169)
	at android.widget.Editor.invalidateHandlesAndActionMode(Editor.java:1985)
	at android.widget.TextView.spanChange(TextView.java:9968)
	at android.widget.TextView$ChangeWatcher.onSpanRemoved(TextView.java:12590)
	at android.text.SpannableStringBuilder.sendSpanRemoved(SpannableStringBuilder.java:1298)
	at android.text.SpannableStringBuilder.removeSpan(SpannableStringBuilder.java:500)
	at android.text.SpannableStringBuilder.removeSpan(SpannableStringBuilder.java:805)
	at android.text.SpannableStringBuilder.removeSpan(SpannableStringBuilder.java:793)
	at com.yydcdut.markdown.utils.SyntaxUtils.removeSpans(SyntaxUtils.java:294)
	at com.yydcdut.markdown.live.HeaderLive.format(HeaderLive.java:90)
	at com.yydcdut.markdown.live.HeaderLive.onTextChanged(HeaderLive.java:63)
	at com.yydcdut.markdown.live.LivePrepare.onTextChanged(LivePrepare.java:81)
	at com.yydcdut.markdown.MarkdownEditText.onTextChanged4Controller(MarkdownEditText.java:252)
	at com.yydcdut.markdown.MarkdownEditText.access$700(MarkdownEditText.java:44)
	at com.yydcdut.markdown.MarkdownEditText$EditTextWatcher.onTextChanged(MarkdownEditText.java:176)
	at android.widget.TextView.sendOnTextChanged(TextView.java:9796)
	at android.widget.TextView.handleTextChanged(TextView.java:9893)
	at android.widget.TextView$ChangeWatcher.onTextChanged(TextView.java:12551)
	at android.text.SpannableStringBuilder.sendTextChanged(SpannableStringBuilder.java:1269)
	at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:575)
	at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:229)
	at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:36)
	at android.widget.TextView.deleteText_internal(TextView.java:12060)
	at android.widget.TextView.onTextContextMenuItem(TextView.java:11326)
	at android.widget.Editor$TextActionModeCallback.onActionItemClicked(Editor.java:4196)
	at com.android.internal.policy.DecorView$ActionModeCallback2Wrapper.onActionItemClicked(DecorView.java:2515)
	at com.android.internal.view.FloatingActionMode$3.onMenuItemSelected(FloatingActionMode.java:98)
	at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:776)
	at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:148)
	at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:923)
	at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:913)
	at com.android.internal.view.FloatingActionMode.lambda$setFloatingToolbar$0(FloatingActionMode.java:123)
	at com.android.internal.view.-$$Lambda$FloatingActionMode$LU5MpPuKYDtwlFAuYhXYfzgLNLE.onMenuItemClick(Unknown Source:2)
	at com.android.internal.widget.FloatingToolbar$FloatingToolbarPopup$2.onClick(FloatingToolbar.java:443)
	at android.view.View.performClick(View.java:6600)
	at android.view.View.performClickInternal(View.java:6577)
	at android.view.View.access$3100(View.java:781)
	at android.view.View$PerformClick.run(View.java:25912)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:193)
	at android.app.ActivityThread.main(ActivityThread.java:6923)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
@silas229

This comment has been minimized.

Copy link
Author

@silas229 silas229 commented Oct 26, 2019

Steps to reproduce:

Cut this markdown text:

# Heading
## Subheading
+ Item 1
+ Item 2

Screenshot

Screenshot

@stefan-niedermann

This comment has been minimized.

Copy link
Owner

@stefan-niedermann stefan-niedermann commented Oct 27, 2019

I can reproduce the crash (maybe we can catch the IndexOutOfBounds as a quickfix).

But this did (as expected) not delete any notes - not on the device nor on the server side.

Can you please answer this question:

Did you maybe copy your Notes directly in the filesystem and not use an sync client for that @silas229?

I think there is a general issue with your server setup.

@silas229

This comment has been minimized.

Copy link
Author

@silas229 silas229 commented Oct 31, 2019

I was able to restore my notes. But they didn't appear in the trash at the beginning.

I only ever edited the notes with the Android app or with the Nextcloud app in the browser.

@stefan-niedermann

This comment has been minimized.

Copy link
Owner

@stefan-niedermann stefan-niedermann commented Nov 3, 2019

How did you restore your notes? Where have they been?

@silas229

This comment has been minimized.

Copy link
Author

@silas229 silas229 commented Nov 4, 2019

The notes folder was in the trash, but was marked empty. That was wrong, though. After I had restored it, all the notes were there again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.