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

Automatically clear data breaks app on change app #802

Closed
rwdj opened this issue Dec 19, 2020 · 22 comments
Closed

Automatically clear data breaks app on change app #802

rwdj opened this issue Dec 19, 2020 · 22 comments

Comments

@rwdj
Copy link

rwdj commented Dec 19, 2020

Steps to reproduce:

  1. Turn on Automatically clear data. Any settings. I've tried multiple configs, but I specifically had "Clear Tabs and Data" and "App Exit, Inactive for 1 hour".
  2. Change app. Don't bother navigating to a web page. It's not necessary.
  3. Change back. The app is not functional. Address bar is usable, but attempts to navigate the web fail. All buttons stop functioning; although, the UI continues to work, meaning buttons blink as they should when pressed, but no menus appear.

PS: I'm loving this app.

@bwaresiak
Copy link
Collaborator

@rwdj sorry to hear it doesn't work for you.

I've tried to reproduce the problem but couldn't. Shall I wait for Auto Clear to happen (e.g. 1hour) between steps #2 and #3 or is just switching the app enough for the problem to manifest?

Also can you share what iOS version, device and DDG app version you are using?

Thank you!

@rwdj
Copy link
Author

rwdj commented Dec 22, 2020

I just turned the feature back on and it stopped happening. To my knowledge, I haven’t updated since, so I’m not sure what happened.

Since it’s no longer happening, I’ll tentatively close this issue. But I’ll keep an eye on it and reopen if it happens again and try to identify what changed.

Just in case it comes back up, here are the answers to your questions:

No waiting was needed. I could just flip to another app and back and it’d seize.

This was my info at TOI. It was in my original post, but I edited it out:

DuckDuckGo iOS Version: 7.61.3.0
Device: iPhone 11 Pro
iOS: 14.2

@rwdj rwdj closed this as completed Dec 22, 2020
@rwdj
Copy link
Author

rwdj commented Dec 24, 2020

It's happening again. Can't think of anything I've done different. If I disable Automatically Clear Data, it works fine. If I enable Automatically Clear Data, it does this usually:
image
Note that my Favorites are gone and the 1 tab indicator is gone. If I close the app and reopen, everything is fine.

@rwdj
Copy link
Author

rwdj commented Dec 24, 2020

@bwaresiak I can't reopen the issue and am not sure if you got pinged, so here's a ping.
Merry Christmas Eve!
I'll just disable auto clear for now.
I'm a developer too (not iOS developer) and have a MacBook that I'm not afraid to use to get any diagnostic data you want from me.

@bwaresiak bwaresiak reopened this Dec 29, 2020
@bwaresiak
Copy link
Collaborator

@rwdj thanks! Hope you had great Christmas. :)

Have few things in mind:

