nextcloud / notes-android

✎ Android client for Nextcloud Notes app.
https://play.google.com/store/apps/details?id=it.niedermann.owncloud.notes
GNU General Public License v3.0
938 stars 134 forks source link

Widgets aren't working anymore #482

Closed stefan-niedermann closed 6 years ago

stefan-niedermann commented 6 years ago

cc @dan0xii creating single note or list widgets does not work anymre. Can you please have a look?

dan0xii commented 6 years ago

Where are you seeing this happen? On the master branch? They're both working fine for me in both themes on phone and VM.

stefan-niedermann commented 6 years ago

Two users complained about it directly after i released v0.22.2, i asked them for screencaptures because i can not reproduce it too.

Steps to reproduce are as simple as add one of the widgets to the homescreen. it simply "does not appear".

dan0xii commented 6 years ago

I'll try testing through other versions of android and see if that produces any different results.

stefan-niedermann commented 6 years ago

Both reporters are using Marshmallow (6.0).

StefanPp commented 6 years ago

I am one of the guys with this problem using 0.22.2 on LGE LG-H440n Marshmallow 6.0

I made a short viedeo demonstrating the problem Video

I tried re-install, empty desktop, empty cache etc.

Seems to be a problem, that the selection of items is not returned to the widget.

tecufanujacu commented 6 years ago

Me too on Android 6.0.1, Nextcloud Notes 0.22.2 and the problem #405 persists. As I reported in #476, the last working version is the 20.0

dan0xii commented 6 years ago

I spotted a bug in both widgets' code for the dark theme. I've fixed that now and have been testing on my phone with positive results so far.

If you have the ability to build from source then the changes are in this branch: https://github.com/stefan-niedermann/nextcloud-notes/commit/4cd609393f5dfcc2222cf25340133678f52d4287

kukukk commented 6 years ago

Hi!

I also have this problem on a Sony Xperia XZ1 Compact running Android 8.0.0, September 1 security patch level. I think it stopped working after the latest Android update from Sony. I tried the latest version (0.22.2) from F-Droid, the latest version from master and also from the widget5 branch. The fix mentioned here is not working for me. I'm trying to debug with Android Studio, but all I can see in logcat is: AppWidget failed to load:it.niedermann.owncloud.notes

I will try further debug and let you know if I found something...

dan0xii commented 6 years ago

Are you also on Android 6.0?

kukukk commented 6 years ago

Sorry, I accidentally sent my comment without finishing it. I have updated it...

kukukk commented 6 years ago

I quick update: it works with version 0.21.0, but it's no longer working with version 0.22.0.

kukukk commented 6 years ago

git checkout 8d39a10c3db25136dbacaf73cc36e217d583ece6 - the widget works git checkout fa3c3f4faa79a9843c138a0ec5c80c1888de17a7 - the widget doesn't work git checkout 7766f6504323b3e12149b0710d752c231726d83f - the app doesn't start, so I can't check.

So, I think that the problem is caused by one of the commits made on Aug 31 or Sep 4. Does it help, or do you need further refine?

Update: After backporting the modifications from "Notes has stopped on first run", I think that the commit causing the problem is "Dark themes for single note and note list widgets."

dan0xii commented 6 years ago

git checkout 8d39a10c3db25136dbacaf73cc36e217d583ece6 - the widget works git checkout fa3c3f4faa79a9843c138a0ec5c80c1888de17a7 - the widget doesn't work git checkout 7766f6504323b3e12149b0710d752c231726d83f - the app doesn't start, so I can't check.

So, I think that the problem is caused by one of the commits made on Aug 31 or Sep 4. Does it help, or do you need further refine?

Update: After backporting the modifications from "Notes has stopped on first run", I think that the commit causing the problem is "Dark themes for single note and note list widgets."

Appreciate the troubleshooting. Is the problem you're encountering the same as the one shown in @StefanPp's video?

@StefanPp, what launcher are you using? I haven't been able to reproduce the problem at all.

kukukk commented 6 years ago

Yes, it seems to be the same:

I also tested it on a Nexus 6P with Android 8.1 and the problem is not present.

Unfortunately, there is no useful message in the logcat. If you have any idea what to test, or if you prepare a commit with debug output you consider helpful I can run it on my Xperia where I can reproduce the problem.

dan0xii commented 6 years ago

I've updated the widget5 branch with some logging. Would you try that and send me a copy of the logcat? Either paste it here or email to dan0xii [at] pm [dot] me.

kukukk commented 6 years ago

Logcat sent by email. In case you have not received it, let me know, and I will paste here.

StefanPp commented 6 years ago

@dan0xii I use the orginal LG launcher that came with my LG Spirit H440N

dan0xii commented 6 years ago

Much thanks to @kukukk who has provided a lot of troubleshooting and testing information for this fix. We think we've figured it out now but could do with testing.