Skip to content

Unable to open .bag file via Remote File URL — worker never reaches HTTP request step #793

Closed

Description

@JJ1M8

Unable to open .bag file via Remote File URL — worker never reaches HTTP request step

Description:
When providing a remote file URL, RemoteDataSourceFactory converts the input into a urls array (even if there is only one value), and passes it to the worker. The initialize() function simply forwards { urls } to the worker.

This works fine for the .mcap worker because it supports both url and urls.
However, the .bag worker only recognizes file or url arguments and does not handle urls. Therefore, when it receives { urls: [...] }, it reaches the fallback path and throws:

Error: file or url required

Environment

  • Version: develop V1.21
  • Platform: Ubuntu 20.04
  • Browser: Chrome

Suggested Fix (tested and works)

In RemoteDataSourceFactory.tsx around line ~111:

const initArgs =
  urls.length === 1 ? { url: urls[0] } : { urls };
const source = new WorkerSerializedIterableSource({ initWorker, initArgs });

By passing { url: urls[0] } when there is only one URL, the .bag worker receives a supported parameter and loads normally, while .mcap continues to support multi-file input as before.

Activity

  1. ctw-joao-luis commented on Dec 3, 2025

    @ctw-joao-luis
    Contributor

    Hey @JJ1M8, thank you for your contribution! I've opened a PR ( #814 ) with your suggestion and this should be fixed soon!

    Cheers,
    JL

  2. ctw-joao-luis commented on Dec 3, 2025

    @ctw-joao-luis
    Contributor

    Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions