Skip to content

QrCode generation fails when reusing an existing alias #1123

@RodrigoSMarques

Description

@RodrigoSMarques

Describe the bug

When requesting to create a QR Code (branch.qrCode) using an existing alias in qrCodeParams, the application stops responding.

An error is displayed in the browser console.

branch-latest.min.js:68  POST https://api2.branch.io/v1/qr-code 400 (Bad Request)
branch-latest.min.js:67 Uncaught InvalidStateError: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'arraybuffer').

Steps to reproduce

Create a QR code (branch.qrCode) using an existing alias

Expected Behavior

Return an error message, which can be handled by the application in the same way as the branch.link method

branch-latest.min.js:68  POST https://api2.branch.io/v1/url 400 (Bad Request)
Error in API: URL - https://api2.branch.io/v1/url, Status - 400, Response - {"error":{"code":400,"message":"Alias provided is invalid"}}

Additional Information/Context

Image Image Image

SDK version used (window.branch.sdk)

2.86.4

Environment

Chrome 138.0.7204.158 on Mac OS 15.5 (24F74)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions