Skip to content

DiscordSDK.ready() stuck when using URL override #296

@RixInGithub

Description

@RixInGithub

        Dear Discord SDK developers.

I am writing this issue to let you know of a yet another bug with the ready function of DiscordSDK.
The code inside of the method sends a handshake message and waits for a READY event to be sent by the parent origin. However, with my test code...

void(async function() {
  var idefk = await import("https://unpkg.com/@discord/embedded-app-sdk@1.0.0/output/index.mjs")
  var {DiscordSDK} = idefk
  var sdk = new DiscordSDK(CLIENT_ID, {disableConsoleLogOverride: true})
  await sdk.ready()
  alert("h")
})()

...it should alert h. However, it doesn't. Instead, in the console, I see an error complaining about invalid origins, thus stopping the ready from ever finishing, making the h unnoticed.

But when I go check out the activity without URL overriding, it works just fine and the code passes through to the alert("h") statement.

I really hope that you would fix this error. (The discordsays.com proxy caches my activity code which isn't ideal for my testing, which is why I go with URL overriding.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions