Unable to Update a Developer Record

Branch/Environment/Version

  • Branch/Version: Master
  • Environment: On-prem

Describe the bug
Unable to update a Developer record. I tried to update the name tag for a developer using the GUI and it says that all fields have been updated successfully, but when I open the record again, the name is unchanged. I even tried the REST API available in Portal Developers to update the Developer record but the API call returns with a Status of 500 (Internal Server Error) - Application Error. Please note that I’m using Tyk Dashboard v3.1.2 .

Reproduction steps
Steps to reproduce the behaviour:

1.Create a Developer using the GUI or REST API provided in Portal Developers .
2. Try to update the user using GUI or REST API provided in Portal Developers

Actual behaviour
The Developer record updation does not take place and Status Code 500 (Internal Server Error) is returned.

Expected behaviour
The Developer record needs to be updated with the values being set in the GUI or the values being sent via the REST API.

Screenshots/Video

Logs (debug mode or log file):
time="Aug 20 11:27:43" level=debug msg="Configuration request responded." prefix=pub-sub

time="Aug 20 12:04:53" level=debug msg="Checking if exists" keyName=cert-6110d2c856a2ac00017a6f31-index

time="Aug 20 12:04:53" level=debug msg="[STORE] Getting list by: cert-raw-6110d2c856a2ac00017a6f31**"

time="Aug 20 12:20:28" level=debug msg="Checking if exists" keyName=cert-6110d2c856a2ac00017a6f31-index

time="Aug 20 12:20:28" level=debug msg="[STORE] Getting list by: cert-raw-6110d2c856a2ac00017a6f31**"

time="Aug 20 12:21:06" level=debug msg="Checking if exists" keyName=cert-6110d2c856a2ac00017a6f31-index

time="Aug 20 12:21:06" level=debug msg="[STORE] Getting list by: cert-raw-6110d2c856a2ac00017a6f31**"

time="Aug 20 12:21:35" level=debug msg="Checking if exists" keyName=cert-6110d2c856a2ac00017a6f31-index

time="Aug 20 12:21:35" level=debug msg="[STORE] Getting list by: cert-raw-6110d2c856a2ac00017a6f31**"

time="Aug 20 12:22:50" level=debug msg="Checking if exists" keyName=cert-6110d2c856a2ac00017a6f31-index

time="Aug 20 12:22:50" level=debug msg="[STORE] Getting list by: cert-raw-6110d2c856a2ac00017a6f31**"

time="Aug 20 12:23:15" level=error msg="{error Failed to remove the key}" key="****5b8e" prefix=api status=fail

time="Aug 20 12:23:15" level=info msg="Deleted hashed key across all APIs." key=1856f39d5c314408726f2c2d97ee5b8e prefix=api status=ok

time="Aug 20 12:23:15" level=error msg="{error Failed to remove the key}" key="****5b8e" prefix=api status=fail

time="Aug 20 12:23:15" level=info msg="Deleted hashed key across all APIs." key=1856f39d5c314408726f2c2d97ee5b8e prefix=api status=ok

time="Aug 20 12:23:15" level=error msg="{error Failed to remove the key}" key="****In0=" prefix=api status=fail

time="Aug 20 12:23:15" level=info msg="Deleted hashed key across all APIs." key="eyJvcmciOiI2MTEwZDJjODU2YTJhYzAwMDE3YTZmMzEiLCJpZCI6IjE4NTZmMzlkNWMzMTQ0MDg3MjZmMmMyZDk3ZWU1YjhlIiwiaCI6Im11cm11cjY0In0=" prefix=api status=ok

time="Aug 20 12:23:15" level=error msg="{error Failed to remove the key}" key="****5b8e" prefix=api status=fail

time="Aug 20 12:23:15" level=info msg="Deleted hashed key across all APIs." key=1856f39d5c314408726f2c2d97ee5b8e prefix=api status=ok

time="Aug 20 12:23:20" level=debug msg="Checking if exists" keyName=cert-6110d2c856a2ac00017a6f31-index

time="Aug 20 12:23:20" level=debug msg="[STORE] Getting list by: cert-raw-6110d2c856a2ac00017a6f31**"

