Skip to content

patchURL fails for synchronous Xhr calls. Β #267

@Mark20Builds

Description

@Mark20Builds

src/utils/patchUrlMappings.ts << when using patchURL for CocosJS, the error:

"webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/app-index.js:33 InvalidAccessError: Failed to set the 'responseType' property on 'XMLHttpRequest': The response type cannot be changed for synchronous requests made from a document."

This isn't unique to our games, the Cocos samples produce the same result. Note, if you run Cocos in an iframe (with the proxy prefix) you don't need to use patchURL, however, to run without iframe due to the way Cocos loads this is necessary.

Notes: We call the DiscordSDK from the host-page NOT from within Cocos.

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