[SOLVED] Error getting products - Domain is invalid

I’m trying to set up bit products for my extension, using the developer rig, but this is what I’m getting:


This is the console log:

POST https://api.twitch.tv/v5/extensions/4xs9z6xjdbne34izori35h3slfqiih/auth/refresh/test 404 ()
2localhost.rig.twitch.tv/:1

Failed to load https://client-event-reporter.twitch.tv/v1/stats: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘https://localhost.rig.twitch.tv:3000’ is therefore not allowed access.
products:1

GET https://api.twitch.tv/v5/bits/extensions/twitch.ext.4xs9z6xjdbne34izori35h3slfqiih%20/products?includeAll=true 400 ()

If I add any product, I cannot find it there againg if I upload the page.

ALSO:

I’ve also tried to test directly into a channel using setUseLoopback like this:
Twitch.ext.bits.useBits(“123”);
Twitch.ext.bits.setUseLoopback(true)
Twitch.ext.bits.onTransactionComplete(this.bitsCallback)

But I’m getting this:
222
Log:
POST https://api.twitch.tv/v5/bits/extensions/is-eligible/123 500 ()

EDIT: about the second issue, I was calling useBits before setUseLoopback.
Switching the two lines fixed the second error so I managed to make the setUseLoopback work in a channel with all the mocked calls.

Still, I have the error with the products in the rig, hence I cannot set or manage products.

Can anyone give me a hint / point me to the right direction?

Thanks!

Either theres a bug in the rig and it’s adding a space to the end of your Extensions Client ID, or you configured your dev rig with a space on the end of the Extension Client ID

@BarryCarlyon
Thanks!
I definitely missed the %20 there!

Solved, I accidentally added a space at the end of my ID when setting up the rig.

BTW, maybe I shouldn’t have posted my client ID, right I’ve edited the first post and removed it, can you remove it from the quote on your post, too?
Thanks!

And many thanks for the solution, who know how many more times I would have checked the logs before finding that %20, my eyes were filtering it :slight_smile:

ClientID"s are public

Here’s mine

Got it, I was worried for nothing :slight_smile:
Thanks for the info!