Closed ido77778 closed 3 years ago
Any updates on merging this to the master?this issue affects me to... @leonjza
Sorry, I am spread pretty thin at the moment. I'll get to it as soon as possible.
That explains the issue we had when we upgraded Objection, it broke our internal tool, that fix is highly needed :+1:
Any updates @leonjza?
Not yet, no.
Sorry this took so long. I just landed #414 which will be available in the next release.
Describe the bug When adding the parameters --dump-arguments and --dump-return when hooking to a method, the argument and returns values are given as [Object object] whenever the object isn't a primitive, rather than their specific values. I was able to trace down the offending code to
agent/src/android/hooking.ts
whereand
Were changed to use JSON.Stringify() in commit ac40784b7a8296e714def56a62df3473bbe41487. Oddly enough, the commit was made to fix #334, which is the exact same problem. When I revert that commit, the problem it was supposed to solve disappears (!). Acquaintances of mine also confirm this to have been an issue.
To Reproduce
android hooking watch class_method [method URI] --dump-args --dump-return
.Expected behavior Giving the parameters
--dump-arguments
and--dump-return
should output the arguments and return values, not just their types.Evidence / Logs / Screenshots Defective behavior after ac40784b7a8296e714def56a62df3473bbe41487:
Correct behavior after reversion:
Environment (please complete the following information):
Application I used the following simple code (on a MainActivity) to debug this issue:
I also made the following simple ComplexNumber class to test whether it was only an issue with JSON files, and it confirmed the problem occures with any object, and is still fixed after the change: package com.example.reproducer;