estately / rets

A pure-ruby library for fetching data from RETS servers
https://github.com/estately/rets
127 stars 94 forks source link

Error on login #214

Closed tom-brown closed 6 years ago

tom-brown commented 6 years ago

I've been using this code for several years on 2 successful apps, and now launching a new app. This code works in my development environment for the new app, but not on the staging app hosted on heroku. On heroku I get the following error on login:

Cookie#domain returns dot-less domain name now. Use Cookie#dot_domain if you need "." at the beginning.
Error: Got error code 20513 (Unexpected error, please try again)

Login code:

client = Rets::Client.new({
   login_url: LOGIN_URL,
   username: LOGIN,
   password: PASSWORD,
   version: VERSION
   })

 begin
    client.login
 rescue => e
    puts 'Error: ' + e.message
    exit!
 end