Finding the source of an error on sidekiq - ruby-on-rails-5

I am running a job in the background with sidekiq and using perform_later with rails 5.1.7.
Right now in the sidekiq dashboard I am getting an error related to a method, but I am calling that method more than once, so I don't know where exactly is the problem coming from.
If I use perform_now it works, but not with perform_later
In the "retry" section of the dashboard I am getting for this job the following error:
NameError: undefined local variable or method `payload' for #<AppServices::BookingService

Related

Issue with twitch recording script

So i tried to get the following tool/script running but now after getting the script itself to run it comes with an error. Basically that error seems to only occur when i use the "start" command. i was able to set the download-path, time and add the streamer etc.
https://github.com/Instinctlol/automatic-twitch-recorder
(Cmd) start
Daemon is started.
(Cmd) error:concurrent.futures:exception calling callback for <Future at 0x1a83e838390 state=finished raised AttributeError>
I am a beginner in programming tyia
some insight of the error what its caused by and what it means

Error: An error was thrown when attempting to render log messages via LogBox

I'm working on an app and everything is working fine, then I began to get this error when I log things out from try-catch block
Error: An error was thrown when attempting to render log messages via LogBox.
Please what could cause this?
i had the same issue and i spend all most two days to find any solution and in the end i find their is one console.log() statement which is logging the entire redux store, so as soon as i removed the console statement error removed.

undefined local variable or method `start_test_server_in_background' for #<Object:0x007ffc49a5e130>

This has been asked before for .12.0 but I am now getting a similar error in .14.2 .
Up until a few weeks ago I was running calabash.framework 11.4 because it worked, was stable, and it was under lock and key on our development server. We went through a recent state of updating all of our gems and services and while our build server still functions calabash is no longer recognizing the "start_server_in_background" method. I am at a loss on how to remedy this. I tried a complete wipe and reinstall on my local mirror to no avail, and am considering rolling everything back to the previous working versions. However I would like to solve this to keep everything up to date.
I have tried the following solutions with no success.
undefined local variable or method `start_test_server_in_background' for main:Object
https://github.com/calabash/calabash-ios/issues/669
https://github.com/calabash/calabash-android/issues/371
This is my error after the scenario runs
undefined local variable or method `start_test_server_in_background' for #<Object:0x007f9a7c07ba48> (NameError)
/Users/mycomp/.rvm/gems/ruby-2.2.1#global/gems/rspec-expectations-3.2.1/lib/rspec/matchers.rb:926:in `method_missing'
/Users/mycomp/KonyiOSWorkspace/user/Kony/iOS-6.0.3.GA_v201503250510/VMAppWithKonylib/features/mobile/helpers/ios/support/app_life_cycle_hooks.rb:44:in `Before'
The recommend way of launching the application is to use:
options = { }
launcher.relaunch(options)
launcher.calabash_notify(self)
In your support/env.rb file you need to:
require 'calabash-cucumber/cucumber'
not calabash-cucumber.

Rails 3: Error with Authlogic in console

I'm trying create some users in the console. I'm getting the following error:
Authlogic::Session::Activation::NotActivatedError: You must activate the Authlogic::Session::Base.controller with a controller object before creating object
This error occurs in an after_create which only job is to send an email to the user. If I disable this after_create, everything works, but this means no email is sent.
I tried to apply a solution found here, but it didn't work:
http://www.tatvartha.com/2009/09/working-with-authlogic-in-scriptconsole/
What's going on?
Thank you

Raising route not found error

I'm writing a book on Rails 3 at the moment and past-me has written in Chapter 3 or so that when a specific feature is run that a routing error is generated. Now, it's unlike me to go writing things that aren't true, so I'm pretty sure this happened once in the past.
I haven't yet been able to duplicate the scenario myself, but I'm pretty confident it's one of the forgotten settings in the environment file.
To duplicate this issue:
Generate a new rails project
important: Remove the public/index.html file
Add cucumber-rails and capybara to the "test" group in your Gemfile
run bundle install
run rails g cucumber:skeleton
Generate a new feature, call it features/creating_projects.feature
Inside this feature put:
This:
Feature: Creating projects
In order to value
As a role
I want feature
Scenario: title
Given I am on the homepage
When you run this feature using bundle exec cucumber features/creating_projects.feature it should fail with a "No route matches /" error, because you didn't define the root route. However, what I and others are seeing is that it doesn't.
Now I've set a setting in test.rb that will get this exception page to show, but I would rather Rails did a hard-raise of the exception so that it showed up in Cucumber as a failing step, like I'm pretty sure it used to, rather than a passing step.
Does anybody know what could have changed since May-ish of last year for Rails to not do this? I'm pretty confident it's some setting in config/environments/test.rb, but for the life of me I cannot figure it out.
After I investigate the Rails source code, it seems like the ActionDispatch::ShowExceptions middleware that responsible of raising exception ActionController::RoutingError is missing in the test environment. Confirmed by running rake middleware and rake middleware RAILS_ENV=test.
You can see that in https://github.com/josh/rack-mount/blob/master/lib/rack/mount/route_set.rb#L152 it's returning X-Cascade => 'pass' header, and it's ActionDispatch::ShowExceptions's responsibility to pick it up (in https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/show_exceptions.rb#L52)
So the reason you're seeing that your test case is passing because rack-mount is returning "Not Found" text, with status 404.
I'll git blame people and get it fix for you. It's this conditional here: https://github.com/rails/rails/blob/master/railties/lib/rails/application.rb#L159. If the setting is true, the error got translated right but we got error page output. If it's false, then this middleware doesn't get loaded at all. Hold on ...
Update: To clearify the previous block, you're hitting the dead end here. If you're setting action_dispatch.show_exceptions to false, you'll not get that middleware loaded, resulted in the 404 error from rack-mount got rendered. Whereas if you're setting action_dispatch.show_exceptions to true, that middleware will got loaded but it will rescue the error and render a nice "exception" page for you.