
24i
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2017
02:46 AM
Registry not cleared after removing channel
Hello,
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)
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)
20 REPLIES 20
Tyler_Smith
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2017
04:30 AM
Re: Registry not cleared after removing channel
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.
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.
Tyler Smith

24i
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2017
02:13 AM
Re: Registry not cleared after removing channel
Hi Tyler,
That would explain it. We are using the same developer ID for signing all our internal test channels.
I should have read the docs better I guess...
Thanks!
That would explain it. We are using the same developer ID for signing all our internal test channels.
I should have read the docs better I guess...
Thanks!
johnmarsden
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2017
07:56 AM
Re: Registry not cleared after removing channel
So if that's the case, how do you go about fixing it? Is there an event for when the channel is explicitly removed or something?
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2017
08:05 AM
Re: Registry not cleared after removing channel
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
-JT
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
johnmarsden
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2017
08:29 AM
Re: Registry not cleared after removing channel
"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.
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2017
05:12 PM
Re: Registry not cleared after removing channel
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.
Sorry,
-JT
Sorry,
-JT
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.

Komag
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2017
05:52 PM
Re: Registry not cleared after removing channel
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?
lisakb140
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2018
01:15 PM
Re: Registry not cleared after removing channel
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:
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()?
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()?

squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2018
04:07 PM
Re: Registry not cleared after removing channel
"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.
Kinetics Screensavers