eSIM cannot be added this code is no longer valid: Causes and Fixes

Understanding the "this option" Error
Few things are more frustrating during travel preparation than scanning a digital SIM profile only to see the alert: the service. This prompt, frequently encountered on Apple iOS devices and equivalent Android interfaces, indicates that your device contacted the Subscription Manager Data Preparation (SM-DP+) server, but the activation token assigned to your QR code was rejected.
Before assuming your digital profile is permanently broken, it is essential to understand why this occurs. In the majority of instances, the underlying eSIM profile is intact, but the activation session has timed out, the profile has already been partially downloaded, or the carrier enforces single-use QR parameters. Before troubleshooting network protocols, always check eSIM compatibility by device to confirm your hardware is unlocked and ready to host an active digital line.
Primary Causes of the "Code Is No Longer Valid" Alert
Digital carrier profiles operate through secure, encrypted handshakes between your handset's eUICC chip and the carrier's provisioning server. When this link fails, your phone displays a generic invalid code message. The root causes typically fall into four distinct categories:
- The QR Code Has Already Been Installed: The vast majority of travel and consumer eSIMs are single-use. If you scanned the code, experienced a network lag, and scanned it a second time, the server marks the code as consumed.
- Ghost or Incomplete Profiles: If your local Wi-Fi drops mid-installation, the profile may sit silently in your device settings without appearing as fully active, preventing repeated scans.
- Carrier Expiration Timelines: Some global mobile providers configure QR codes with a strict activation window (typically 30 to 90 days from purchase). If this window lapses before activation, the code revokes automatically.
- Device Network Locks: If your smartphone is carrier-locked to your domestic provider, attempting to register a foreign eSIM will cause the activation server to terminate the request, sometimes misreporting the error as an invalid code.
How to Fix the "Code Is No Longer Valid" Error
To resolve this error without purchasing an unnecessary replacement, work through these systematic steps.
1. Check if the Profile Is Already Installed
Often, the initial scan succeeded despite showing an error dialogue. On an iPhone, navigate to Settings > Cellular (or Mobile Data). On Android, open Settings > Network & Internet > SIMs. Look through your active and inactive cellular plans. If you see a line labeled "Secondary," "Personal," or named after your travel destination, the plan is already installed. Rename the profile, toggle it on, and configure your data roaming according to the provider's instructions.
2. Manually Input Activation Details
If the camera scanner misreads the embedded syntax of the QR code, the automated setup will fail. Most providers issue an SM-DP+ Address and an Activation Code alongside the graphical QR code. Choose Enter Details Manually at the bottom of your phone's cellular setup screen and paste these strings directly. Pay close attention to trailing spaces, which frequently cause validation errors.
3. Verify Internet Connection and Disable Active VPNs
Your smartphone requires a stable connection to negotiate the cryptographic keys with the carrier. Captive portals commonly found at airport and hotel Wi-Fi networks frequently block communication to remote provisioning servers. Disable any active VPN software, connect to a secure private network, and retry manual entry.
If you encounter broader installation bottlenecks, follow our guide to fix eSIM problems step by step to address lower-level firmware and configuration conflicts.
Troubleshooting Scenarios: Matrix of Causes and Remedies
| Observed Behavior | Underlying Cause | Recommended Action |
|---|---|---|
| Error appears on first scan of a brand-new plan | Unstable Wi-Fi during the SM-DP+ handshaking process | Switch to a reliable internet connection; enter the SM-DP+ code manually. |
| Error appears when transferring to a new phone | Single-use carrier policy preventing profile migration | Request a profile reset or newly minted QR code from provider support. |
| Error appears after deleting an inactive line | Deleted eSIM profile cannot be recovered or re-scanned | Contact provider; deleted profiles must be reissued from scratch. |
| Error occurs while setting up abroad | Carrier-locked handset rejecting third-party profiles | Contact domestic home carrier to lift device network restrictions. |
Preventing Failed eSIM Installations
Preventative preparation is the most reliable way to avoid digital connectivity failures while traveling. Carriers configure varying activation triggers: some begin their validity window the moment the profile registers with a local cell tower, while others initiate upon installation. Reviewing how to install an eSIM before you fly ensures your device is configured properly in advance, minimizing activation panics at the terminal.
Remember never to delete an eSIM from your device if it is failing to pick up signal. Deleting the profile burns the secure digital container, rendering the QR code permanently unusable and requiring provider intervention to resolve.
Frequently Asked Questions
Why does my eSIM show no service after landing?
An eSIM typically shows "No Service" upon landing because the device has not established a roaming connection with a supported local partner network. To resolve this, verify that your eSIM line is toggled on, confirm that Data Roaming is enabled specifically for that profile in your cellular settings, and verify that your APN (Access Point Name) matches your provider's instructions. In some instances, it can take up to ten minutes for the SIM to negotiate its first handshake with foreign cell towers.
Will reinstalling the eSIM delete my plan?
Yes, attempting to reinstall an eSIM by deleting it from your phone will permanently remove the active profile and void your access to that data plan. Unlike physical SIM cards, most travel eSIM profiles are single-use tokens; once deleted from the eUICC chip, the original QR code cannot be scanned again. Always leave the profile intact on your device and adjust network configurations or contact customer support instead of deleting the profile.
Can I get a refund if the eSIM never worked?
Most reputable eSIM providers will issue a full or partial refund if the profile was never activated and zero data was consumed, provided technical support is unable to resolve the issue. However, refund eligibility often requires you to reach out to the provider before your travel dates conclude, enabling their engineering team to review the SM-DP+ server logs and verify that the QR code went unused.
Does airplane mode fix eSIM connection problems?
Toggling Airplane Mode on for approximately 30 seconds and then turning it off is an effective, simple troubleshooting step. This action disconnects the device from the baseband processor and forces the cellular modem to perform a fresh scan for available mobile towers, clearing temporary network registration glitches and re-authenticating your data connection with the local partner carrier.
Esim Cannot Be Added This Code Is No Longer Valid: the essentials
This section summarises the factors that decide the outcome for you — price, data allowance, validity and activation.
Compare eSIM Prices Before You Fly
Live rates from Airalo, GigSky, Yesim, Saily and Drimsim — updated daily.
Browse 215 destinations →