HumanSignal / HumanSignal/label-studio

Labeling Interface Fails to Load URL of Audio Tag for Tasks With Data Urls

Open
#4,736 3 comments 3 reactions 1 assignee Claimed by @makseq View on GitHub
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

**Describe the bug**
Labeling Interface fails to load URL of Audio tag for tasks with data URLs.

**To Reproduce**
1. Import tasks from an S3 storage cloud storage with the option "Treat every bucket object as a source file" ticked.
2. Sync the storage to import the tasks.
3. The imported tasks have the following format:
```json
{
"id": 1,
"data": {
"audio": "data:audio/x-wav;base64,...."
},
"annotations": [],
"predictions": []
}
```

4. Setup the following Labeling Interface:
```html







```

5. Click on any task in the project view to enter the labeling page.
6. The Labeling Interface does not show correctly in the UI, because an `ERR_INVALID_URL` error is thrown.
7. This happens because the query parameter `lsref=1` is added to the URL. But Data URLs do not support query parameters.

**Expected behavior**
Labeling Interface is shown correctly in the UI for tasks with data URLs.

**Potential fix**
Do not automatically add the query parameter `lsref=1` to url in audio tag.

**Screenshots**
![Screenshot 2023-09-04 111252](https://github.com/HumanSignal/label-studio/assets/39067132/8165b566-133f-4de5-8508-889c87d581cc)

**Environment (please complete the following information):**
- OS: Windows
- Label Studio Version: 1.8.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.