Skip to content

Refine Deep Link Launch Flow #294

@TwitchBronBron

Description

@TwitchBronBron

Problem

The current deep link launch flow in telnet mode is convoluted: it injects an entry breakpoint, waits for the app to hit it, stops the app, then re-launches via ECP with the deep link args. This is fragile and unnecessary. And, doesn't work well with debug protocol mode.

Solution

When deepLinkUrl is defined, use this flow instead:

  1. Start the upload and get a promise (do not await it)
  2. Immediately fire the ECP deep link request
  3. Await the upload promise
if (this.launchConfiguration.deepLinkUrl) {
    const uploadPromise = this.uploadApp(); // do NOT await yet
    const deepLinkUrl = await util.resolveUrl(this.launchConfiguration.deepLinkUrl);
    await util.httpPost(deepLinkUrl);
    await uploadPromise;
}

It seems that the Roku device will queue up the launch params, and since uploading and compiling takes so long, we're almost guaranteed to have these params passed in through main!

Acceptance Criteria

  • When deepLinkUrl is defined, the upload is started without awaiting, the ECP deep link request is fired immediately, and then the upload is awaited
  • When deepLinkUrl is not defined, launch behavior is unchanged
  • Remove the telnet-mode logic that injects an entry breakpoint specifically for deep link re-launch purposes
  • Remove the logic that waits for the first breakpoint, stops the app, and re-launches via ECP with deep link args
  • Verify the new flow works correctly in both telnet and debug protocol modes
  • unit tests verifying the new flows work as expected

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions