Focus-android: BUG: Browsing history cleared after opening screenlock

Created on 17 Dec 2017  ·  20Comments  ·  Source: mozilla-mobile/focus-android

This might be part of #2004

How to reproduce:

1) Open Firefox Focus and read some article
2) Wait for screen to turn off and screenlock on
3) Open screenlock (in my case I've always used fingerprint when this has happened) and yo got yor screen opened but at the same second Foces clears browsing history, so you wont be able to just continue reading.

This doesn't happen all the time, in fact most of times everything works as should, but once in a while this is the result.

PS. Sorry if there's a report for this already, didn't find with quick search.

P5 bug

Most helpful comment

👍 Taking a look

All 20 comments

Hey @huuhaa – I haven't been able to reproduce this. A few questions:

  • Which device are you using and which version of Android?
  • Do you have any developer options enabled on your device? If so, do you have "Don't keep activities" enabled?
  • Do you have any special configurations on your device? e.g. task killers, rooted phone, etc.

@mcomella
Hi, I have Honor 8 with Android 7.0 & EMUI 5.0.1
Huawei does have app for phone managemet which includes white list for memory cleaning options and Firefox Focus is whitelisted at there.

I have previously enabled developers settings (needed to get some logs through USB for developer of app not related to this), but those have been disabled for long time by now, I see Developer settings at settings menu, but under that everything is disabled.

Phone is not rooted, no task killer, only other app than Huawei's own is Bitdefender at the background.

Hope this helps to narrow things out.

@npark-mozilla Any ideas how we might reproduce? Have you seen anything like this before?

@mcomella I tried it on both android 6.0 (Oneplus One) and 7.0 (Pixel 2) but I wasn't able to repro this yet.

@mcomella @npark-mozilla

Is there any way to get logfile what is happening on my device and then send it to you?

I'm facing this problem several times a day, which eventually forced me to switch default browser for android. Now jumping between Brave and Firefox. Would love to use firefox Focus as main browser again, but even those short tests ( I try it just once again) have ended up to history cleared. Usually after I get message to Whatsapp and change app for that reason, or have to do something and try to continue reading bit later.

@huuhaa you can connect your phone via usb cable with 'USB debugging enabled' set to true on your phone (Usually it's under System -> Developer options in settings, and if you don't see Developer options menu, Go to About phone and tap 'Build number' many times)

Then, you also need to have adb installed on your PC. For details, refer to:
https://developer.android.com/studio/command-line/adb.html

once you have the phone enabled and adb installed on your pc, you can check whether they are properly connected by typing 'adb devices' from the command prompt. If it lists your phone, it's all good.

Now type 'adb logcat > logfile.txt' from your console, and recreate the issue manually on your phone. once it happens, you can press ctrl+c or ctrl+z to stop logging. Now your logfile.txt will contain the log, and you can send that to us.

@npark-mozilla
Thanks! This is bit weird, but now I'm not able to reproduce this. Tried several times while writing logfile with adb but all just seemed to work. So far all has work after I have once again disabled those developer mode / usb debugging options. Will report if this appears again & try to get log of it.

Btw. In case I'm able to get that log, where do I place it? And since that logfile seemes to include tons of information I was thinking to ask if there is any such information ther that one shouldn't make it to everyone to see, or is there no worries about that?

@huuhaa I think you can just attach it to this issue. I don't believe the logcat shows any personal information, as it mostly shows the system messages.

I don't believe the logcat shows any personal information, as it mostly shows the system messages.

The content in logcat is up to the developers whose app you've installed so they, in theory, can contain personal information. I'd recommend one of:

  • Finding the process ID for Focus (it's the number in the parens on Focus-related messages) and grep for it, uploading that file, so we only show Focus entries because we don't log personal info (e.g. cat logfile | grep 123 > new_logfile) (this isn't great because it might leave out important system messages)
  • Finding the relevant Focus lines by hand and including them here (this isn't great because it's easy to miss a relevant line)
  • Email me or npark the file (I think my email is available from my github account) and let us know you did that by messaging in this issue.

@mcomella thank you for correction- i was only thinking about the logcat of the focus app. @huuhaa if the log is too big for email, lemme know, i’ll point you to a temp repo where you can drop the file.

Thanks for both of you! I try to reproduce that again, since I've already have faced both of these #2004 & #2005 once after last comment.

@mcomella & @npark-mozilla

I was finally managed to get logfile for this issue (#2005) and e-mailed that logfile to both of you. Hopefully that helps & possible fix will fix also #2004 and if not, let me know so I will try to get another logfile for that issue. Sure on the other hand I think that might be one of those things that remains to see, so if I later face that issue again I will report. :)

and e-mailed that logfile to both of you.

Great, thanks! Here's a Mozilla internal copy of it (to make it easier for any of us to solve): https://drive.google.com/open?id=1zNdSo2baZA3YRcoEMPw2X7GspQ_HJeKB

I may have missed some things but two things stood out to me:

4430:01-12 11:10:51.040 20168 20168 I art : Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroi
d/webkit/RenderProcessGoneDetail;

It sounds like the render process might be getting killed. We have a bug open to handle this #1630 but it appears huuhaa is actually running Android 7.0 anyway and onRenderProcessGone method was added in API 26 (Android O, 8.0).

It's weird that it's getting NoClassDefFoundError though – maybe the version of WebView is too new for the Android platform?

The other thing was:

7860  01-12 11:14:16.322 20595 20595 W cr_AwContents: Application attempted to call on a destroyed WebView
    1 01-12 11:14:16.322 20595 20595 W cr_AwContents: java.lang.Throwable
    2 01-12 11:14:16.322 20595 20595 W cr_AwContents:         at org.chromium.android_webview.AwContents.isDestroyed(AwContents.java:349)
    3 01-12 11:14:16.322 20595 20595 W cr_AwContents:         at org.chromium.android_webview.AwContents.isDestroyedOrNoOperation(AwContents.java:321)
    4 01-12 11:14:16.322 20595 20595 W cr_AwContents:         at org.chromium.android_webview.AwContents.getTitle(AwContents.java:559)
    5 01-12 11:14:16.322 20595 20595 W cr_AwContents:         at org.chromium.android_webview.AwWebContentsDelegateAdapter.loadingStateChanged(AwWebContentsDelegateAdapter.java:133)
    6 01-12 11:14:16.322 20595 20595 W cr_AwContents:         at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
    7 01-12 11:14:16.322 20595 20595 W cr_AwContents:         at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:9)
    8 01-12 11:14:16.322 20595 20595 W cr_AwContents:         at android.os.Handler.dispatchMessage(Handler.java:105)
    9 01-12 11:14:16.322 20595 20595 W cr_AwContents:         at android.os.Looper.loop(Looper.java:156)
   10 01-12 11:14:16.322 20595 20595 W cr_AwContents:         at android.app.ActivityThread.main(ActivityThread.java:6523)
   11 01-12 11:14:16.322 20595 20595 W cr_AwContents:         at java.lang.reflect.Method.invoke(Native Method)
   12 01-12 11:14:16.322 20595 20595 W cr_AwContents:         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
   13 01-12 11:14:16.322 20595 20595 W cr_AwContents:         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
   14 01-12 11:14:16.331  1199  1222 I ActivityManager: Displayed org.mozilla.focus/.activity.MainActivity: +472ms (total +551ms)

which backs up the render process theory.

Any ETA when this will be fixed? This has forced me to change my default browser. Currently using mostly duckduckgo browser, similar problem exists actually with that too, but so rarely that it's usable. With Focus I'm facing this many times in a day, so just waiting the fix now.

@pocmo any chance we could include this on 4.1? Mike had to work on firefox-tv so this issue hasn't been looked at. Also, probably a good time to resume triage perhaps?

@pocmo any chance we could include this on 4.1?

I added the 4.1 milestone - Let's see. Maybe we can get it in - code freeze is on Friday. I haven't read all comments here yet. So I'm not sure how actionable it is. Maybe @boek can investigate?

👍 Taking a look

This seems to be so specific to the device or configuration that it doesn't seem to be critical. I'll move this to the next milestone. In case we come up with a fix we can consider uplifting to the release branch during beta.

@huuhaa since this looks like a WebView bug, you could try switching to our GV Nightly using GeckoView and maybe we could be your default again :)
https://github.com/mozilla-mobile/focus-android/wiki/Release-tracks#nightly

Was this page helpful?
0 / 5 - 0 ratings

Related issues

antlam picture antlam  ·  6Comments

jonalmeida picture jonalmeida  ·  6Comments

abusedcharacter picture abusedcharacter  ·  5Comments

jonalmeida picture jonalmeida  ·  7Comments

danilodorgam picture danilodorgam  ·  5Comments