Project

General

Profile

Actions

Bug #256

closed

Prevent browser from refreshing when launching a new intent with no data

Added by Raven Nine over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Next Release
Start date:
03/02/2018
Due date:
% Done:

0%

Estimated time:

Description

When switching from Privacy Browser to another app and back again, Privacy Browser refreshes the page. In some circumstances, for example a login process that requires to receive a code and then enter it means going to email app and back to browser but, the browser refreshes that page and that one time code entry process is broken and has to start over. This makes it impossible to do. I had this frustrating experience many times especially during account signups and account verifications.


Files

Version Page 1.png (83.4 KB) Version Page 1.png Soren Stoutner, 03/05/2018 10:03 AM
Version Page 2.png (107 KB) Version Page 2.png Soren Stoutner, 03/05/2018 10:03 AM
Actions #1

Updated by Soren Stoutner over 6 years ago

  • Subject changed from Option to prevent browser refreshing to Prevent browser from refreshing when the activity is sent to the background and then brought back to the foreground
  • Assignee changed from Raven Nine to Soren Stoutner
  • Priority changed from 2 to Next Release

Thanks for the bug report.

There is some logic in the `onRestart()` command that is run when the activity is brought to the foreground that is causing the refresh. This code is designed to apply any changes in settings that may have occurred. But I can limit this code to only run when the app returns from the Settings activity, which will likely fix the problem.

Do you have an example URL that was causing you problems that I can use to test?

Actions #2

Updated by Soren Stoutner over 6 years ago

Received the following in an email:

You're welcome, I didnt realise it was a bug. I havent got a particlar URL to give you but I think you'll find it refreshes everytime it is sent to the background and back to forground regardless of which website.I wonder if you might make the progress bar a little bit thicker too, it is difficult to see on a phone screen.
On a different note, I joined redmine so I could post to your issue tracker, I had only ever used github but I noticed redmine appears to have a nice layout, so I was wondering how do you find using redmine and why you might prefer it over github?

Actions #3

Updated by Soren Stoutner over 6 years ago

  • Status changed from New to Feedback

In my testing I am not able to replicate the problem. On my devices the page does not refresh when switching between apps and no data is lost from fields.

It is possible that there is some problem specific to your device or the URL you were visiting. Can you send me a screenshot of your About → Version?

The progress bar is thinner on older version of Android and thicker on newer versions.

I use Redmine because it is open source and I can host it on my own server. Github is closed source. I chose Redmine over the other open source options because of it does what I need well and was easy to install.

Updated by Soren Stoutner over 6 years ago

Raven Nine responded by email:

I attached screenshots, I noticed if I enter text into any website form then leave the browser to use another app and then come back to browser, it refreshes and the text previously entered is lost.

Actions #5

Updated by Soren Stoutner over 6 years ago

You have a really old version of WebView (30.0.0.0 vs the current 64.0.3282.137), which is what shipped with KitKat 4.4.2. Likely, if you could update it would resolve the issue. But I don't think that is possible to do on your device.

https://developer.chrome.com/multidevice/webview/overview

At some point I am going to have to remove support for KitKat, but I am trying to hold off on that as long as possible.

There are some changes I can make to the code that may have an impact. I have created a debug build. Please test it and let me know if it helps.

The debug builds cannot be installed over the production versions because the signing key is different. Below are links to two copies. One is for the standard version, which is what you currently have installed. To install this would require that you uninstall your version and lose any settings and bookmarks you may have. If that would cause difficulty, you can install the free version, which will show up as a separate app. It is identical to the standard version except for the banner ad across the bottom. You can use it to test and see if these code changes make a difference.

https://download.stoutner.com/privacy-browser/app-standard-debug.apk

https://download.stoutner.com/privacy-browser/app-free-debug.apk

Actions #6

Updated by Raven Nine over 6 years ago

I installed the standard version
he same thing happens
Enter text into any web form, search engine etc.
Close out Privacy Browser.
Re-open privacy browser.
Web page is still as I left it, entered text is still there.
A split second later, web page reloads, progress bar shows page reloading.
Previously entered text is gone.

I found a workaround.
Use recent apps button on phone to switch from privacy browser to another app.
Use recent apps button to switch back.
Page does not reload, previously entered text remains in the web form.

Actions #7

Updated by Soren Stoutner over 6 years ago

  • Subject changed from Prevent browser from refreshing when the activity is sent to the background and then brought back to the foreground to Prevent browser from refreshing when launching a new intent with no data

I misunderstood the original bug report. I had assumed you were using the recent apps button to switch between apps. Now that I understand you were using the launcher icon I am able to replicate this bug on my device.

The root cause is that when the launcher icon is pressed a new intent is created to launch the app. The new intent enters the program through a different set of code. There was a flaw in the logic of this code that always caused the web page to reload. I have changed the code so that the page is only reloaded when the intent contains a new URL (for example, when clicking a link from another app).

This fixes the bug on my device. I have updated the debug build so you can test it as well. The previous link now has the new build.

Actions #8

Updated by Raven Nine over 6 years ago

Yes the new build fixed it on my device too thanks Soren! Apologies for not making the bug report more clearly to begin with, I'll try to do better in future.
I have come across other bugs related to the way pages render but I didnt bother you with them because I think they are related to webview.
I would like to update webview but like you said, it doesnt seem possible on my device, bootloader is locked I have been unable to get root.

Actions #9

Updated by Soren Stoutner over 6 years ago

It is quite possible that there are some rendering issues with your older WebView. You might also look at changing the user agent to see if that makes a difference.

https://www.stoutner.com/user-agent-problems/

Actions #10

Updated by Soren Stoutner over 6 years ago

  • Tracker changed from Feature to Bug
  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF