I suspect Quartus Prime Lite might be the issue here.
If your are using Quartus Prime Lite, you need to ensure you design does not have any license IPs (you must use only free IPs for Quartus Prime Lite). This will lead you to time limited .sof file. Thus, you unable to program it using AS mode.
The workaround for you:
I hope this will help.