time="Aug 20 12:23:22" level=error msg="{error Failed to remove the key}" key="****5b8e" prefix=api status=fail

time="Aug 20 12:23:22" level=info msg="Deleted hashed key across all APIs." key=1856f39d5c314408726f2c2d97ee5b8e prefix=api status=ok

time="Aug 20 12:23:22" level=error msg="{error Failed to remove the key}" key="****5b8e" prefix=api status=fail

time="Aug 20 12:23:22" level=info msg="Deleted hashed key across all APIs." key=1856f39d5c314408726f2c2d97ee5b8e prefix=api status=ok

time="Aug 20 12:23:22" level=error msg="{error Failed to remove the key}" key="****In0=" prefix=api status=fail

time="Aug 20 12:23:22" level=info msg="Deleted hashed key across all APIs." key="eyJvcmciOiI2MTEwZDJjODU2YTJhYzAwMDE3YTZmMzEiLCJpZCI6IjE4NTZmMzlkNWMzMTQ0MDg3MjZmMmMyZDk3ZWU1YjhlIiwiaCI6Im11cm11cjY0In0=" prefix=api status=ok

time="Aug 20 12:23:22" level=error msg="{error Failed to remove the key}" key="****5b8e" prefix=api status=fail

time="Aug 20 12:23:22" level=info msg="Deleted hashed key across all APIs." key=1856f39d5c314408726f2c2d97ee5b8e prefix=api status=ok

time="Aug 20 12:23:38" level=error msg="{error Failed to remove the key}" key="****5b8e" prefix=api status=fail

time="Aug 20 12:23:38" level=info msg="Deleted hashed key across all APIs." key=1856f39d5c314408726f2c2d97ee5b8e prefix=api status=ok

time="Aug 20 12:23:38" level=error msg="{error Failed to remove the key}" key="****5b8e" prefix=api status=fail

time="Aug 20 12:23:38" level=info msg="Deleted hashed key across all APIs." key=1856f39d5c314408726f2c2d97ee5b8e prefix=api status=ok

time="Aug 20 12:23:38" level=error msg="{error Failed to remove the key}" key="****In0=" prefix=api status=fail

time="Aug 20 12:23:38" level=info msg="Deleted hashed key across all APIs." key="eyJvcmciOiI2MTEwZDJjODU2YTJhYzAwMDE3YTZmMzEiLCJpZCI6IjE4NTZmMzlkNWMzMTQ0MDg3MjZmMmMyZDk3ZWU1YjhlIiwiaCI6Im11cm11cjY0In0=" prefix=api status=ok

time="Aug 20 12:23:38" level=error msg="{error Failed to remove the key}" key="****5b8e" prefix=api status=fail

time="Aug 20 12:23:38" level=info msg="Deleted hashed key across all APIs." key=1856f39d5c314408726f2c2d97ee5b8e prefix=api status=ok

time="Aug 20 12:27:16" level=debug msg="Checking if exists" keyName=cert-6110d2c856a2ac00017a6f31-index

time="Aug 20 12:27:16" level=debug msg="[STORE] Getting list by: cert-raw-6110d2c856a2ac00017a6f31**"

time="Aug 20 12:27:29" level=error msg="{error Failed to remove the key}" key="****5b8e" prefix=api status=fail

time="Aug 20 12:27:29" level=info msg="Deleted hashed key across all APIs." key=1856f39d5c314408726f2c2d97ee5b8e prefix=api status=ok

time="Aug 20 12:27:29" level=error msg="{error Failed to remove the key}" key="****5b8e" prefix=api status=fail

time="Aug 20 12:27:29" level=info msg="Deleted hashed key across all APIs." key=1856f39d5c314408726f2c2d97ee5b8e prefix=api status=ok

time="Aug 20 12:27:29" level=error msg="{error Failed to remove the key}" key="****In0=" prefix=api status=fail

