We are stumbling upon an issue where the registry doesn’t appear to be removed/cleared when a channel is removed.
We are saving some data to the registry like autologin and first-time launch. According to the docs this should be deleted after the (private) channel is removed from a device. Even after restarting the device when the channel is removed the registry still returns data when the channel is added again.
“Registry data is removed only when the application explicitly removes it, the user uninstalls the application, which remove the registry for the application, or the user performs a factory reset, which removes the registry for all applications.” - https://sdkdocs.roku.com/display/sdkdoc/roRegistry
Anyone else having this problem?
The problem seems to occur on all devices we tested (firmware 7.7)
Are you signing multiple apps with the same key?
I believe apps that share a development key also share a single registry section. In this case, the registry would only clear if you delete all apps using that key.
Fixing what? Tyler already gave the solution if you’re signing multiple apps/channels with the same key. You have to remove them all (and reboot, I believe) to clear the registry. If you don’t like this behavior, then always generate a new key for every channel you develop.
“renojim” wrote:
Fixing what? Tyler already gave the solution if you’re signing multiple apps/channels with the same key. You have to remove them all (and reboot, I believe) to clear the registry. If you don’t like this behavior, then always generate a new key for every channel you develop.
-JT
That’s not a solution though. If there a bunch of apps (5+) and you can’t remove them all and also cannot generate a new key for each one, what’s the best option?
Not looking for a “tough luck,” answer. Looking for something actually constructive.
Unfortunately, I think “tough luck” is the answer. It’s not likely the current behavior will ever be changed because there’s probably as many reasons for it as against it.
What’s the problem you’re trying to solve? You can manually or programmatically edit the registry, clear out parts of it if you want. Is it getting too full or something?
I am having this problem too, clearing the Registry of user information (logging in/logging out).
I’m using the new SG framework, and it has a deleteRegistry sub function in generalUtilies that looks like this:
sub deleteRegistry(keySection="" As String)
print "Starting Delete Registry"
Registry = CreateObject("roRegistry")
i = 0
if keySection <> "" then
RegistrySection = CreateObject("roRegistrySection", keySection)
for each key in RegistrySection.GetKeyList()
i = i+1
print "Deleting " keySection + ":" key
RegistrySection.Delete(key)
end for
RegistrySection.flush()
else
for each section in Registry.GetSectionList()
RegistrySection = CreateObject("roRegistrySection", section)
for each key in RegistrySection.GetKeyList()
i = i+1
print "Deleting " section + ":" key
RegistrySection.Delete(key)
end for
RegistrySection.flush()
end for
end if
print i.toStr() " Registry Keys Deleted"
end sub
And I call it with
deleteRegistry(“nameOfRegasString”)
However, it seems like this data is still persisting. Has anyone else experienced this and had better luck??
UPDATE: I removed flush() from this function, and that seems to help the problem. I read that flush actually persists data to storage, even in the event of a reboot, so that would make sense why things were still persisting. I’m not 100% sure this was the issue, or if this even resolved…has anyone else had a similar experience with flush()?
“lisakb140” wrote:
.has anyone else had a similar experience with flush()?
If you’re not flush()-ing. the data in question won’t be saved. Now, maybe that’s what you want, and maybe not. If you are having trouble with things persisting, it means you are not deleting the right things, when you think you are.
“lisakb140” wrote:
.has anyone else had a similar experience with flush()?
If you’re not flush()-ing. the data in question won’t be saved. Now, maybe that’s what you want, and maybe not. If you are having trouble with things persisting, it means you are not deleting the right things, when you think you are.
Thanks, yes, I’m using this when a user logs out of the channel. When I included flush() in this deleteRegistry function, even after going through the steps of “logging out”, it still seemed like they would be logged in.
I guess what I don’t understand is why there would be a call to persist data in a function that is supposed to be deleting a registry…it seems counter-productive!
I wouldn’t think deleting the keys would be really necessary. Usually I simply write a default value to the keys my channel uses instead of deletion, so I don’t see this issue.
How do you change the Dev ID for each channel? if you have 3 channels, do you have to have three different Roku devices signed into with three different developer accounts to save the package from?
Does the Registry also store if the channel is subscribed to or not?
How do you change the Dev ID for each channel? if you have 3 channels, do you have to have three different Roku devices signed into with three different developer accounts to save the package from?
if you are talking about the dev ID that you get along with a password after running GenKey at port 8080 - No, you don’t. You can use the same for multiple channels.
Does the Registry also store if the channel is subscribed to or not? Only if you make it do so. That’s for you to code.
How do you change the Dev ID for each channel? if you have 3 channels, do you have to have three different Roku devices signed into with three different developer accounts to save the package from?
if you are talking about the dev ID that you get along with a password after running GenKey at port 8080 - No, you don’t. You can use the same for multiple channels.
Does the Registry also store if the channel is subscribed to or not? Only if you make it do so. That’s for you to code.
Hello, does any of that Registry stuff get recorded with this channel? https://github.com/rokudev/videoplayer-channel
I may be having the same problem. In my case, I remove a channel (specifically Hulu) using my Ultra stick, but 24 hours later, it is back. Same for the Tennis channel, but it generally takes a few days for it to return. I have not found a fix; it may be a registry issue. I have 3 Ultras in the house, all on the same account. After removal, it is removed for 24 hours on all three but then returns on all three. I know Roku will occasionally automatically add a channel, I suppose because of some agreement with the channel, like Hulu, but when I delete the channel I want it to stay deleted. If this problem persists, I may ditch all 3 Ultras and go with Amazon.