According to Doc ID 2893264.1 the ORA-08177 error can occur when using apex_export.get_application, after an upgrade to 22.1.
From that document:
Update 2025-12-04: This happened again (on Apex 23.2), and the solution outlined above did not work for me this time.
Note that I only got this error when exporting as YAML, not as (default) SQL. But that may be a coincidence...
What sometimes worked was running this a couple of times - the first few times gave the error but after that it worked. I suppose the commit does the trick here:
Once this completed without an error, the Apex Builder export option also worked again - in my case anyway.
You may try to (temporarily) disable some of the parameters, that seems to have a positive effect sometimes. But as mentioned before, after a number (or a lot) of tries the export tends to work again anyway, so that may also be a coincidence. Sigh...
Update 2026-03-19: When the second fix doesn't work, simply retrying a few times and/or waiting a few minutes also resolves the issue eventually.
So maybe the second fix above doesn't work either, but just seems to work sometimes, by chance...
Some useful links that discuss this solution - and the first one as well:
https://forums.oracle.com/ords/apexds/post/apex-22-1-application-export-fails-ora-08177-can-t-serializ-8448
https://forums.oracle.com/ords/apexds/post/apex-22-1-application-export-fails-9506