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

sharing a Note crashes the notes app #290

Closed
spaetz opened this issue Nov 3, 2017 · 14 comments
Closed

sharing a Note crashes the notes app #290

spaetz opened this issue Nov 3, 2017 · 14 comments

Comments

@spaetz
Copy link

spaetz commented Nov 3, 2017

1 I shared a Note read/write with another nextcloud account.
2 2nd account moves the shared file into the "Notes" directory
3 It is now visible with the notes app of the 2nd account. However, I receive lots of "notes has repeatedly crashed" popups in Android, and when I modify the note, I get an "sync error exclamation mark" on that note in the app.

It would be terriffic if sharing of notes between nextcloud accounts would work 😃

@spaetz
Copy link
Author

spaetz commented Nov 3, 2017

Related dependent on nextcloud app?

nextcloud/notes#124
nextcloud/notes#134

@stefan-niedermann
Copy link
Member

Thank you for bug report. Did this just happen with the recently released version 0.12.1 or did you notice this behaviour earlier?

@spaetz
Copy link
Author

spaetz commented Nov 3, 2017 via email

@korelstar
Copy link
Member

The crash should definitely not happen. Working with shared notes works for me very well. Hence, please try to investigate this problem on your device and give feedback:

  • When exactly does the app crash?
  • Where do the notes come from? Did you add them in the Android app?
  • Does this happen for another account (with other notes or without any notes), too? Maybe it's related to App crashing on editing note with CRLF line ending #215?
  • Could you please have a look at the Android logcat? There, an exception of the crash should be shown. Logcat is part of the Android SDK and it is conveniently integrated in AndroidStudio.

@spaetz
Copy link
Author

spaetz commented Nov 5, 2017

I open the note, I edit the note it says "saved" in the toast. I close the notes app.
soo thereafter I get popups "The notes app has crashed" and "The notes app crashes repeatedly". So it is while it is doing something in the background. I will get an adblog soon, I am currently traveling for a few days and do not have adb at hand on this laptop.

I will try it out with a different account and report back.

With regard to how I created the note:
0 Create a note on account A with the Android app.
1 I shared a Note read/write with another nextcloud account B.
2 Account B moves the shared file into the "Notes" directory
3 It is now visible with the notes app of account B. However, I receive lots of "notes has repeatedly crashed" popups in Android

[UPDATE] when I check the nextcloud web app, the changed note seems to have been saved fine. But the changes do not show up in Account A, so it seems the file sharing between both accounts is now broken. Just to clarify. Sharing a file and moving it into the the "Notes" folder is supposed to work, right?
[UPDATE2] I repeated my steps from the beginning and can now say, that when I share a note file via the web interface, sync the android app and change the note via the android app, the note file is not shared anymore afterwards, instead it seems to have deleted and recreated the file on the server (the file owner is also not the original "sharer" anymore. I give up for now.

@korelstar
Copy link
Member

"Sharing a file and moving it into the the "Notes" folder is supposed to work, right?"
It's not an officially published feature of the app, but I tested it and it works for me. In practice, I'm sharing a sub-folder of the Notes folder between two accounts. Here, all notes in that folder can be read and edited from both people on their smartphone. But I've also tested sharing a single note, and I'm able to read and edit the note from both accounts without any crashes and without losing the "connection" between the shared note of both accounts.

To sum up: Currently, you have two issues:

  1. The Android app crashes repeatedly
  2. The "connection" between two accounts of a shared note is lost.

I'm looking forward to see the crash log from Android in order to fix the first issue and I hope that the second issue is a consequence of the first one. Therefore, I suggest to concentrate on the first issue, for now.

@spaetz
Copy link
Author

spaetz commented Nov 9, 2017

OK, I am back. Here is what I do (and I believe now, that this crash is unrelated to any sharing activity).

Open "notes" app. Close "notes" app by pressing home button.
Soon thereafter you get an android popup saying that notes has crashed.
If you say "open it again", another popup says that "notes" has repeatedly crashed.
Here is the adb logcat:

--------- beginning of crash
11-09 04:55:49.849  4606  4619 E AndroidRuntime: FATAL EXCEPTION: Binder:4606_2
11-09 04:55:49.849  4606  4619 E AndroidRuntime: Process: it.niedermann.owncloud.notes, PID: 4606
11-09 04:55:49.849  4606  4619 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String it.n\
iedermann.owncloud.notes.model.CloudNote.getContent()' on a null object reference
11-09 04:55:49.849  4606  4619 E AndroidRuntime:        at it.niedermann.owncloud.notes.model.SingleNoteWidgetFactory.getViewAt(SingleNo\
teWidgetFactory.java:97)
11-09 04:55:49.849  4606  4619 E AndroidRuntime:        at android.widget.RemoteViewsService$RemoteViewsFactoryAdapter.getViewAt(RemoteV\
iewsService.java:164)
11-09 04:55:49.849  4606  4619 E AndroidRuntime:        at com.android.internal.widget.IRemoteViewsFactory$Stub.onTransact(IRemoteViewsF\
actory.java:85)
11-09 04:55:49.849  4606  4619 E AndroidRuntime:        at android.os.Binder.execTransact(Binder.java:565)

Followed by more of the same:

11-09 04:55:55.550  5146  5158 E AndroidRuntime: FATAL EXCEPTION: Binder:5146_1
11-09 04:55:55.550  5146  5158 E AndroidRuntime: Process: it.niedermann.owncloud.notes, PID: 5146
11-09 04:55:55.550  5146  5158 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String it.n\
iedermann.owncloud.notes.model.CloudNote.getContent()' on a null object reference
11-09 04:55:55.550  5146  5158 E AndroidRuntime:        at it.niedermann.owncloud.notes.model.SingleNoteWidgetFactory.getViewAt(SingleNo\
teWidgetFactory.java:97)
11-09 04:55:55.550  5146  5158 E AndroidRuntime:        at android.widget.RemoteViewsService$RemoteViewsFactoryAdapter.getViewAt(RemoteV\
iewsService.java:164)
11-09 04:55:55.550  5146  5158 E AndroidRuntime:        at com.android.internal.widget.IRemoteViewsFactory$Stub.onTransact(IRemoteViewsF\
actory.java:85)
11-09 04:55:55.550  5146  5158 E AndroidRuntime:        at android.os.Binder.execTransact(Binder.java:565)

@dan0xii
Copy link
Collaborator

dan0xii commented Nov 9, 2017

@spaetz

Open "notes" app. Close "notes" app by pressing home button.
Soon thereafter you get an android popup saying that notes has crashed.

Are you at some point before the crash adding the single note widget to the home screen?

@korelstar
Copy link
Member

korelstar commented Nov 9, 2017 via email

@spaetz
Copy link
Author

spaetz commented Nov 9, 2017

I had a note on a widget earlier, but the widgets have all long been deleted, there is none active anymore. Could that still cause the symptom?

@dan0xii
Copy link
Collaborator

dan0xii commented Nov 11, 2017

Could you try to long press on your home screen where you previously had the widget placed and remove it. It could be that it still exists but is empty and hence the application crashing.

This does look like it'll be fixed when #293 is patched.

@stefan-niedermann
Copy link
Member

@spaetz does this still happen with v0.13.1?

@spaetz
Copy link
Author

spaetz commented Apr 2, 2018

I cannot reproduce this anymore. Closing, thanks for the reminder.

@spaetz spaetz closed this as completed Apr 2, 2018
@stefan-niedermann
Copy link
Member

Glad to hear that :) Thanks for retesting 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants