web-branch-deep-linking-attribution icon indicating copy to clipboard operation
web-branch-deep-linking-attribution copied to clipboard

QrCode generation fails when reusing an existing alias

Open RodrigoSMarques opened this issue 4 months ago • 0 comments

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)

RodrigoSMarques avatar Jul 22 '25 13:07 RodrigoSMarques