flowsforapex / apex-flowsforapex

Flows for APEX - Model and run process flows all within Oracle APEX!
https://flowsforapex.org
Other
80 stars 40 forks source link

[bug]: Error: SyntaxError: Unexpected non-whitespace character after JSON at position 647 (line 37 column 1) #716

Closed jherlevin closed 1 month ago

jherlevin commented 1 month ago

Flows for APEX version

23.1 (latest)

Oracle Database version

21c

Oracle APEX version

23.1

Have you used the BPMN-Linter in Flow Designer to Validate your Diagram?

Yes

What happened?

Since a day, when we want to make action on a cases (even delete it), we do have the following error : Error: SyntaxError: Unexpected non-whitespace character after JSON at position 647 (line 37 column 1)

Steps to reproduce

Go to all cases pages, all actions (terminate, delete, complete), raise the same error.

Expected behaviour

Before we were not having the issue.

jherlevin commented 1 month ago

when we want to create new cases we have the following error : "Flows - Internal error while logging an Instance Event"

rallen2010 commented 1 month ago

Without knowing much at this point, the error looks as if it is occurring when it tries to log an instance event. So things you could try to narrow down the problem:

  1. Have you recently turned logging on, or changed the level of logging?
  2. Have you run out of space in the logging tables / their table space / your database?
  3. If you have archiving enabled, this creates (and stores) a summary of all the log records for a process instance in a json document, stored in a table or OCI Object Storage after the instance completes - either as a automation job each night, or immediately if the instance is deleted and it hasn't already been archived. So:
    • is archiving enabled? (Configuration > Archiving)
    • if so, is the location defined?
    • is the location able to store the archive document? OCI key expired? Table full? OCI Bucket unreachable?

You could try turning logging and archiving off to see if that removes the problem...

I suspect the Error: SyntaxError: Unexpected non-whitespace character after JSON at position 647 (line 37 column 1) message is actually an error in the error handling, not getting an error message back to your app properly. So don't think that is the actual problem...

jherlevin commented 1 month ago

resolved by deleting all records from : FLOW_STEP_EVENT_LOG & "FLOW_INSTANCE_EVENT_LOG"

Very strange.

rallen2010 commented 1 month ago

So did you run out of space? On Always Free? Or archiving enabled with no destination?

jherlevin commented 1 month ago

Thanks for the quick feedback !

Login was Level Standard and retention 60days. I've disabled logging. Achiving was disabled.

One of the table was 1M+ records. I will check out details and post the details

rallen2010 commented 1 month ago

One of the enhancements on the list is / should be to help with log purging & instance purging of complete instances after n days after the instance completes... Anyhow, glad you are up & running again... Will try to enhance this area in upcoming releases.

jherlevin commented 1 month ago

Thanks a Lot ! It is really an amazing tool !

jherlevin commented 1 month ago

The issue was confirmed as a DB running out of space. No issue is not related to Flow4Apex, only the error message was misleading