Closed bhaskarshankarling closed 6 years ago
Is there a way to reproduce this?
You said, you pasted the params for the query, I don't see them. Can you share more about the query itself.
@vipulnsward Thank you for responding.
I have updated the description and added the value of collector and dispatch[object.class] at the time of error. They are not exactly the parameters of visit method but they are the arguments of method call at line number 13 in which I am getting the error. The query is being fired using ActiveRecord as below:
For example: User.where(id: id, type: user_type)
@bhaskarshankarling https://stackoverflow.com/questions/37693847/rails-app-crashed-with-argumenterror-uncaught-throw-recursive-key-true Is this related ?
Per #523, Arel development is moving to rails/rails.
If this issue is still relevant, please consider reopening it over there. (Note that the Rails repository does not accept feature request issues, and requires reproduction steps that rely on Active Record's documented API.)
I am getting above error from visitors/reduce.rb:13, below I have attached full backtrace of the error. The issue is occurring so randomly that, the working query in production suddenly starts breaking and starts throwing error and in the next moment it starts working fine. On tracking origin of the error, every error tracks down to line number 13 of visitors/reduce.rb file inside the gem. The UncaughtThrowError is thrown only when an exception is thrown without catch block. I tried to find whether there is any throw statement in arel gem but I could not get any.
I was also able to get parameters of the visit method at the time the error is being raised. I have also pasted them below. By looking at the arguments it seems like query was also not built completely. The error was raised while building the query itself. That partly built query is one of the query for which I am getting error. I am getting this error for any random query in the application.
Below I have pasted backtrace of the error, ruby version, Gemfile and Gemfile.lock of rails app.
Ruby version:
2.3.4
object, dispatch[object.class] in visit method at the time of error: collector:
<ActiveRecord::ConnectionAdapters::AbstractAdapter::BindCollector:0x007fe85a2db1b8 @parts=["SELECT", " ", " ", "
users
.*", " FROM ", "users
", " WHERE "]>dispatch[object.class]: visit_Arel_Nodes_And
Error back trace:
Gemfile:
Gemfile.lock:
Please let me know if anyone faced this kind of issue and able to resolve it.