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

Newly imported WireGuard Configuration always disappear after a restore cycle #1865

Open
Mywk opened this issue Feb 10, 2025 · 7 comments
Open
Assignees
Labels
P0 Priority: 0 (urgent and important)

Comments

@Mywk
Copy link

Mywk commented Feb 10, 2025

My WireGuard VPN configuration randomly disappears after working for a while. I tried loading this configuration via QR Code (Generated by OPNSense) and manually, the outcome is the same for both.

  • Issue:
    • In the "Setup WireGuard" menu, it shows "No WireGuard VPNs" after configuration.
    • On the home screen, when connected, it incorrectly displays "Protected with WireGuard", but the VPN is not actually connected.

Expected Behavior:

  • The configured WireGuard VPN should persist and be visible in the "Setup WireGuard" menu.
  • The status on the home screen should accurately reflect the VPN connection state.

Steps to Reproduce:

  1. Configure a WireGuard VPN.
  2. [???]
  3. Check the "Setup WireGuard" menu (it incorrectly shows no VPNs).
  4. Observe the home screen (it falsely states "Protected with WireGuard").

App Info:

  • Version: v0.5.5n

Device Info:

  • OS: Android 14 (One UI 6.1)

Additional Context:

  • No manual deletion of the configuration was done.
  • Restarting the app does not restore the VPN configuration.
@ignoramous
Copy link
Collaborator

That's the first we've heard. Sounds super bad.

  • How many configurations do you have?
  • Does auto-deletion happen for any other configs, too?
  • Does it happen every few hours or after boot or after start/stop or seemingly randomly?

@Mywk
Copy link
Author

Mywk commented Feb 10, 2025

Hey ignoramous,

Q: How many configurations do you have?
A: 1, but tried with several.

Q: Does auto-deletion happen for any other configs, too?
A: All configurations are gone.

Q: Does it happen every few hours or after boot or after start/stop or seemingly randomly?
A: Killing the app and re-opening seems to trigger it immediately.

Meanwhile I managed to re-install the app and the issue seems to be gone, I'm not entirely sure what caused this but my guess would be that a broken config managed to screw everything up, probably some QR code config as I recall the app not being able to deal with those correctly, this could be related to issue #1863

Either way this can probably be closed for now.

.
Side rant: My first "hotfix" was to have a QR code saved as .jpg and just reload the configuration when it's gone and ended up finding that the Import does not process images (I select the configuration file 'Unknown "invalid file" error'.. Only then it occurred to me that the Import is for conf or zip files.)... Except I can't import .conf files because they don't show up at all, and txt files are not processed at all, so I guess I'm opening another issue. with the default Samsung file browser, but works fine with a third party one.

@ignoramous
Copy link
Collaborator

ignoramous commented Feb 11, 2025

Thanks.

Sounds like the app indeed entered some weird state. If it was consistently reproducible (like killing & restarting the app), adb logcat output would have helped root cause it.

Regardless, reinstall seems to have "fixed" whatever anomaly. So, that's positive.

re: side rant: please track at #1866

(closing, feel free to reopen)

@ignoramous ignoramous closed this as not planned Won't fix, can't repro, duplicate, stale Feb 11, 2025
@j-lakeman
Copy link

Steps to Reproduce:

  1. restore Rethink DNS from backup
  2. WireGuard config doesn’t get restored alongside other unexpected issues (might open separate issue for that)
  3. scan QR code from VPN provider
  4. WireGuard config gets added correctly and can be connected to
  5. kill Rethink DNS
  6. start Rethink DNS
  7. WireGuard config gone

Also I noticed when repeating steps 3-7 the wg# counter gets increased by 2 (wg7, wg9, wg11, …). So I'm assuming there could be a config graveyard somewhere not being shown by the interface.

pls reopen

@hussainmohd-a hussainmohd-a self-assigned this Feb 13, 2025
@hussainmohd-a hussainmohd-a reopened this Feb 13, 2025
@ignoramous ignoramous changed the title WireGuard Configuration Disappears Newly imported WireGuard Configuration always disappear after a restore cycle Feb 13, 2025
@ignoramous
Copy link
Collaborator

Thanks.

WireGuard config doesn’t get restored alongside other unexpected issues

Any other issue you encountered?

@ilyadel
Copy link

ilyadel commented Feb 17, 2025

Hello,
I reproduced this issue too after moving to a new phone (One UI 7, Android 15) and restoring a backup from an old one (same version)

@ignoramous ignoramous added the P0 Priority: 0 (urgent and important) label Feb 18, 2025
@ignoramous
Copy link
Collaborator

Sounds like a serious issue. We're taking a look on priority.

In fact, we're inclined to implement a proper backup & restore mechanism for proxies (which is long pending):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 Priority: 0 (urgent and important)
Projects
None yet
Development

No branches or pull requests

5 participants