Endpoint is not working with my Rails app: Liana

Actual behavior

When I enter my Forest dahboard for the production project, I get the error “Oops, cannot reach the endpoint on your application. Check your Liana version.”. I already tried “bundle update” and “yarn upgrade” in my Rails project, to see if it was the version of the forest_liana gem. However, this was not helpful, since I keep getting the same error. It was working fine, but since yesterday this happened and I didn’t change anything.

Failure Logs

Context

It’s a Rails app that is using the forest_liana gem and the setup given in the page.

Hi @Santiago_Giraldo,

Nice to meet you.

Can you please share all your current dependencies versions?
Also, what is the name of your project?
And, can you please share the details of the first network (xhr) call that fails? It seems to be a 404 on the screenshot

Regards

This is my Gemfile:

source 'https://rubygems.org'
ruby '~> 2.6.5'

gem 'autoprefixer-rails'
gem 'aes'
gem 'aescrypt'
gem 'forest_liana'
gem 'rack-cors'
gem 'bootsnap', require: false
gem 'carrierwave-google-storage'
gem 'carrierwave'
gem 'clipboard-rails'
gem 'cloudinary', '~> 1.12.0'
gem 'devise'
gem 'flatpickr', '~> 4.5', '>= 4.5.2.0'
gem 'font-awesome-sass', '~> 5.6.1'
gem 'geocoder'
gem 'groupdate'
gem "intercom-rails"
gem 'jbuilder', '~> 2.0'
gem 'meta-tags'
gem 'money-rails'
gem 'pg', '~> 0.21'
gem 'pg_search'
gem 'puma'
gem 'pundit'
gem 'rails', '6.0.2.1'
gem 'redis'
gem 'sassc-rails'
gem 'serviceworker-rails'
gem 'simple_form'
gem 'fog-google'
gem "google-cloud-storage"
gem "mime-types"
gem 'simple_token_authentication'
gem "rmagick"
# gem 'stripe'
gem 'uglifier'
gem 'webpacker'
gem 'ngrok', '~> 1.6', '>= 1.6.1'
gem 'rails-i18n'
gem "mini_magick"
gem "image_processing", "~> 1.0"
gem "mixpanel-ruby"
gem "appengine", "~> 0.5.0"
gem "skylight"
gem "lockbox"
gem "blind_index"

# Authentication gems
# gem "omniauth-facebook"

gem "wicked_pdf"
gem 'wkhtmltopdf-binary'
gem 'wkhtmltopdf'

group :development do
  gem 'web-console', '>= 3.3.0'
end

group :development, :test do
  gem 'dotenv-rails'
  gem 'listen', '~> 3.0.5'
  gem 'pry-byebug'
  gem 'pry-rails'
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
end

The project name is Arkangel AI

