NYUCCL / psiTurk

An open platform for science on Amazon Mechanical Turk.
https://psiturk.org
MIT License
277 stars 140 forks source link

HIT link throwing ERR_TOO_MANT_REDIRECTS error #460

Closed jackransomlovell closed 3 years ago

jackransomlovell commented 3 years ago

Hi all.

I am working on launching a HIT that will run through psiTurk and Heroku, but I am having some trouble. Currently, the HIT works well on my local machine, and also works well once I push it to the Heroku app. But, when my teammate tries to test the HIT, it immediately throws a redirect error, before even getting to the MTurk sandbox. I tested this on another machine and it threw the same error. After playing with the ad parameters in config.txt. (trying to run on psiturk server) and running a simple call of heroku config:set ON_HEROKU=true in the terminal, the error seemed to go away.

I have no idea why this was the case, and it is honestly a bit concerning as there is completely no clue as to what is happening in the documentation. Has anyone run into this issue before and could offer some help? It would be much appreciated!

Thanks,

Jack

config.txt file:

` [HIT Configuration] title = Spatial Topology description = Judge the how a number of videos make you feel amt_keywords = Perception, Psychology, Emotion lifetime = 24 us_only = true approve_requirement = 95 number_hits_approved = 0 require_master_workers = false contact_email_on_error = canlabstudies@gmail.com ad_group = spacetop psiturk_keywords = emotion organization_name = Dartmouth College browser_exclude_rule = MSIE, mobile, tablet allow_repeats = true

[Database Parameters] database_url = table_name = participants

[Server Parameters] host = 0.0.0.0 port = 22362 cutoff_time = 30 logfile = server.log loglevel = 2 debug = true login_username = examplename login_pw = examplepassword threads = 1 secret_key = 'this is my secret key which is hard to guess, i should change this'

certfile =

keyfile =

adserver_revproxy_host = www.location.of.your.revproxy.sans.protocol.com

adserver_revproxy_port = 80 # defaults to 80

server_timeout = 30

[Task Parameters] experiment_code_version = 1.0 num_conds = 1 num_counters = 1

[Shell Parameters] launch_in_sandbox_mode = true

bonus_message = "Thanks for participating!"

use_psiturk_ad_server = false ad_location = https://spacetop.herokuapp.com/pub `

deargle commented 3 years ago

What version psiturk?

deargle commented 3 years ago

IIRC, older versions of psiturk (i.e., not-beta versions) must have ON_HEROKU set if running on heroku so that it respects whatever port that heroku dynamically assigns.

jackransomlovell commented 3 years ago

I believe it is the most current version. Is there a unix command to check the version? I am going to update it now just in case.

On Mon, Jan 11, 2021 at 7:11 PM Dave Eargle notifications@github.com wrote:

IIRC, older versions of psiturk (i.e., not-beta versions) must have ON_HEROKU set if running on heroku so that it respects whatever port that heroku dynamically assigns.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NYUCCL/psiTurk/issues/460#issuecomment-758304272, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL7OWPF56MRNNRULIHDIAQ3SZOHTLANCNFSM4V6MKLMA .

deargle commented 3 years ago

just psiturk -v. None of the betas are installable via pip without pointing at github anyway.

jackransomlovell commented 3 years ago

Yes, I am on the current version of 3.0.0. Does this mean I only have to run ON_HEROKU set once?

On Mon, Jan 11, 2021 at 7:40 PM Dave Eargle notifications@github.com wrote:

just psiturk -v. None of the betas are installable via pip anyway.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NYUCCL/psiTurk/issues/460#issuecomment-758315873, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL7OWPAOYOBFJPZ3VTST37DSZOK7PANCNFSM4V6MKLMA .

jackransomlovell commented 3 years ago

hmmm now I am getting a strange error: Error during hit creation. Response(Operation: create_hit | Status: error | Exception: PsiturkException: missing ad_url config var ad_url_domain)

deargle commented 3 years ago

3.0.0 is unreleased master branch beta, not supposed to be accessible via pip, unless something is really wrong. But ON_HEROKU gets set within the heroku environment, so yes, you only have to set that once per heroku app. Master has a different config file structure etc, and doesn't use the psiturk as server, which is probably what is leading to your current error message maybe. Did you install psiturk via pip?

And can you close this github issue? If anything, it's a problem of vagueness in the documentation, not an error in the codebase. Can help on the Google group to keep noise down for repo subscribers. I'm on mobile rn.

On Mon, Jan 11, 2021, 7:41 PM Jack Lovell notifications@github.com wrote:

hmmm now I am getting a strange error: Error during hit creation. Response(Operation: create_hit | Status: error | Exception: PsiturkException: missing ad_url config var ad_url_domain)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NYUCCL/psiTurk/issues/460#issuecomment-758356232, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI6Y7I7FBLJVZ6JPDGX2QTSZOZEHANCNFSM4V6MKLMA .

jackransomlovell commented 3 years ago

Sure, I was having so serious trouble installing with pip but now it works. I'll make sure to ask more of these questions on google groups, thanks for the help!