Forum Discussion

ionatan's avatar
ionatan
Roku Guru
3 years ago

getPurchases returns HTTP Error/Timeout for Dev Apps

Hello,

 

Function getPurchases https://developer.roku.com/docs/references/scenegraph/control-nodes/channelstore.md#getpurchases returns "-1: HTTP Error/Timeout" if the app is installed as a Dev app (zip archive) on device.

The app works properly if it is published as a Channel, but local tests fails due function getPurchases not working for dev app.

Did anyone experienced similar behaviors?

 

Thanks!

3 Replies

  • renojim's avatar
    renojim
    Community Streaming Expert

    I don't know if it would cause that error, but do you have the channel you're developing set to "Use for billing testing"?

    • ionatan's avatar
      ionatan
      Roku Guru

      This occurs when I upload a zip to my local Roku devices, so the Channel is identified as a "dev" Channel not as a Channel from Roku account.

      From what I am aware there is no way to set such a dev Channel as "use for billing" testing.

      • renojim's avatar
        renojim
        Community Streaming Expert

        It is a bit of a chicken and egg problem.  It's been a while since I started from scratch with a new channel with products to sell, so I'm not sure where you start these days and I don't want to lead you down the wrong path.  However, if you're trying to "getPurchases" those purchases have to be associated with a channel.  I can see it failing if you have a new channel because there wouldn't be any way for there to be purchases associated with it.  If you don't already have a channel with products attached I would think you'd need to create a channel, create the products, attach the products to the new channel, and then do the "use for billing testing" thing.  If you have any existing channels with products attached try setting one of them to "use for billing testing" and see if getPurchases in your dev channel works.

        If I get a chance I'll try turning off "use for billing testing" on all of my channels to see what happens if I try getPurchases in a dev channel.