neo4j-contrib / neo4j-apoc-procedures

Awesome Procedures On Cypher for Neo4j - codenamed "apoc"                     If you like it, please ★ above ⇧            

Home Page:https://neo4j.com/labs/apoc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom procedures declaration fails in 5.9.0

nielsjansendk opened this issue · comments

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

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? :)

@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.

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

@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.

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!