Why isn't my Minecraft detect command working when executed by a command block?

Solution 1:

As Fabian commented, use @s target selector, instead of the @a[c=1]. This target selector selects the entity executing the command. You are using the execute command so this would select the player that has sandstone beneath them.


This 'error' is indicating that the detect portion did not detect sandstone below the player.

It will say this every time it executes and it does not detect sandstone, I am standing on stone here:
Error

Exact same command while standing on sandstone, no error and I have slowness:
Non Error