apex-diff icon indicating copy to clipboard operation
apex-diff copied to clipboard

ERROR on JSON

Open tdings opened this issue 7 years ago • 6 comments

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 avatar Oct 30 '18 11:10 tdings

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.

tdings avatar Oct 30 '18 12:10 tdings

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

barryb001git avatar Sep 23 '20 12:09 barryb001git

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 avatar Sep 23 '20 13:09 barryb001git

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.

barryb001git avatar Sep 23 '20 19:09 barryb001git

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/

martindsouza avatar Sep 30 '20 15:09 martindsouza

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!

Geri1590 avatar Nov 09 '20 11:11 Geri1590