time="Aug 20 12:27:29" level=info msg="Deleted hashed key across all APIs." key="eyJvcmciOiI2MTEwZDJjODU2YTJhYzAwMDE3YTZmMzEiLCJpZCI6IjE4NTZmMzlkNWMzMTQ0MDg3MjZmMmMyZDk3ZWU1YjhlIiwiaCI6Im11cm11cjY0In0=" prefix=api status=ok

time="Aug 20 12:27:29" level=error msg="{error Failed to remove the key}" key="****5b8e" prefix=api status=fail

time="Aug 20 12:27:29" level=info msg="Deleted hashed key across all APIs." key=1856f39d5c314408726f2c2d97ee5b8e prefix=api status=ok

time="Aug 20 12:27:35" level=debug msg="Checking if exists" keyName=cert-6110d2c856a2ac00017a6f31-index

time="Aug 20 12:27:35" level=debug msg="[STORE] Getting list by: cert-raw-6110d2c856a2ac00017a6f31**"

time="Aug 20 12:27:45" level=info msg="Reset quota for key." inbound-key="****In0=" key=quota-dbf4daae5f60390e prefix=auth-mgr

time="Aug 20 12:27:45" level=info msg="Both event_trigers_defunct and event_triggers_defunct are configured in the config, event_triggers_defunct will be used."

time="Aug 20 12:27:45" level=debug msg="EVENT FIRED: TokenCreated"

time="Aug 20 12:27:45" level=info msg="Generated new key: (****In0=)" api_id=-- key="****In0=" org_id=6110d2c856a2ac00017a6f31 path=-- prefix=api server_name=system status=ok user_id=system user_ip=172.18.0.4

time="Aug 20 12:27:45" level=info msg="Retrieved key detail." key="****In0=" prefix=api status=ok

time="Aug 20 12:27:56" level=info msg="Reset quota for key." inbound-key="****390e" key=quota-dbf4daae5f60390e prefix=auth-mgr

time="Aug 20 12:27:56" level=info msg="Deleted hashed key across all APIs." key=dbf4daae5f60390e prefix=api status=ok

time="Aug 20 12:28:06" level=info msg="Reset quota for key." inbound-key="****In0=" key=quota-0624bf0189d33c43 prefix=auth-mgr

time="Aug 20 12:28:06" level=info msg="Both event_trigers_defunct and event_triggers_defunct are configured in the config, event_triggers_defunct will be used."

time="Aug 20 12:28:06" level=debug msg="EVENT FIRED: TokenCreated"

time="Aug 20 12:28:06" level=info msg="Generated new key: (****In0=)" api_id=-- key="****In0=" org_id=6110d2c856a2ac00017a6f31 path=-- prefix=api server_name=system status=ok user_id=system user_ip=172.18.0.4

time="Aug 20 12:28:06" level=info msg="Retrieved key detail." key="****In0=" prefix=api status=ok

time="Aug 20 12:28:13" level=error msg="{error Failed to remove the key}" key="****5b8e" prefix=api status=fail

time="Aug 20 12:28:13" level=info msg="Deleted hashed key across all APIs." key=1856f39d5c314408726f2c2d97ee5b8e prefix=api status=ok

time="Aug 20 12:28:13" level=error msg="{error Failed to remove the key}" key="****5b8e" prefix=api status=fail

time="Aug 20 12:28:13" level=info msg="Deleted hashed key across all APIs." key=1856f39d5c314408726f2c2d97ee5b8e prefix=api status=ok

time="Aug 20 12:28:13" level=error msg="{error Failed to remove the key}" key="****In0=" prefix=api status=fail

time="Aug 20 12:28:13" level=info msg="Deleted hashed key across all APIs." key="eyJvcmciOiI2MTEwZDJjODU2YTJhYzAwMDE3YTZmMzEiLCJpZCI6IjE4NTZmMzlkNWMzMTQ0MDg3MjZmMmMyZDk3ZWU1YjhlIiwiaCI6Im11cm11cjY0In0=" prefix=api status=ok

time="Aug 20 12:28:13" level=error msg="{error Failed to remove the key}" key="****5b8e" prefix=api status=fail

