Use this page to diagnose and resolve issues that occur after upgrading the Tyk Developer Portal.Documentation Index
Fetch the complete documentation index at: https://tyk.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
Before troubleshooting, ensure you have a database backup taken before the upgrade. If the Portal cannot be recovered, see Rollback to restore service quickly.
Prerequisites
- Access to Portal container or pod logs
- A database backup taken before the upgrade
- Access to the Portal Admin UI or the host where the Portal is deployed
Symptoms
Admin Portal is inaccessible after upgrade
Admin Portal is inaccessible after upgrade
1. Check that the database migration completedThe Portal runs database migrations automatically on startup. If a migration fails, the Portal may refuse to start or may start in a broken state.First, enable debug logging (see Enable debug logging). Then check the Portal logs for migration errors:Look for any of the following messages, which indicate a migration or connection failure:
SQLite support was removed in v1.14.0. If your deployment used SQLite, migrate to PostgreSQL or MySQL before upgrading.
failed to migrate database— the migration ran but encountered an errorfailed to connect to database— the Portal could not reach the database before the migration could start[error]— a GORM-level database error during the migrationAutoMigrate— any log line containing this string indicates the migration step was reached
CREATE TABLE, ALTER TABLE, CREATE INDEX).2. Check the theme versionEach Portal version ships with an updated default theme. If the theme is not upgraded after a Portal upgrade, the Admin UI may fail to render correctly.Follow the theme upgrade instructions to ensure your theme is compatible with the current Portal version.3. Check required environment variablesNewer Portal versions may introduce required configuration options. Review the Portal Configuration reference and verify that all required variables are present in your deployment.If you are upgrading to v1.14.0 or later, the following variables are now mandatory. The Portal will fail to start if either is absent or set to sqlite:| Environment variable | Config key | Required value |
|---|---|---|
PORTAL_DATABASE_DIALECT | Database.Dialect | mysql or postgres |
PORTAL_DATABASE_CONNECTIONSTRING | Database.ConnectionString | Connection string for your database |
API sync is broken after upgrade
API sync is broken after upgrade
After an upgrade, the Portal re-establishes connections with each Provider (Tyk Dashboard). If the Provider connection is broken, APIs do not synchronize and API Products may disappear from the Admin UI.1. Verify the Provider connectionIn the Admin Portal, go to Providers and check the status of each configured Provider. A disconnected or failing Provider will display an error status.If the Tyk Dashboard API credentials used by the Portal have changed, update them in the Provider settings.2. Trigger a manual syncTo force an immediate synchronization with all Providers:
- In the Admin Portal, go to Providers.
- Click Synchronize.
- Click the three-dot menu next to the Provider.
- Select Synchronize.
PORTAL_REFRESHINTERVAL. If automatic sync appears to be stuck, verify this value is set correctly and restart the Portal.SSO users cannot log in after upgrade
SSO users cannot log in after upgrade
This symptom affects Portal versions earlier than v1.14.1. On login, SSO users could lose their Team assignments or be incorrectly reassigned to the default Organisation and Team, sometimes creating duplicate accounts.Recommended fix: Upgrade to v1.14.1 or laterThe SSO user assignment issue is resolved in v1.14.1. Upgrading is the recommended fix.If an immediate upgrade is not possible:Check and correct Team assignments manually:
- In the Admin Portal, go to Users and search for the affected SSO user.
- Check their Organisation and Team assignments.
- If the user has been moved to the default Organisation or default Team, reassign them to the correct Team.
UserGroupMapping was deleted, the SSO profile form may fail to load (also fixed in v1.14.1). To check:- Go to Authentication > SSO Profiles.
- Open the affected SSO profile.
- In the User Group Mapping section, confirm that all mapped Teams still exist in the Portal.
- Remove or update any references to deleted Teams.
Access tokens are invalid after upgrade
Access tokens are invalid after upgrade
This symptom occurs when all APIs were removed from an API Product at some point before or during the upgrade. On Portal versions earlier than v1.14.1, removing all API access from a Product deleted the associated access policy, which permanently invalidated all tokens issued under that Product.Recommended fix: Upgrade to v1.14.1 or laterThis is resolved in v1.14.1. After upgrading, access policies are preserved in draft status when all APIs are removed from a Product. Tokens become valid again when API access is restored to the Product.If tokens remain invalid after upgrading to v1.14.1:
- In the Admin Portal, navigate to the affected API Product.
- Verify that the Product has at least one API associated with it. If not, add the APIs back.
- In Tyk Dashboard, go to the Policies list and find the policy associated with the affected Product. If the policy is in an inactive state, it will appear as disabled in the list. You can also check the
is_inactiveflag on the policy via the Tyk Dashboard API.
If the authentication method of the APIs in a Product was changed during the upgrade, previously issued tokens remain invalid regardless. In this case, consumers must request new credentials.
Enable Debug Logging
Enable debug logging before investigating to get detailed output from the Portal:| Environment variable | Config key | Value |
|---|---|---|
PORTAL_LOG_LEVEL | LogLevel | debug |
PORTAL_LOG_FORMAT | LogFormat | dev |
dev format produces verbose, human-readable log output.
To view Portal logs after enabling debug logging: