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

Custom procedures declaration fails in 5.9.0 #3640

Closed
nielsjansendk opened this issue Jun 23, 2023 · 5 comments · Fixed by #3647
Closed

Custom procedures declaration fails in 5.9.0 #3640

nielsjansendk opened this issue Jun 23, 2023 · 5 comments · Fixed by #3647

Comments

@nielsjansendk
Copy link

Guidelines

Expected Behavior (Mandatory)

I version 5.8.1 I can declare a custom procedure like this:

CALL apoc.custom.declareProcedure('myProcedure(input::STRING) :: (output:: MAP)','
RETURN {input: $input} as output','read')

Actual Behavior (Mandatory)

In version 5.9.0 when I attempt this, am getting an error:

Failed to invoke procedure apoc.custom.declareProcedure: Caused by: java.lang.IllegalArgumentException: argument type mismatch

How to Reproduce the Problem

Steps (Mandatory)

  1. Create a new database version 5.9.0. Install apoc and apoc-extended version 5.9.0
  2. Run this cypher query:
CALL apoc.custom.declareProcedure('myProcedure(input::STRING) :: (output:: MAP)','
RETURN {input: input} as output','read')

Specifications (Mandatory)

Neo4j version 5.9.0
Apoc version 5.9.0
Neo4j Desktop version 1.5.8.105

Versions

  • OS: Mac OS ventura 13.4
  • Neo4j: 5.9.0
  • Neo4j-Apoc: 5.9.0
@gem-neo4j
Copy link
Contributor

Hi! Thanks for letting us know. I've reproduced this on 5.8 as well, seems to be a bit flakey and a restart of the db fixed it, I will make a ticket for us to investigate further, but in the meantime perhaps try restarting and see if that works for you like it did for me? :)

@nielsjansendk
Copy link
Author

@gem-neo4j Starting the database again did work right now... weird, though, because I have tried that several times. Definitely something going on. I have never had any problems on 5.8.

@gem-neo4j
Copy link
Contributor

Definitely something fishy going on! Hopefully it doesn't cause too many issues for now :) If it happens more feel free to comment here for the person who will look at the ticket I made

@nielsjansendk
Copy link
Author

@gem-neo4j Okay, new development: my database will no longer start. It is permanently offline. So the sequence of events was create new database -> install plugins -> start database -> custom procedure cannot be created -> restart database -> custom procedure can be created -> start another database and do some work -> close that database and start the test database -> test database is offline and will not start. I checked the debug log, and the error message is the same as before "java.lang.IllegalArgumentException: argument type mismatch".

This is obviously not something we can put into production, and for now I am just playing with it locally. But it means that we cannot upgrade our production database, which is not great. The problem will of course become critical if an important security update is sent out. Crossing my fingers that a patch can be made and sent out.

@gem-neo4j
Copy link
Contributor

Hi, yes that is indeed worse D: I have investigated it myself and think I have found the issue, we will try to get it fixed and released in a timely manner :) Sorry for the inconvenience!

vga91 added a commit that referenced this issue Aug 23, 2023
* Fixes #3640: Custom procedures declaration fails in 5.9.0

* debug error in 5.10.0

* 5.10 changes
recrwplay pushed a commit to recrwplay/neo4j-apoc-procedures that referenced this issue Aug 31, 2023
…eo4j-contrib#3647)

* Fixes neo4j-contrib#3640: Custom procedures declaration fails in 5.9.0

* debug error in 5.10.0

* 5.10 changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants