Skip to content

[bug] import broken in repl #704

@rithvikvibhu

Description

@rithvikvibhu

Describe the bug
import <path/to/script.js> is broken:

> import ~/Desktop/frida_script.js

An unexpected internal exception has occurred. If this looks like a code related error, please file a bug report!
'Agent' object has no attribute 'background'

Python stack trace: Traceback (most recent call last):
  File "/objection/objection/console/repl.py", line 361, in run
    self.run_command(document)
  File "/objection/objection/console/repl.py", line 169, in run_command
    exec_method(arguments)
  File "//objection/objection/commands/frida_commands.py", line 85, in load_background
    agent.background(hook)
AttributeError: 'Agent' object has no attribute 'background'

To Reproduce

  1. Run command 'import anyscript.js'

Similar issues
None I could find when searching for "background".

Expected behavior
The script should load, like before.

Evidence / Logs / Screenshots
Stacktrace above.

Environment (please complete the following information):

  • Device: Android device
  • OS: Android 13
  • Frida Version: 16.5.2
  • Objection Version: from git, latest master as of now (5f22e0a)

Application
Not application dependent.

Additional context
Looks like the background method used here:

agent.background(hook)

was removed from Agent in this commit: 865fb7d

Metadata

Metadata

Assignees

No one assigned

    Labels

    freshissueDefault label for new, untriaged issues.🐛bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions