Here are sample PNG (autogen.png) file and simple script (Photoshop2018PngBug.js).
Script tries to get document width and height (app.activeDocument.width) but these values are “NaN”. Then script makes workaround via select all and get current selection width and height - this is successful. After this it calls OuterGlow() function that was previously recorded by ScriptListener.8li - all values in Outer Glow effect are correct except Size which was set to 0, whereas it should be 6 (OuterGlowSettings.png).
So here are 2 problems:
“NaN” for doc width and height
Size in Outer Glow effect settings
This bug occurs with specific PNG files only and in Photoshop CC 2018 only (all versions including 19.1.0). In previous Photoshop versions (CC 2017 and earlier) - everything works fine. This particular PNG was saved in After Effects CC 2017. If we make some image modification (e.g. lines with brush) and just press Ctrl+S to save updated PNG, then reopen it in Photoshop - bug will still persist. The only workaround is to use “Save for Web” - after this updated PNG processed with this script without any issues.https://www.dropbox.com/sh/qzn99kdfkwy06gp/AAAJOkYK0aVPmUfPookJ2myaa?dl=0