time="Aug 20 12:28:13" level=info msg="Deleted hashed key across all APIs." key=1856f39d5c314408726f2c2d97ee5b8e prefix=api status=ok

time="Aug 20 12:28:19" level=info msg="Reset quota for key." inbound-key="****3c43" key=quota-0624bf0189d33c43 prefix=auth-mgr

time="Aug 20 12:28:19" level=info msg="Deleted hashed key across all APIs." key=0624bf0189d33c43 prefix=api status=ok

time="Aug 20 12:29:26" level=debug msg="Checking if exists" keyName=cert-6110d2c856a2ac00017a6f31-index

time="Aug 20 12:29:26" level=debug msg="[STORE] Getting list by: cert-raw-6110d2c856a2ac00017a6f31**"

time="Aug 20 12:29:37" level=debug msg="Checking if exists" keyName=cert-6110d2c856a2ac00017a6f31-index

time="Aug 20 12:29:37" level=debug msg="[STORE] Getting list by: cert-raw-6110d2c856a2ac00017a6f31**"

time="Aug 20 12:29:50" level=debug msg="Checking if exists" keyName=cert-6110d2c856a2ac00017a6f31-index

time="Aug 20 12:29:50" level=debug msg="[STORE] Getting list by: cert-raw-6110d2c856a2ac00017a6f31**"

Configuration (tyk config file):
{
“listen_address”: “”,
“listen_port”: 8080,
“secret”: “”,
“node_secret”: “”,
“template_path”: “./templates”,
“tyk_js_path”: “./js/tyk.js”,
“middleware_path”: “./middleware”,
“policies”: {
“policy_source”: “service”,
“policy_connection_string”: “http://tyk-dashboard:3000”,
“policy_record_name”: “tyk_policies”,
“allow_explicit_policy_id”: true
},
“use_db_app_configs”: true,
“db_app_conf_options”: {
“connection_string”: “http://tyk-dashboard:3000”,
“node_is_segmented”: false,
“tags”: [
“test”
]
},
“disable_dashboard_zeroconf”: false,
“app_path”: “./test_apps/”,
“storage”: {
“type”: “redis”,
“host”: “tyk-redis”,
“port”: 6379,
“hosts”: null,
“username”: “”,
“password”: “”,
“database”: 0,
“optimisation_max_idle”: 3000,
“optimisation_max_active”: 5000,
“enable_cluster”: false
},
“enable_separate_cache_store”: false,
“enable_analytics”: true,
“analytics_config”: {
“type”: “mongo”,
“ignored_ips”: [],
“enable_detailed_recording”: false,
“enable_geo_ip”: false,
“geo_ip_db_path”: “./GeoLite2-City.mmdb”,
“normalise_urls”: {
“enabled”: true,
“normalise_uuids”: true,
“normalise_numbers”: true,
“custom_patterns”: []
}
},
“health_check”: {
“enable_health_checks”: false,
“health_check_value_timeouts”: 0
},
“optimisations_use_async_session_write”: true,
“allow_master_keys”: false,
“hash_keys”: true,
“hash_key_function”: “murmur64”,
“suppress_redis_signal_reload”: false,
“suppress_default_org_store”: false,
“use_redis_log”: true,
“sentry_code”: “”,
“use_sentry”: false,
“use_syslog”: false,
“use_graylog”: false,
“use_logstash”: false,
“graylog_network_addr”: “”,
“logstash_network_addr”: “”,
“syslog_transport”: “”,
“logstash_transport”: “”,
“syslog_network_addr”: “”,
“enforce_org_data_age”: true,
“enforce_org_data_detail_logging”: false,
“enforce_org_quotas”: true,
“experimental_process_org_off_thread”: false,
“enable_non_transactional_rate_limiter”: true,
“enable_sentinel_rate_limiter”: false,
“Monitor”: {
“enable_trigger_monitors”: false,
“configuration”: {
“method”: “”,
“target_path”: “”,
“template_path”: “”,
“header_map”: null,
“event_timeout”: 0
},
“global_trigger_limit”: 0,
“monitor_user_keys”: false,
“monitor_org_keys”: false
},
“oauth_refresh_token_expire”: 0,
“oauth_token_expire”: 0,
“oauth_redirect_uri_separator”: “;”,
“slave_options”: {
“use_rpc”: false,
“connection_string”: “”,
“rpc_key”: “”,
“api_key”: “”,
“enable_rpc_cache”: false,
“bind_to_slugs”: false,
“disable_keyspace_sync”: false,
“group_id”: “”
},
“disable_virtual_path_blobs”: false,
“local_session_cache”: {
“disable_cached_session_state”: true,
“cached_session_timeout”: 0,
“cached_session_eviction”: 0
},
“http_server_options”: {
“override_defaults”: false,
“read_timeout”: 0,
“write_timeout”: 0,
“use_ssl”: false,
“use_ssl_le”: false,
“enable_websockets”: true,
“certificates”: [],
“server_name”: “”,
“min_version”: 0,
“flush_interval”: 0
},
“service_discovery”: {
“default_cache_timeout”: 0
},
“close_connections”: false,
“auth_override”: {
“force_auth_provider”: false,
“auth_provider”: {
“name”: “”,
“storage_engine”: “”,
“meta”: null
},
“force_session_provider”: false,
“session_provider”: {
“name”: “”,
“storage_engine”: “”,
“meta”: null
}
},
“uptime_tests”: {
“disable”: true,
“config”: {
“failure_trigger_sample_size”: 1,
“time_wait”: 2,
“checker_pool_size”: 50,
“enable_uptime_analytics”: true
}
},
“hostname”: “”,
“enable_api_segregation”: false,
“control_api_hostname”: “”,
“enable_custom_domains”: true,
“enable_jsvm”: true,
“coprocess_options”: {
“enable_coprocess”: false,
“coprocess_grpc_server”: “tcp://localhost:5555”
},
“hide_generator_header”: false,
“event_handlers”: {
“events”: {}
},
“event_trigers_defunct”: {},
“pid_file_location”: “./tyk-gateway.pid”,
“allow_insecure_configs”: true,
“public_key_path”: “”,
“close_idle_connections”: false,
“allow_remote_config”: true,
“enable_bundle_downloader”: false,
“max_idle_connections_per_host”: 500,
“disable_ports_whitelist”: true,
“ports_whitelist”: {
“tcp”: {
“ports”: [
18788,
26290
]
}
}
}

Additional context
None

We will check this and get back to you. However, is this related to Portal Developer APIs - Incorrect Docs - Support - Tyk API Management Community Forum?

Hi @Olu.
No, these are not related to Portal Developer APIs - Incorrect Docs - #2 by Olu,
but are related to Unable to List All Key Requests in Portal Management - #4 by selvamp.
All the above mentioned APIs return a 500 (Internal Server Error) - Application Error.
I suspect that maybe my request has some issues. I can’t confirm the same as I’m unable to figure out certain APIs from Tyk Docs. I hope this sets a context for you. I really appreciate your help :slight_smile:

You may also note that not only am I facing this issue on my On-Prem version of Tyk but also on Tyk Cloud version. All the same APIs return with a 500 Status Code (Application Error).

Regards,
Prashanth

Hi Prashanth,

I was able to reproduce this by going through portal API but only when I had already created a number of developers with the same email address. When email addresse are unique the I was not able to reproduce it.

Are you able to check that your developers have unique email addresses please?

Hi @Pete.

Thanks for the reply. Yes, as rightly mentioned by you, when the email addresses are the same for the developers, I’m able to update the record.
Even if the email addresses are different, as long as I include “id” key in the request body along with path params, it works flawlessly.
Actually to be honest, I missed a key while sending the request (For Update Call we are issuing the “id” as a path param) and hence I omitted “id” key in the request body. I believe because of that i was returned with a 500 (Internal Server Error) - Application Error. I was confused because usually 500 Status is issued for APIs that have failed internally. In this case I believe it must be a 400 (Bad request).

My apologies for the false alarm!
A kind request that, maybe 500 Internal Server Error maybe converted to an appropriate Error Status and Error Code for better understanding.

Cheers and Thanks!
Prashanth (@selvamp)