Set Config stopped working on live extension

Hello, I’ve received some email reports of issues with one of my extensions that I currently have live at the moment, where users seem to be unable to update their config’s from the config page. I have replicated this issue on both the live version of the extension on my page, as well as local testing in developer rig.

Below is an example of how and what I am attempting to save. For clarification, I have got window.Twitch.ext saved as a const.

const twitch = window.Twitch.ext;

Example JSON attempted to save to Configuration Service.

const configJSON = {
“username”: “someusername”,
}

Example saving to configuration service.

twitch.configuration.set(‘broadcaster’, ‘1’, configJSON);

I can manually set the config data in developer rig, and it loads into my extension perfectly fine, but setting the configuration from code does not appear to be working for me. I am confused because it was working when I published the extension after it was reviewed. Is there perhaps something that has changed? or maybe configuration service is down? Not sure how to go about fixing this, as I don’t know why its not working anymore.

Any help is greatly appreciated.

I am having the same exact issue…

How did you resolve this?

I am using the Twitch Developer Rig and can also manually set the data via the Configuration Service tab of the rig… and view the configuration via JavaScript object JSON.parse(twitch.configuration.broadcaster.content);

However, when attempting to set the data via JavaScript via my config.html / config.js I am not able to update.

  twitch.configuration.set(
    "broadcaster",
    "1.0",
    JSON.stringify({'foo': 'bar'})
  );

The extension has the web setting capabilities configured to use Extension Configuration Service

Any ideas?

@BarryCarlyon

I actually did manage to figure out the issue I was having specifically. Below is the exact code I used and is working currently.

twitch.configuration.set(
“broadcaster”,
‘’,
JSON.stringify({ ‘foo’ : ‘bar’ }
);

I found that by leaving the 2nd argument in the set function to an empty string it fixed my issue.

Hope this helps!

I have tried this, but I still cannot persist (set) the data when running locally. I have passed an empty "" for the version number as you mentioned, but no luck.

Have you tried testing on Twitch? The rig is notoriously bad for handling the configuration service.

@Dist

yes, you are correct.

After I deployed to actual Twitch hosting, the configuration service was able to set.

The developer rig is a bit janky. IMHO. Not sure how all of these developers are able to figure out these quirks without trial and error.

Side question: Maybe you know the answer to this…

I am able to see the extension that I am developing and installed on my own account. That works fine.

I created a secondary test Twitch account and I invited that user via theTwitch Access > Testing Account Allowlist to provide access to this extension during testing.

I did this because I want to see how the extension would look for another random user who is visiting my channels about page…

In summary:

How can I test the extension from an anoynmous or logged in Twitch user (other then myself) when they visit for example twitch.tv/myusername/about

Currently: I can see the panel working great on my own account.

However, when I try to browse as an anonymous non-logged in or another logged-in user, I don’t see the panel at all showing.

Any ideas? Does it only show once the extension is actually published? If so what is the best way to test?

By not using the rig :smiley:

A logged out Twitch user can never see an extension in test.

A logged out Twitch user is no different from a “logged in twitch user that is not IDShared”

Or use the rig to simulate a logged out user.

The panel will be visible to anyone on the “Testing Allowlist”

I edited/revised my post/reply to answer that

Reading now… thx

I do this

Then I install and activate my extension(s) on barrycarlyonbot

Then I browse the extension on barrycarlyonbot channel when logged in as my primary account barrycarlyon

(I’ll keep barrycarlyonbot logged in on chrome incognito if I need to change anything)

@BarryCarlyon… Thanks… I think my issue was that the Twitch web console did not save my allow list… I had to first switch back to local mode then update allow list, save changes then switch back to hosting mode.

Yeah to make changes you have to be in local test.
Sounds like you had an “out of date” console page open if you treid to make changes whilst in hosted.

(It should of been grey out/unchangeable)

It probably was… I’m just getting familiar with this “Twitch Development Environment”.

Thx for your help.