embed JATOS link in Qualtrics iframe
Hey all,
I recently started using JATOS to run studies that I write using the lab.js library.
I successfully uploaded my experiment to the DigitalOcean server I made and created a General Single worker link. The link works fine and if I click it the experiments begin. however, I wanted to embed it in an iframe tag in Qualtrics. When I try to test my study in Qualtrics, the iframe doesn't present the study but a JATOS message about cookies: "A problem occurred: Couldn't find cookie for study result ID 11. Are cookies allowed in your browser?"
Any idea how I can embed the study within Qualtrics and resolve this issue?
Thanks,
Guy
Comments
Hi guy!
I guess it's this problem: https://stackoverflow.com/a/2117271/1278769. JATOS relies on cookies to pass on some data to the browser. If like in the Stack overflow post described, cookies in iframes are regarded as third party cookies and browsers block those, I don't see a way out. You can check if this is a case by allowing third party cookies in your browser.
Best
Kristian
Hey Kristian,
Thank you for your reply! I followed your suggestion and allowed all cookies in my browser (Chrome), but I still get the same message.
Does this mean there is no way to get around this problem?
Turning off the X-Frame-Options might help. Add this line to your
conf/production.confand restart your JATOS:Best,
Kristian
Hi Kristian,
Do you know if there is a way to modify this argument in Docker by using something like "docker run -e FILTERS_HEADERS_FRAME_OPTIONS = null"?
Trying to manually add this line to the production.conf of my digitalocean VM did not work. When I restarted it, JATOS was no longer available and returned "404 bad gateway".
Thank you for your help and patience and I apologize for my ignorance.
Guy
Hi Guy,
There is no environment variable for this parameter yet that you could use for your docker. I made only the common parameters configurable via environment variables. It's not a big thing to add it for this one to but the change would only be available to you with the next release and I think you want a solution earlier.
I'm pretty positive, putting it in the production.conf works. Is there anything else you can see apart from the 404 bad gateway? Are there errors in the application.log or the loader.log?
Best
Kristian
I'm not sure that I am looking in the right location, but running cat $(locate -r application.log$) opens the application.log with last line signaled with an ERROR "c.g.Home - Couldn't request latest JATOS update info".
In addition two WARN logs may be relvant(?):
"p.a.m.DefaultJWTCookieDataCodec - decode: cookie has invalid signature! message = JWT signature does not match locally computed signature. JWT validity cannot be asserted and should not be trusted."
and "c.g.a.AuthenticationAction - Authentication failed: remote address 172.18.0.2 tried to access page"
The loader.log showes only warnnings about illegal access operations.
Thanks again,
Guy
The warnings in your application.log are normal ones, nothing related.
What are the warnings in the loader.log? They might be more important.
Best
Kristian