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

"Restore from file..." may not work in Firefox for Android #2378

Open
8 tasks done
tesmite opened this issue Nov 23, 2022 · 10 comments
Open
8 tasks done

"Restore from file..." may not work in Firefox for Android #2378

tesmite opened this issue Nov 23, 2022 · 10 comments
Labels
Firefox-Android specific to Android platform

Comments

@tesmite
Copy link

tesmite commented Nov 23, 2022

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is not a support issue or a question. For any support, questions or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

A bug exists on Firefox for Android that may prevent restoration from a file.
This bug does not always occur and sometimes it works fine after multiple attempts.
On some devices, the restoration operation can be performed normally without the bug.
https://user-images.githubusercontent.com/111569199/203508375-5187622a-8b36-49ef-a3e8-c0cc629fc28f.mp4

A specific URL where the issue occurs.

moz-extension://[different add-on ID per device]/dashboard.html#settings.html

Steps to Reproduce

1.Open Settings.
2.Press "Restore from file..." button.
3.Select backup of ublock settings.

Expected behavior

A pop-up dialog will appear asking if you want to restore the settings.

Actual behavior

No pop-up dialog appears and settings are not restored.
However, if you then select "Reset to default settings..." afterwards, it will behave as if the dialog has already appeared multiple times (check box to prevent the dialog from appearing again).

uBO version

uBlock Origin 1.45.2

Browser name and version

Firefox Beta for Testers 108.0b3

Operating System and version

OPPO A5 2020 (Android 10)

@gwarser gwarser added the Firefox-Android specific to Android platform label Nov 23, 2022
@gwarser
Copy link

gwarser commented Nov 23, 2022

Restoring freezes the UI for me. I can scroll, but no buttons work. I can open tab list and it then unfreezes. The dialog does not appear.


It seems, screen is dimmed, like with dialog, but no actual dialog appear. Firefox bug?

@gwarser gwarser added the unable to reproduce cannot reproduce the issue label Oct 26, 2023
@gwarser gwarser closed this as completed Oct 26, 2023
@Rudxain
Copy link

Rudxain commented Nov 10, 2023

@gwarser Why is this "closed as completed"? (rather than "not planned")

@Rudxain
Copy link

Rudxain commented Nov 10, 2023

related issue

@gwarser
Copy link

gwarser commented Nov 10, 2023

Because I cannot reproduce anymore on Firefox mobile. Can be related to file access permissions or this https://bugzilla.mozilla.org/show_bug.cgi?id=1797558

@gwarser gwarser reopened this Nov 10, 2023
@gwarser
Copy link

gwarser commented Nov 10, 2023

If I try restoring from Firefox home page, by launching uBO settings from add-on manager, then after applying the backup, Firefox will close the only tab leaving the browser with graphical glitch - uBO interface painted over "nothing". Just create new tab from menu and all will work fine.

If I try restoring by first opening any page (like example.com), then accessing uBO UI from the browser menu, all is working completely fine.

@gwarser gwarser removed the unable to reproduce cannot reproduce the issue label Nov 10, 2023
@Rudxain
Copy link

Rudxain commented Nov 10, 2023

If I try restoring from Firefox home page, by launching uBO settings from add-on manager, then after applying the backup, Firefox will close the only tab leaving the browser with graphical glitch.

[...]

If I try restoring by first opening any page (like example.com), then accessing uBO UI from the browser menu, all is working completely fine.

That seems consistent with my experience with the issue. I'll try restoring the backup from somewhere other than the homepage

@Rudxain
Copy link

Rudxain commented Nov 10, 2023

I'll try restoring the backup from somewhere other than the homepage

I tested, but the same behavior happens, regardless of homepage or site. The UI hangs, and there's no confirmation pop-up (usually)

@tesmite
Copy link
Author

tesmite commented Apr 26, 2024

It seems that there is a bug in Firefox for Android that causes Window.confirm() and window.alert() to fail to execute after selecting a file, since the error message by window.alert() when selecting the wrong file also does not seem to execute.
Is it preferable to wait for Firefox to fix it or change the implementation on the uBlock side?

@garry-ut99
Copy link

garry-ut99 commented Sep 23, 2024

tesmite: A bug exists on Firefox for Android that may prevent restoration from a file.
This bug does not always occur and sometimes it works fine after multiple attempts.
On some devices, the restoration operation can be performed normally without the bug.

I have been experiencing this bug sometimes occasionally in the past. When trying to restore a backup file, after selecting the backup file in file manager, no popup was appearing and nothing was happening, other time there was some lag/freeze, but finally again - still nothing was happening. But it was not a big problem for me, because then usually after 2nd or 3rd try, the popup was finally appearing and the backup file was imported properly.

But now, it has become a serious problem for me, because importing backup file doesn't work permanently, no matter how many times I try, even resetting uBO to default or reinstalling uBlock doesn't help to fix it. I am currently on Firefox 130 Mobile and have experienced it today, permanently unable to import the backup file - no popup appears. Importing the same backup file on Kiwi, on the same phone, works fine.

gwarser: Can be related to file access permissions or this bugzilla.mozilla.org/show_bug.cgi?id=1797558

There is another one, but it's stale/idle since a year:


UPDATED: Finally it has imported the backup file after X tries of reinstalling the extension, but it's not easy to make it work, and most likely it will break again soon.

@IRainman
Copy link

For me, this problem appears because before I disabled default file manager in Android.

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

No branches or pull requests

5 participants