oTree Forum >

chat with experimenter

#1 by EvgenyK

Hi everyone -

I am looking to implement the "chat with experimenter" functionality on my oTree app. It seems that the Papercups integration used on otree-snippets is no longer supported if deployed on Heroku. Did anyone use Papercups, or another solution for chat between participants and experimenter lately? 

Thank you!

#2 by Chris_oTree

Can you provide more detail on why it doesn’t work on Heroku? I checked the paper cups website and they still have a “deploy to heroku” button.

#3 by EvgenyK


The button is there but it seems that the one click deployment is not compatible with heroku-22 stack.  This is what Heroku shows when you click the button and try to create an app (see attached for screen shot)

Configure environment
There was an issue setting up your app environment.

Switching to the heroku-18 stack is not supported. Please consider using heroku-22 instead: https://devcenter.heroku.com/articles/stack

#4 by Chris_oTree

You're right, their 'deploy to heroku' button code is out of date; there is an issue logged to fix it: https://github.com/papercups-io/papercups/issues/1012

The code in question is here: https://github.com/papercups-io/papercups/blob/master/app.json

If you fork that repository and just change the line with 'heroku-18' to 'heroku-22' or 'heroku-20', there is a good chance it'll work.

#5 by Chris_oTree

(in github, you can try clicking the pencil icon in the toolbar, that will fork & edit the file.) then save and click the 'deploy to heroku' in your forked version.

#6 by EvgenyK

Thanks, I had to also update the url of the button in the forked version.  This is the next error I am getting on Heroku:

-----> Building on the Heroku-22 stack
-----> Using buildpacks:
       1. hashnuke/elixir
       2. https://github.com/gjaldon/heroku-buildpack-phoenix-static
-----> Elixir app detected
-----> Will export the following config vars:
       * MIX_ENV=prod
-----> Checking Erlang and Elixir versions
       Will use the following versions:
       * Stack heroku-22
       * Erlang 23.0.2
       * Elixir v1.11.3 
       Sorry, Erlang '23.0.2' isn't supported yet or isn't formatted correctly. For a list of supported versions, please see https://github.com/HashNuke/heroku-buildpack-elixir#version-support
 !     Push rejected, failed to compile Elixir app.
 !     Push failed

#7 by Chris_oTree

hmmmm… Maybe try heroku-20 instead of 22.

Seems papercups is not being actively maintained.

#8 by EvgenyK

heroku-20 seems to get me a bit further, but push still not working. 

I experimented with different versions of elixir, erlang and node.  None seems to successfully push.. Are there any other ways to deploy to Heroku?

#9 by Chris_oTree

Hm, that's unfortunate. The best solution would be for someone to write a simple chat server to replace papercups. Then some javascript code in the template to send/receive messages to this server via websockets.

Write a reply

Set forum username