Tool used: Quartus prime pro edition 18.0
Try follow the solution provided in links below
Let me know if this has helped resolve the issue you are facing or if you need any further assistance.
Please share the Quartus log & images with error.
As the message states, you need to program the device first with the .sof. Click the program button in the JTAG Configuration section on the right (button with little down arrow pointing to device). Just because you've compiled the design doesn't mean the design is running on the device. You have to program it first.
If you're saying that you have programmed the device and you are still seeing this error, try closing Signal Tap and manually program the device in the Quartus Programmer (Tools menu). Then reopen the .stp file and see if it's now working.
Can you see the size difference in sof file before and after adding the stp file?
Have you enabled Signal-Tap Logic analyzer under setting?
Can you delete the db, increment db, signal-tap and sof files.
And recompile the design and create new signal tap with minimum signals and check.