The command being used to process Asymptote images in the CLI and devscript is (I think) as follows:
asy -f pdf -noV -noprc -iconify -tex xelatex -batchMask file.asy
On Windows, the -iconify option produces a black rectangle for every image in PDF output, instead of the desired image. (I am using the asy that comes with TeXLive for Windows, I think.)
Removing the -iconify option fixes things for me.
I can't recall why we have this option in the first place :-)
On Linux, things are working fine.
I think John Bowman's server still isn't working as hoped for the 'server' method for Asymptote generation.