POST https://www.arkangel.ai/forest/sessions-google 404
(anonymous) @ vendor-775720e92b3b47b02b0a369dd547ba71.js:29271
(anonymous) @ vendor-775720e92b3b47b02b0a369dd547ba71.js:20436
send @ vendor-775720e92b3b47b02b0a369dd547ba71.js:1776
ajax @ vendor-775720e92b3b47b02b0a369dd547ba71.js:1752
(anonymous) @ client-48b3b6f17f34b2ed16d1c0d0ef34512d.js:7462
(anonymous) @ vendor-775720e92b3b47b02b0a369dd547ba71.js:5786
e @ vendor-775720e92b3b47b02b0a369dd547ba71.js:5786
value @ client-48b3b6f17f34b2ed16d1c0d0ef34512d.js:7462
(anonymous) @ client-48b3b6f17f34b2ed16d1c0d0ef34512d.js:7458
tryCatch @ r76hz8n6cnyn.js:1
invoke @ r76hz8n6cnyn.js:1
e.<computed> @ r76hz8n6cnyn.js:1
D @ client-48b3b6f17f34b2ed16d1c0d0ef34512d.js:7432
a @ client-48b3b6f17f34b2ed16d1c0d0ef34512d.js:7434
Promise.then (async)
D @ client-48b3b6f17f34b2ed16d1c0d0ef34512d.js:7432
a @ client-48b3b6f17f34b2ed16d1c0d0ef34512d.js:7434
(anonymous) @ client-48b3b6f17f34b2ed16d1c0d0ef34512d.js:7434
(anonymous) @ client-48b3b6f17f34b2ed16d1c0d0ef34512d.js:7433
(anonymous) @ client-48b3b6f17f34b2ed16d1c0d0ef34512d.js:7459
value @ client-48b3b6f17f34b2ed16d1c0d0ef34512d.js:4538
trigger @ vendor-775720e92b3b47b02b0a369dd547ba71.js:3613
n @ vendor-775720e92b3b47b02b0a369dd547ba71.js:3473
n._run @ vendor-775720e92b3b47b02b0a369dd547ba71.js:5357
n._join @ vendor-775720e92b3b47b02b0a369dd547ba71.js:5356
n.join @ vendor-775720e92b3b47b02b0a369dd547ba71.js:5322
h @ vendor-775720e92b3b47b02b0a369dd547ba71.js:3927
(anonymous) @ vendor-775720e92b3b47b02b0a369dd547ba71.js:3627
a @ vendor-775720e92b3b47b02b0a369dd547ba71.js:3845
handleEvent @ vendor-775720e92b3b47b02b0a369dd547ba71.js:3627
handleEvent @ vendor-775720e92b3b47b02b0a369dd547ba71.js:3552
(anonymous) @ vendor-775720e92b3b47b02b0a369dd547ba71.js:3577
dispatch @ vendor-775720e92b3b47b02b0a369dd547ba71.js:1562
g.handle @ vendor-775720e92b3b47b02b0a369dd547ba71.js:1557
r @ vendor-775720e92b3b47b02b0a369dd547ba71.js:29231

​ Drift API - track(...) "error" in attributes must be number, string, or boolean but instead we got object.
(anonymous) @ 24.51b9fb55.chunk.js:1
apiError @ 26.06b89dad.chunk.js:1
areAttributesValid @ 26.06b89dad.chunk.js:1
(anonymous) @ 26.06b89dad.chunk.js:1
areArgsValid @ 26.06b89dad.chunk.js:1
validateMethod @ 26.06b89dad.chunk.js:1
handleApiEvent @ 26.06b89dad.chunk.js:1
(anonymous) @ 29.69384517.chunk.js:1
ZalgoPromise.try @ 29.69384517.chunk.js:1
M.postrobot_message_request @ 29.69384517.chunk.js:1
receive_receiveMessage @ 29.69384517.chunk.js:1
(anonymous) @ 29.69384517.chunk.js:1
handler @ 29.69384517.chunk.js:1
60a949f0-8595-11ea-95e1-eb8e858f8ea2:1 

Uncaught (in promise) {readyState: 4, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …}

Is

Captura de pantalla de 2021-03-31 10-37-21

Hi @Santiago_Giraldo,

Could you confirm that user not using google auth can login & display the dashboard ?
Also, it appear to me that you have a development & a production environment not using the same agent (express-sequelize & rails) is that expected ?

Thanks in advance

Hi Jeff. All our users use Google Auth to access the Forest dashboard. And yes, we are using the express-sequalize because that is how the app has been working since before; before the rails Forest update. Hope this helps

Hello @Santiago_Giraldo ,

Could you, please, show me the failing request on /forest/sessions-google from the network tab in your browser dev tool and more especially the response to it? :slight_smile:

Yeah, sure. Here it is:

Captura de pantalla de 2021-04-06 10-37-27

The response says: This request has no response data available

Thanks for your feedback, I have few more questions

Can you confirm that all other forest routes are working, and that you only noticed the issue on this route /forest/sessions-google ? Or was it working before and stopped working recently?

Can you share the version of the cors package?

Thanks