VPN credentials lost when switching networks

REPRODUCIBILITY (% or how often): 100 %
BUILD ID = OS VERSION (Settings > About product):
HARDWARE: Xperia 10 dual SIM
REGRESSION: (compared to previous public release: Yes, No, ?): No


Entered VPN credentials are lost when the network is restarted, off for a long time, or switched from one type to another (such as wi-fi to mobile).


A connection to the Internet and a quota for mobile data.


  1. Turn the wi-fi on;
  2. Enter valid credentials for a VPN to turn it on;
  3. Turn the wi-fi off;
  4. Turn the mobile data on.


VPN reconnects and its credentials persist.


VPN doesn’t reconnect and its credentials are lost.


The situation with VPN credentials is getting beyond ridiculous. You’ve had this reported more than half a year ago 5 times in the forums (VPN login credentials are (also not) saved using PIA VPN, VPN credentials gone on restart 3.4 on XA2, [] VPN losing credentials, VPN randomly loses login credentials, Switching off mobile network and restart it, forget about all the credentials that were saved in the vpn) and you do nothing but make empty promises and deliver partial fixes. I don’t care if you consider this a duplicate or not, just fix it. I can’t describe how far beyond me it is that you can’t save two pieces of text in a file, encrypted or not, and read it from there. Even if there are some system keychains and the like, they can’t be that unreliable - you are. Just get this over with.
Now, in case this simple feature which works on any other OS really is beyond your capabilities, at least cease and desist using a pop-up for entering the credentials. It disappears immediately upon switching to another application to copy the forgotten credentials from. This way not only you don’t fix it, you also prevent us from doing so.

1 Like

There is a possible workaround for this situation, I have done the following:

Write the credentials into a text file, named somename.txt.
Copy or move this file to some system folder, that can not be accessed by error while normal use of the telephone.
In the settings of VPN you can set 'import credentials from file…" and give a location where this file is.
Enter the location where you copied the file with the credentials.

After this, the VPN fetches the credentials from this file and you don’t have to input them manually.
Since I did so, I never again had to re-enter my VPN credentials (since many months)

The text file should contain absolutely nothing except the credentials!

1st line: username[Enter]
2nd line: password
Nothing else should be in the file. This works. The only disadvantage is that your credentials are in an unencrypted file somewhere in the system.


I appreciate you trying to help, @Seven.of.nine. I’m sure your approach works. Unfortunately, it doesn’t relieve Jolla of its responsibility because you said it yourself - insecure. I personally preferred to work around it by adding the credentials to a password manager and when the VPN breaks, copy them to a text file (to form a single line since the pop-up closes immediately, as I said) and re-enter them. However, I cannot tell how far my patience with this would go, so I might as well end up using your approach. Thank you.


I was about to file a new bug report but found out this thread.

I have multiple different location profiles for VPN in my phone. Today my phone (Xperia 10ii with suddenly asked for VPN credentials when I exited from a no signal place to a place with mobile coverage. I tried three different profiles and all of them asked for credentials. Did not have time to further debug the issue but now the same three ones are still without credentials and the ones that I did not try earlier have theirs still stored. It’s relatively easy to fix the problem by giving the creds again but still an annoying issue as they are long lists of random symbols.

No idea how to solve the main issue.
Re-entering credentials is not easy.
As the credentials window can’t be put in background.
As workaround, I send from my PC to myself the credetials minus 1 or 2 chars (security, just in case…) in some messaging app or email on the same line.
So I can copy ID and PW at the same time.
Then, I paste both in the ID and password fields and then only delete the inappropriate ones and add the missing chars.
Well, still a hassle, but less than whorse… :slight_smile:

Edit: does the workaround from here work for you?
(Settings → SF Utilities → restart network subsystem)

Just as an update I have been running the latest OS version since the release and yesterday I lost saved VPN-credentials again. I immediately rebooted the phone and all worked fine after that, but today I lost another one.

Just to rule it out, in both of the recent situations there were now no changes in the network prior the happening. They just out of the blue popped the vpn login screen on top with missing credentials.

Once again lost VPN credential. I was browsing the sailfishos forum with Android Firefox when suddenly I couldn’t scroll down a thread anymore as it was just loading it endlessly. After refreshing the browser the phone suddenly asked for the VPN credentials again. However, this time it could not save them and kept asking them over and over again. I tried rebooting few times and still no luck. Finally removing the VPN profile completely and reconfiguring it from the scratch helped and now it works fine again.

Thanks for the report and comments, have you seen this with the latest release?