I had the same issue.
My problem/solution was that a tab was inserted after the API key, so I just removed it. You cannot see it in the GUI, but if you place the cursor at the end of the API key, and press the left arrow on your keyboard, you can see that the cursor does not move.
Check the XXX-config.js file to see if there is any trailing whitespace in your API key.