Errors in MIT annotation store

I cannot save or access document annotations and see the following error in the annotation store log:

08:48:40 web.1 | Error decoding token:
08:48:40 web.1 | [Error: Signature verification failed]

I have checked the secret between the rails app and the annotation store is the same; can you tell me what is going wrong here?

Thanks in advance…

Hi @Dave, Happy to help if I can. Are you running both the Data Store and the Annotation Studio Rails app locally? Have you checked that the API_CONSUMER environment variable is the same in both cases?

Thanks for the prompt response… yes, I am running them both locally. Here is what I have for each configuration:

From the Rails application.yml:
API_SECRET: secret
API_CONSUMER: localhost

From the annotation store .env:

Is there anything else I should look at?

Hm. And you’re not trying to make a raw request to the API outside of the app, correct? You need the token provided by the Rails app.

If not, I might suggest we double check the versions of the two apps that you’re running. The latest version of Annotation Studio (master branch on github/hyperstudio) stores the jwt in the user session, and if/when that expires, all requests to the API will fail. Quick fix for that issue is to logout/log back in.

I would be glad to jump on a google hangout if that would be useful.


Great, thanks.

Restart, clear cache and log out/in seems to have solved it.

Thanks again for the timely support.

Sure thing. I imagine it was the restart, since those config vars are read in at startup. Have a nice weekend!