Recording Cloud Client-Server Messages

When testing your app, you may encounter the situation where the client screen doesn’t match what you see on the server screen. To debug this problem, you need to record the JSON object sent from the server to the client.

Here’s an example to get you started. To learn more about recording, see Using the Cloud Recorder.

  1. Start up your first Roku app as shown in Building and Running a Roku App.
  2. Open the server screen.

    Open the Dev Panel.

    Select Cloud Recorder to turn on recording.

    Select React Native Reload, then Full Reload (to force the server to send a full screen update to the client).

  3. Open recording0.json in a text editor. You can find that file in the app root folder (<project>/recording<n>.json>).

    Locate the last loadJSON command.

    In the arguments node, locate the first text property.

    The string reads “Welcome to your first You I React Native app!”

  4. Open index.youi.js in a text editor. Change “Welcome to your first You I React Native app!” to “Hello World!!!” and save the changes.

    Observe that the changed text is now shown on both the server screen and the client screen.

  5. Re-open recording0.json in a text editor and find the last loadJSON command.

    In the arguments node, locate the first text property.

    The string which follows is “Hello World!!!”