I. Are there any DDG-related crashlogs on your device?
II. When this happens, is there any indication of a deadlock? E.g.:

  1. Open the app - see UI is stuck.
  2. Background the app again.
  3. Wait 10 seconds.
  4. Reopen the app - if you see launch screen and it is starting "from scratch" that could mean we have a deadlock and watchdog just killed our app (as it couldn't process background event on time).

III. I did enable this option on my device but so far I haven't seen any problems. Can you share if you have any of these settings enabled:

  • Auth Lock.
  • Keyboard options for app launch / new tab.
  • Fireproofing (and if you have any websites fireproofed).
  • GPC.

Does this happen when you open our app by tapping its icon, or maybe when navigating from links (default browser/share) or from widget (new search/favorite)?

@rwdj
Copy link
Author

rwdj commented Dec 29, 2020

It's stopped happening again. Waiting to see when it happens again.
I. I’ve looked through crashlogs and didn’t see any entries for DuckDuckGo.
II. I’ll try that procedure next time it starts happening.
III.

  • Application Lock: default - no
  • Keyboard Options:
    • New Tab: default - yes
    • App Launch: default - no
  • Fireproofed Sites: 4
  • GPC: default - yes

Since I’ve made my report and it’s started/stopped/started working, I haven’t changed any settings except maybe adding bookmarks, but I doubt that’s it.

DDG is my default browser and I don’t use the widget. I tried opening a url in an email (both with and without DDG open in background) and wasn’t able to trigger it. However, I’d like to point out part of my original procedure was reopening DDG before and after. That means no webpages were open at the time including webpages opened from other apps. That said, I'm having trouble reproducing it again.

Now that it’s working, I notice the locked-up state resembles what the app looks like when the active app isn’t DDG (by viewing from the background app switcher). Possibly DDG wasn’t recognizing it became the focused/active app?

@bwaresiak
Copy link
Collaborator

@rwdj I've been trying to reproduce this issue over the Christmas period but had no success so far.

For now my two ideas are:

  • Deadlock: in such case scenario I've wrote above (backgrounding the app) should make watchdog kill the app.
  • Background State overlay not being removed: maybe something is messing up UIWindow state and overlay is not properly removed.

I could try to hack something for the latter issue (trying to tweak windowLevel / hidden properties on the UIWindow), but first I'd like to first get confirmation from you whether it may be related to the deadlock idea or not.

@rwdj
Copy link
Author

rwdj commented Jan 4, 2021

I still can't reproduce it anymore. Great for me! Not so great overall.

It sounds more like the overlay, because I don't think a killed app would act the way it did.

If watchdog killed the app, would the app be interactable? When locked-up, the app buttons and even the address bar were responsive; they just didn't do anything functional: broken buttons. They made GUI action indications (changing color) without actually doing the intended function. I was even able to type things into the url.
I presume that's not what a killed app does. It seemed more like it was an overlay.

@bwaresiak
Copy link
Collaborator

@rwdj thank you, that indeed looks like problem with the overlay. Glad to hear this seem to be a rare problem! Nonetheless, I'll try to tackle it this week.

@bwaresiak
Copy link
Collaborator

@rwdj I've made a PR #804 aimed at tackling this: get a signal if this happens (to understand impact) and then try to recover. Ideally we will like to fix this, but first we need to be able to tell if our tweaks are going to have any effect.

@rwdj
Copy link
Author

rwdj commented Jan 15, 2021

Well. Huh. Today, it's happening sporadically without any noticeable pattern. Sometimes it does. Sometimes it doesn't. This is very different from before where it would happen every time or not at all.

@rwdj
Copy link
Author

rwdj commented Jan 15, 2021

Scratch that. Reproducible. For now. I also took a video. But I don't think it'll help. I think you've also gotten a handle on it.

@bwaresiak
Copy link
Collaborator

@rwdj I'm going to release new version early next week, let's see if that changes anything.

@bwaresiak
Copy link
Collaborator

@rwdj Could you get 7.61.8 from AppStore and see if the issue happens, that it is recovering once you tap on any button?

@rwdj
Copy link
Author

rwdj commented Jan 21, 2021

I'll do that and let you know the next time it happens! In the meantime, I just re-enabled automatically clear data and it's not happening again. Last time it took nearly long over a week to start happening again.

@rwdj
Copy link
Author

rwdj commented Feb 1, 2021

I still haven't seen it happen again. I know I'd recognize it if it did by showing the overlay and I'd need to click a button to fix it, but it just hasn't happened.

@bwaresiak
Copy link
Collaborator

@rwdj Thank you for checking in :) If you manage to see it please let us know. In the meantime we've got some signal about it and I've got an idea for a permanent fix - will try to address it this week.

@rwdj
Copy link
Author

rwdj commented Apr 17, 2021

I know I've seen the temporary fix. Not sure when the last time was or if it's been properly fixed. At the very least, it's fixed from a user perspective.

@rwdj
Copy link
Author

rwdj commented Apr 17, 2021

Ah. Literally just saw it happen again. But your temporary fix saves the day.

@brindy
Copy link
Contributor

brindy commented Aug 27, 2021

I was trying to reproduce this recently and was unable to, is it still an issue for your @rwdj ?

@rwdj
Copy link
Author

rwdj commented Aug 27, 2021

Nope. Feel free to close.

I only left this open for tracking purposes for y'all figuring out the root cause, but I haven't seen the temporary fix triggered in a good while.

@brindy
Copy link
Contributor

brindy commented Aug 27, 2021

Great, thanks!

@brindy brindy closed this as completed Aug 27, 2021
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

3 participants