-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined method 'size' for Module. #341
Comments
Thanks for reporting this issue. Can you run with the environment variable APPMAP_LOG_HOOK as described here - https://appmap.io/docs/reference/appmap-ruby.html#advanced-runtime-options and share the resulting log file? If you don’t want to attach it here, you can send us a DM through the AppMap Slack. This way we can see which method is causing the error, and we will be able to tell you how to disable it and get your app running again while we fix the problem. |
Hi @kgilpin. Attaching the logs |
Thanks, here's what I see so far. AppMap is recording a method call to this function:
As it records that function, it's writing out the data for the self and arguments. That logic includes this snippet:
The DelayedProxy has indicated that it is an Array or Hash - I don't see how this is possible, but it seems to be happening. AppMap then tries to call the
Somehow, You can disable recording of Add the fully qualified class name and method name to the
To fix this in appmap-ruby, I'll add a guard clause to verify that |
## [0.102.1](v0.102.0...v0.102.1) (2023-07-25) ### Bug Fixes * Guard access to the :size method ([e0b53b2](e0b53b2)), closes [#341](#341)
🎉 This issue has been resolved in version 0.102.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
@kgilpin unfortunately, even with the fix the issue is still happening in the same place. Even the workaround won't have any effect. I believe that the issue might be that The funny thing is that each time
I think the issue should be reopened. |
What's interesting / weird is that appmap-ruby isn't calling a method on the object, it's using https://github.com/getappmap/appmap-ruby/blob/master/lib/appmap/value_inspector.rb#L10 An object that overrides Because the object is wrapped with a proxy, calling any method on it causes it to be enqueued: https://github.com/collectiveidea/delayed_job/blob/master/lib/delayed/message_sending.rb#L11 That's why you are seeing that behavior. So the solution will definitely be to find out which method is triggering this behavior and add it to the |
I'm using the AppMap ruby agent to build sequence diagrams. I'm using the record feature of the gem.
It would seem that some hooks added by the agent are causing issues and my app to crash. Some info of the app:
Ruby version: 3.0.5
Rails: 6.1.7.1
appmap (0.102.0)
Stacktrace:
The key part seems to be here:
Where app map tries to inspect a value. The value inspected remains unknown to me, as it's a little bit tricky to debug the code at that point, but it starts from a Delayed job method call to
#delay
with a hash argument.Unfortunately, this is impeding me to fully use appmap as it crashes my application on a very important flow.
The text was updated successfully, but these errors were encountered: