Skip to content

URL is duplicated during UnityWebRequest redirection when it contains cookies #1658

@aleh-patseyeu

Description

@aleh-patseyeu

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which version of the SDK?
2.0.2-2.0.5 (haven't tested on < 2.0.0 versions)

How did you install the package? (Git-URL, Assetstore)
git-url

Which version of Unity?
2022.0.3.28f

Is this happening in Unity (editor) or on a player like Android, iOS, Windows?
iOS player (can't reproduce on Android)

Steps to Reproduce

Hard to provide exact steps for reproduction, because issue is happening in the wild, but what we have found is that for some reason, we got a duplicated URL during unity web request redirection, when URL contains cookies. For other cases it worked fine. Also it didn’t happen for each redirect request with the cookies, but often enough (maybe ~20%).

Issue is not reproducible with iOS native SDK support disabled.

Expected Result

URL is not duplicated.

Actual Result

URL is duplicated and the backend responds with 403 error.

Any logs or screenshots

[Mp3DownloadRequest] Request failed: url: https://content-stage.frever-content.com/Assets/Song/1529/Main/20230920T134058Uf6b18667eba54ce8b4c56eb1017475ac/content.mp3?Expires=1716256215&Signature=g063f76nCk5tNtFSnQ6fmcTSehx~fGJ6uA8s9DsMSW30VAJfUXwZMU74XOAgaCdoNxDl4eMIJroZwdfisXi7t~eTmmiyVwDUuCpYHHjDTBA3YtZxY5bdOzLTRXE2sHh3jA5P43o~m-UJ2iM8-yxandcLCISWCl98tUCV2X~D9OSCW8SmHWRSkRbWFMJyq51mvDhYqENFp-aW33R6GUGf5aVjedYHQhA2VQ31p1tStMGsnk5CZDKV8fxWMNsZevDW9JrKdXsfNf4Uo09Drvfx7Nx91J3likf7VcNPhgo0UcR5dR0o2iKUpBGMWP72jdZxEM8tedy2Et4Qg2ODWAHoaA__&Key-Pair-Id=APKAJYWSXGQANK2USB7A,https://content-stage.frever-content.com/Assets/Song/1529/Main/20230920T134058Uf6b18667eba54ce8b4c56eb1017475ac/content.mp3?Expires=1716256215&Signature=g063f76nCk5tNtFSnQ6fmcTSehx~fGJ6uA8s9DsMSW30VAJfUXwZMU74XOAgaCdoNxDl4eMIJroZwdfisXi7t~eTmmiyVwDUuCpYHHjDTBA3YtZxY5bdOzLTRXE2sHh3jA5P43o~m-UJ2iM8-yxandcLCISWCl98tUCV2X~D9OSCW8SmHWRSkRbWFMJyq51mvDhYqENFp-aW33R6GUGf5aVjedYHQhA2VQ31p1tStMGsnk5CZDKV8fxWMNsZevDW9JrKdXsfNf4Uo09Drvfx7Nx91J3likf7VcNPhgo0UcR5dR0o2iKUpBGMWP72jdZxEM8tedy2Et4Qg2ODWAHoaA__&Key-Pair-Id=APKAJYWSXGQANK2USB7A
, headers: {"x-cache":"Error from cloudfront","Content-Type":"text/xml","Server":"CloudFront","Via":"1.1 b42eb3d87622a28f769121f374a92fda.cloudfront.net (CloudFront)","x-amz-cf-pop":"WAW51-P4","Date":"Sat, 18 May 2024 13:50:15 GMT","Content-Length":"146","x-amz-cf-id":"BHPeFH3goAdPI12GpRrmeWeVTCkOx_qSP2juukUNH8uQc6p2ZrAWRQ=="}  

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions