OraOpenSource / apex-diff

APEX Diff
MIT License
31 stars 6 forks source link

ERROR on JSON #25

Open tdings opened 5 years ago

tdings commented 5 years ago

I always get following error when I try to run the program;

~\apex-diff\app.js test 110 undefined:41 ,"apex_application_authorization":[ ^

SyntaxError: Unexpected token , in JSON at position 11965 at JSON.parse () at Object. (C:\Repositories\GitHub\apex-diff\app.js:255:28) at Module._compile (internal/modules/cjs/loader.js:688:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10) at Module.load (internal/modules/cjs/loader.js:598:32) at tryModuleLoad (internal/modules/cjs/loader.js:537:12) at Function.Module._load (internal/modules/cjs/loader.js:529:3) at Function.Module.runMain (internal/modules/cjs/loader.js:741:12) at startup (internal/bootstrap/node.js:285:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)

tdings commented 5 years ago

FYI in SQLcl window I can see that a ORA-01427 single-row subquery returns more than one row is thrown. Not sure on which statement.

barryb001git commented 4 years ago

+1 for me We're on Apex 18. Not sure how to troubleshoot.

barryb001git commented 4 years ago

Further to the above, there is some issue with temp.sql, which I've isolated to one cursor.

For some reson, the specific "cursor(select" returns no values (BUT 2 DEFINITELY exist). This in turn is causing the JSON formatting issue. Only "]]},"apex_application_auth":[" is produced.

I have no idea what is wrong with the "cursor(select" part. I have attached temp.sql with only the 1 statement in it, and the original code commented out and replaced with something that does work. Also attached is what he "cursor(select" SHOULD return.

temp_bugfix.zip f100(output).zip

barryb001git commented 4 years ago

Further to the above, there are many elements coming back with no data. And in each case it's producing invalid JSON. Expecting something that isn't there.

martindsouza commented 4 years ago

Thanks for the updates. Right now I'm not actively working on this project. I'd recommend trying out APEXcl instead as it does what apex-diff does and a lot more: https://apexcl.dev/

Geri1590 commented 3 years ago

Hello here, I had the same errors and solved it using format "sql-formatted" and correcting some references in nodejs code. Details: https://github.com/Geri1590/apex-diff/commit/a6d9999e728745a71d2a443e2bf251470b045852

Regards!