Did you change anything else from the example? The example works. Try starting with the example itself. If that’s also failing in your environment, then something else is going on. If the example works in your environment, then progressively work through the changes you made until you find the one that’s breaking it.