Skip to content
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

SOLVED: Server pull: Error: Call to a member function json() on array #9601

Closed
1 task done
skalvaro opened this issue Mar 1, 2024 · 3 comments
Closed
1 task done
Assignees
Labels
needs triage This issue has been automatically labelled and needs further triage

Comments

@skalvaro
Copy link

skalvaro commented Mar 1, 2024

Actual behavior

When performing a server pull using cake we get an error 'Error: Call to a member function json() on array'.
The job seems to be stuck @ 75% in the jobs list.
When performing a server pull using the gui the result is the same except that the job now returns 'Failed' with the stacktrace available to be viewed.
In both cases the message of the job shows 'Pulling sightings'.

When checking it does seem that pulling the events itself is successful as we can see new events that originated from the pulled server.

Expected behavior

Server pull executes without errors.

Steps to reproduce

Update to v2.4.186 (708d181) and perform a server pull, either through the gui or via CLI cake Server pull command.

Version

2.4.186

Operating System

RedHat

Operating System version

7.9

PHP version

7.4

Browser

No response

Browser version

No response

Relevant log output

2024-03-01 16:32:39 Error: [JOB ID: 774b86e9-f199-4f56-be52-dea5ac816a22] - failed with error code 1 after 46.612 seconds. STDERR: Error: Call to a member function json() on array
#0 /var/www/MISP/app/Model/Server.php(687): AnalystData->pull(Array, Object(ServerSyncTool))
#1 /var/www/MISP/app/Console/Command/ServerShell.php(149): Server->pull(Array, 'full', Array, '527478', false)
#2 /var/www/MISP/app/Lib/cakephp/lib/Cake/Console/Shell.php(459): ServerShell->pull()
#3 /var/www/MISP/app/Lib/cakephp/lib/Cake/Console/ShellDispatcher.php(222): Shell->runCommand('pull', Array)
#4 /var/www/MISP/app/Lib/cakephp/lib/Cake/Console/ShellDispatcher.php(66): ShellDispatcher->dispatch()
#5 /var/www/MISP/app/Console/cake.php(45): ShellDispatcher::run(Array)
#6 {main}
. STDOUT: .

Extra attachments

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@skalvaro skalvaro added the needs triage This issue has been automatically labelled and needs further triage label Mar 1, 2024
@JakubOnderka JakubOnderka self-assigned this Mar 4, 2024
@skalvaro
Copy link
Author

skalvaro commented Mar 5, 2024

@JakubOnderka I can confirm the fix seems to do the trick.
I applied the changes on the two files in the fix on top of v2.4.186 (708d181) and the pull job now successfully completes.

@Kagee
Copy link
Contributor

Kagee commented Mar 8, 2024

2.4.187 is now tagged.

@skalvaro skalvaro changed the title Bug: Server pull: Error: Call to a member function json() on array SOLVED: Server pull: Error: Call to a member function json() on array Mar 9, 2024
@skalvaro
Copy link
Author

skalvaro commented Mar 9, 2024

Solved in v2.4.187

@skalvaro skalvaro closed this as completed Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue has been automatically labelled and needs further triage
Projects
None yet
Development

No branches or pull requests

3 participants