OHDSI Home | Forums | Wiki | Github

Error when saving a concept set or cohort definition. A popup appear and says "An error occurred while attempting to save a concept set."

Any time I whose account is an admin and has all rights granted within the configuration menu try to save a concept set a popup appears telling me an error has occured.

Looking into the error using chromes developer tools:

index.js:199 POST https://ourserveraddress:8443/WebAPI/conceptset/ 500

sendRequest @ index.js:199
sendRequest @ http.js:71
doPost @ index.js:273
saveConceptSet @ ConceptSet.js:65
saveConceptSet @ conceptset-manager.js:471
await in saveConceptSet (async)
save @ conceptset-manager.js:513
(anonymous) @ knockout-latest.js:90
dispatch @ jquery.js:5226
elemData.handle @ jquery.js:4878

http.js:18 Oooops!.. Something went wrong :frowning:

handleUnexpectedError @ http.js:18
checkStatusError @ http.js:42
afterRequestHook @ http.js:83
(anonymous) @ index.js:206
Promise.then (async)
sendRequest @ index.js:205
sendRequest @ http.js:71
doPost @ index.js:273
saveConceptSet @ ConceptSet.js:65
saveConceptSet @ conceptset-manager.js:471
await in saveConceptSet (async)
save @ conceptset-manager.js:513
(anonymous) @ knockout-latest.js:90
dispatch @ jquery.js:5226
elemData.handle @ jquery.js:4878

Not sure what the error refers too, the permissions on the database seem to be set correctly as to allow the proper user access. If there is a different place that things are being saved to I can look into the permissions there.

Any help would be hugely appreciated.

Best,
Alex

I had something similar when the resources on the WebAPI postgres instance were limited. Check to see that your webapi PG instance is running smoothly.

Right, the 500 is an internal server error, so the information you get to the client isn’t too helpful (to protect the innocent) but if you check your WebAPI logs, you should see a very detailed exception about the root cause of the error.

Thank you for the reply and the tip.
I checked the catalin.out log and have found the following error:
2022-02-04 10:45:24.802 ERROR https-jsse-nio-8443-exec-3 org.ohdsi.webapi.security.listener.EntityInsertEventListener - - java.lang.RuntimeException: Role doesn’t exist
java.util.concurrent.ExecutionException: java.lang.RuntimeException: Role doesn’t exist

It seems to be the correct one as appeared right after I tried to save the concept_set.
Does this mean the role I am logging into ATLAS with? or the role that connects to the db tables?
I am logged in using the AD/LDAP and the username is the same as the one in the sec_user and sec_user_role tables that define what my user can do but not sure if I need to add more info or not.
The ohdsi_admin and ohdsi_app_user roles have access to the webapi schema and the concept_set table.
I’m hoping you have another step I could take to rectify this error.

Thank you for the help!!

So, I’m afraid I don’t have a lot of expertise on the security configuration front. I do know that there are some default roles that come pre-packaged with WebAPI (admin, public) so I am not sure which role it is reporting does not exist. It would be a good enhancement to WebAPI to find where that error is reported, and add the role to the message that it is trying to locate. Other members of the community with experience in configuring security may have seen this message, so hopefully they can chime in with any additional ideas.

Have you solved this issue? I am facing the same problem.

Hi, I am experiencing the same issue. Was a solution ever found?

t