Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when upploading images #6324

Closed
jrmedc opened this issue Jun 15, 2023 · 8 comments
Closed

Error when upploading images #6324

jrmedc opened this issue Jun 15, 2023 · 8 comments

Comments

@jrmedc
Copy link

jrmedc commented Jun 15, 2023

My actions before raising this issue

When trying to upload an image I have the following error:
Error: tus: failed to upload chunk at offset 0, caused by [object ProgressEvent], originated from request (method: PATCH, url: http://.com/api/tasks/21/data/a99b69e9-e161-4392-af27-b202eb9d6814, response code: n/a, response text: n/a, request id: n/a
I have deployed cvat with https as detailed in the documentation :
export CVAT_HOST=<YOUR_DOMAIN>
export ACME_EMAIL=<YOUR_EMAIL>
and
docker compose -f docker-compose.yml -f docker-compose.https.yml up -d

However when uploading it is using a http URL .
I dug into the uppload.js file and in the _createUpload function line 593 : _this6.url = resolveUrl(_this6.options.endpoint, location);
resolveUrl(_this6.options.endpoint, location); returns a http url and not an https. even tho cvat is running fine with https and everything else works fine.

I tried to modify the variable on the fly with chrome debug tool but got the same exact error with https so maybe the probles is with the backend

Steps to Reproduce (for bugs)

  1. create a new task
    2.Chose images to upload ! multiple images
    3.create the task
    !!error occurs with the following message:
    Error: tus: failed to upload chunk at offset 0, caused by [object ProgressEvent], originated from request (method: PATCH, url: http://.com/api/tasks/21/data/a99b69e9-e161-4392-af27-b202eb9d6814, response code: n/a, response text: n/a, request id: n/a

Your Environment

commit 3eeaeb2 (HEAD -> develop, origin/develop, origin/HEAD)
Author: Kirill Lakhov kirill.9992@gmail.com
Date: Thu Jun 15 15:14:33 2023 +0300

AWS EC2 4cpu 16gb ram, 128 gb storage (8% used)

@azhavoro
Copy link
Contributor

Fixed by #6308
Please make sure that you have used the actual images, you need to rebuild it with the command docker compose -f docker-compose.yml -f docker-compose.dev.yml build.

@jrmedc
Copy link
Author

jrmedc commented Jun 21, 2023

Yes I rebuild and it works just fine perfect thanks !

@jrmedc jrmedc closed this as completed Jun 21, 2023
@Votess4All
Copy link

Votess4All commented Sep 2, 2023

sorry, I tried the solution above, but still get the error,
Error: tus: failed to upload chunk at offset 0, caused by [object ProgressEvent], originated from request (method: PATCH, url: http://xxx.cn/api/tasks/7/data/58206c84-dfaa-4853-90cd-2c3d28b74226,
the build process gave the following log,

# docker compose -f docker-compose.yml -f docker-compose.dev.yml build
[+] Building 3.3s (75/75) FINISHED
 => [cvat_server internal] load .dockerignore                                                                                                                                                                                                                              0.0s
 => => transferring context: 123B                                                                                                                                                                                                                                          0.0s
 => [cvat_server internal] load build definition from Dockerfile                                                                                                                                                                                                           0.0s
 => => transferring dockerfile: 7.36kB                                                                                                                                                                                                                                     0.0s
 => [cvat_server internal] load metadata for docker.io/library/ubuntu:22.04                                                                                                                                                                                                0.0s
 => [cvat_server internal] load metadata for docker.io/library/golang:1.20.5                                                                                                                                                                                               1.4s
 => [cvat_server internal] load build context                                                                                                                                                                                                                              0.6s
 => => transferring context: 95.72MB                                                                                                                                                                                                                                       0.6s
 => [cvat_server build-smokescreen 1/3] FROM docker.io/library/golang:1.20.5@sha256:fd9306e1c664bd49a11d4a4a04e41303430e069e437d137876e9290a555e06fb                                                                                                                       0.0s
 => [cvat_server build-image-base 1/6] FROM docker.io/library/ubuntu:22.04                                                                                                                                                                                                 0.0s
 => CACHED [cvat_server stage-4  2/21] RUN apt-get update &&     DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install -yq         bzip2         ca-certificates         curl         git         git-lfs         libgeos-c1v5         libgl1         li  0.0s
 => CACHED [cvat_server build-smokescreen 2/3] RUN git clone --depth=1 -b v0.0.4 https://github.com/stripe/smokescreen.git                                                                                                                                                 0.0s
 => CACHED [cvat_server build-smokescreen 3/3] RUN cd smokescreen && go build -o /tmp/smokescreen                                                                                                                                                                          0.0s
 => CACHED [cvat_server stage-4  3/21] COPY --from=build-smokescreen /tmp/smokescreen /usr/local/bin/smokescreen                                                                                                                                                           0.0s
 => CACHED [cvat_server stage-4  4/21] RUN adduser --shell /bin/bash --disabled-password --gecos "" django &&     if [ -z  ]; then         echo export "GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no -o ConnectTimeout=30"" >> /home/django/.bashrc;     else          0.0s
 => CACHED [cvat_server stage-4  5/21] RUN if [ "no" = "yes" ]; then         apt-get update &&         apt-get --no-install-recommends install -yq             clamav             libclamunrar9 &&         sed -i 's/ReceiveTimeout 30/ReceiveTimeout 300/g' /etc/clamav/  0.0s
 => CACHED [cvat_server stage-4  6/21] RUN python3 -m venv /opt/venv                                                                                                                                                                                                       0.0s
 => CACHED [cvat_server stage-4  7/21] RUN python -m pip install -U pip==22.0.2                                                                                                                                                                                            0.0s
 => CACHED [cvat_server build-image-base 2/6] COPY ./sources.list /etc/apt/sources.list                                                                                                                                                                                    0.0s
 => CACHED [cvat_server build-image-base 3/6] RUN cat /etc/apt/sources.list                                                                                                                                                                                                0.0s
 => CACHED [cvat_server build-image-base 4/6] RUN apt-get update &&     DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install -yq         curl         g++         gcc         git         libgeos-dev         libldap2-dev         libsasl2-dev          0.0s
 => CACHED [cvat_server build-image-base 5/6] RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple                                                                                                                                                 0.0s
 => CACHED [cvat_server build-image-base 6/6] RUN --mount=type=cache,target=/root/.cache/pip/http     python3 -m pip install -U pip==22.0.2                                                                                                                                0.0s
 => CACHED [cvat_server build-image 1/4] COPY cvat/requirements/ /tmp/cvat/requirements/                                                                                                                                                                                   0.0s
 => CACHED [cvat_server build-image 2/4] COPY utils/dataset_manifest/requirements.txt /tmp/utils/dataset_manifest/requirements.txt                                                                                                                                         0.0s
 => CACHED [cvat_server build-image 3/4] RUN sed -i '/^av==/d' /tmp/utils/dataset_manifest/requirements.txt                                                                                                                                                                0.0s
 => CACHED [cvat_server build-image 4/4] RUN --mount=type=cache,target=/root/.cache/pip/http     DATUMARO_HEADLESS=1 python3 -m pip wheel --no-deps     -r /tmp/cvat/requirements/production.txt     -w /tmp/wheelhouse                                                    0.0s
 => CACHED [cvat_server build-image-av  1/11] WORKDIR /tmp/openh264                                                                                                                                                                                                        0.0s
 => CACHED [cvat_server build-image-av  2/11] COPY ./openh264-2.1.1.tar.gz /tmp/openh264                                                                                                                                                                                   0.0s
 => CACHED [cvat_server build-image-av  3/11] RUN tar -xzvf ./openh264-2.1.1.tar.gz --strip-components=1 &&     make -j5 && make install-shared PREFIX=/opt/ffmpeg && make clean                                                                                           0.0s
 => CACHED [cvat_server build-image-av  4/11] WORKDIR /tmp/ffmpeg                                                                                                                                                                                                          0.0s
 => CACHED [cvat_server build-image-av  5/11] COPY ./ffmpeg-4.3.1.tar.gz /tmp/ffmpeg/                                                                                                                                                                                      0.0s
 => CACHED [cvat_server build-image-av  6/11] RUN tar -xzvf ffmpeg-4.3.1.tar.gz --strip-components=1 &&     ./configure --disable-nonfree --disable-gpl --enable-libopenh264         --enable-shared --disable-static --disable-doc --disable-programs --prefix="/opt/ffm  0.0s
 => CACHED [cvat_server build-image-av  7/11] COPY utils/dataset_manifest/requirements.txt /tmp/utils/dataset_manifest/requirements.txt                                                                                                                                    0.0s
 => CACHED [cvat_server build-image-av  8/11] RUN grep -q '^av==' /tmp/utils/dataset_manifest/requirements.txt                                                                                                                                                             0.0s
 => CACHED [cvat_server build-image-av  9/11] RUN sed -i '/^av==/!d' /tmp/utils/dataset_manifest/requirements.txt                                                                                                                                                          0.0s
 => CACHED [cvat_server build-image-av 10/11] RUN pip install setuptools wheel 'cython<3'                                                                                                                                                                                  0.0s
 => CACHED [cvat_server build-image-av 11/11] RUN --mount=type=cache,target=/root/.cache/pip/http     python3 -m pip wheel --no-binary=av --no-build-isolation     -r /tmp/utils/dataset_manifest/requirements.txt     -w /tmp/wheelhouse                                  0.0s
 => CACHED [cvat_server stage-4  8/21] RUN --mount=type=bind,from=build-image,source=/tmp/wheelhouse,target=/mnt/wheelhouse     --mount=type=bind,from=build-image-av,source=/tmp/wheelhouse,target=/mnt/wheelhouse-av     python -m pip install --no-index /mnt/wheelhou  0.0s
 => CACHED [cvat_server stage-4  9/21] COPY --from=build-image-av /opt/ffmpeg/lib /usr/lib                                                                                                                                                                                 0.0s
 => CACHED [cvat_server stage-4 10/21] RUN if [ "${CVAT_DEBUG_ENABLED}" = 'yes' ]; then         python3 -m pip install --no-cache-dir debugpy;     fi                                                                                                                      0.0s
 => CACHED [cvat_server stage-4 11/21] COPY cvat/nginx.conf /etc/nginx/nginx.conf                                                                                                                                                                                          0.0s
 => CACHED [cvat_server stage-4 12/21] COPY --chown=django components /tmp/components                                                                                                                                                                                      0.0s
 => CACHED [cvat_server stage-4 13/21] COPY --chown=django supervisord/ /home/django/supervisord                                                                                                                                                                           0.0s
 => CACHED [cvat_server stage-4 14/21] COPY --chown=django ssh /home/django/.ssh                                                                                                                                                                                           0.0s
 => CACHED [cvat_server stage-4 15/21] COPY --chown=django wait-for-it.sh manage.py backend_entrypoint.sh /home/django/                                                                                                                                                    0.0s
 => CACHED [cvat_server stage-4 16/21] COPY --chown=django utils/ /home/django/utils                                                                                                                                                                                       0.0s
 => CACHED [cvat_server stage-4 17/21] COPY --chown=django cvat/ /home/django/cvat                                                                                                                                                                                         0.0s
 => CACHED [cvat_server stage-4 18/21] COPY --chown=django rqscheduler.py /home/django                                                                                                                                                                                     0.0s
 => CACHED [cvat_server stage-4 19/21] RUN if [ "${COVERAGE_PROCESS_START}" ]; then         echo "import coverage; coverage.process_startup()" > /opt/venv/lib/python3.10/site-packages/coverage_subprocess.pth;     fi                                                    0.0s
 => CACHED [cvat_server stage-4 20/21] WORKDIR /home/django                                                                                                                                                                                                                0.0s
 => CACHED [cvat_server stage-4 21/21] RUN mkdir -p data share keys logs /tmp/supervisord static                                                                                                                                                                           0.0s
 => [cvat_server] exporting to image                                                                                                                                                                                                                                       0.0s
 => => exporting layers                                                                                                                                                                                                                                                    0.0s
 => => writing image sha256:cd04c28f485d4069768be06ae44d1c8cb19647ff421ce32d4cc7d095be99fd12                                                                                                                                                                               0.0s
 => => naming to docker.io/cvat/server:v2.6.0                                                                                                                                                                                                                              0.0s
 => [cvat_ui internal] load build definition from Dockerfile.ui                                                                                                                                                                                                            0.0s
 => => transferring dockerfile: 1.15kB                                                                                                                                                                                                                                     0.0s
 => [cvat_ui internal] load .dockerignore                                                                                                                                                                                                                                  0.0s
 => => transferring context: 123B                                                                                                                                                                                                                                          0.0s
 => [cvat_ui internal] load metadata for docker.io/library/nginx:mainline-alpine                                                                                                                                                                                           0.9s
 => [cvat_ui internal] load metadata for docker.io/library/node:lts-slim                                                                                                                                                                                                   1.1s
 => [cvat_ui cvat-ui  1/16] FROM docker.io/library/node:lts-slim@sha256:fea6dbb8697baddc6c58f29337bbd3b4abaab97ae7e70d148fe21d558803da43                                                                                                                                   0.0s
 => [cvat_ui stage-1 1/3] FROM docker.io/library/nginx:mainline-alpine@sha256:16164a43b5faec40adb521e98272edc528e74f31c1352719132b8f7e53418d70                                                                                                                             0.0s
 => [cvat_ui internal] load build context                                                                                                                                                                                                                                  0.1s
 => => transferring context: 5.06MB                                                                                                                                                                                                                                        0.1s
 => CACHED [cvat_ui stage-1 2/3] COPY cvat-ui/react_nginx.conf /etc/nginx/conf.d/default.conf                                                                                                                                                                              0.0s
 => CACHED [cvat_ui cvat-ui  2/16] COPY package.json /tmp/                                                                                                                                                                                                                 0.0s
 => CACHED [cvat_ui cvat-ui  3/16] COPY yarn.lock /tmp/                                                                                                                                                                                                                    0.0s
 => CACHED [cvat_ui cvat-ui  4/16] COPY cvat-core/package.json /tmp/cvat-core/                                                                                                                                                                                             0.0s
 => CACHED [cvat_ui cvat-ui  5/16] COPY cvat-canvas/package.json /tmp/cvat-canvas/                                                                                                                                                                                         0.0s
 => CACHED [cvat_ui cvat-ui  6/16] COPY cvat-canvas3d/package.json /tmp/cvat-canvas3d/                                                                                                                                                                                     0.0s
 => CACHED [cvat_ui cvat-ui  7/16] COPY cvat-ui/package.json /tmp/cvat-ui/                                                                                                                                                                                                 0.0s
 => CACHED [cvat_ui cvat-ui  8/16] COPY cvat-data/package.json /tmp/cvat-data/                                                                                                                                                                                             0.0s
 => CACHED [cvat_ui cvat-ui  9/16] WORKDIR /tmp/                                                                                                                                                                                                                           0.0s
 => CACHED [cvat_ui cvat-ui 10/16] RUN yarn install --ignore-scripts --frozen-lockfile                                                                                                                                                                                     0.0s
 => CACHED [cvat_ui cvat-ui 11/16] COPY cvat-data/ /tmp/cvat-data/                                                                                                                                                                                                         0.0s
 => CACHED [cvat_ui cvat-ui 12/16] COPY cvat-core/ /tmp/cvat-core/                                                                                                                                                                                                         0.0s
 => CACHED [cvat_ui cvat-ui 13/16] COPY cvat-canvas3d/ /tmp/cvat-canvas3d/                                                                                                                                                                                                 0.0s
 => CACHED [cvat_ui cvat-ui 14/16] COPY cvat-canvas/ /tmp/cvat-canvas/                                                                                                                                                                                                     0.0s
 => CACHED [cvat_ui cvat-ui 15/16] COPY cvat-ui/ /tmp/cvat-ui/                                                                                                                                                                                                             0.0s
 => CACHED [cvat_ui cvat-ui 16/16] RUN CLIENT_PLUGINS="${CLIENT_PLUGINS}" UI_APP_CONFIG="${UI_APP_CONFIG}" SOURCE_MAPS_TOKEN="${SOURCE_MAPS_TOKEN}" yarn run build:cvat-ui                                                                                                 0.0s
 => CACHED [cvat_ui stage-1 3/3] COPY --from=cvat-ui /tmp/cvat-ui/dist /usr/share/nginx/html/                                                                                                                                                                              0.0s
 => [cvat_ui] exporting to image                                                                                                                                                                                                                                           0.0s
 => => exporting layers                                                                                                                                                                                                                                                    0.0s
 => => writing image sha256:2ffdd8ef5be8ae806e7ec566455a4d42b03fd465f7ddc69901043beafae47e09                                                                                                                                                                               0.0s
 => => naming to docker.io/cvat/ui:v2.6.0

could u help me to figure out the reason?? thx

@Petros626
Copy link

@Votess4All how much memory you reserved for wsl?

@baudneo
Copy link

baudneo commented Sep 28, 2023

Hi, I am getting the same error. Its weird because I uploaded these same images a few minutes before, deleted the task and then went to recreate it. Now it throws this error.

Any ideas? The system is Linux and has 256GB RAM

Dev console logs:

Failed to load resource: the server responded with a status of 404 ()
httpStack.js:96 

Mixed Content: The page at 'https://cvat.xxxxx.com/tasks/create' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://cvat.xxxxxx.com/api/tasks/31/data/f64a6607-a93c-4f04-a483-b0b05c737a7d'. This request has been blocked; the content must be served over HTTPS.
(anonymous) @ httpStack.js:96

cvat-app.tsx:359 Error: tus: failed to upload chunk at offset 0, caused by [object ProgressEvent], originated from request (method: PATCH, url: http://cvat.xxxxxx.com/api/tasks/31/data/f64a6607-a93c-4f04-a483-b0b05c737a7d, response code: n/a, response text: n/a, request id: n/a).
e @ cvat-app.tsx:359

@zhoupan163
Copy link

zhoupan163 commented Dec 20, 2023

I used mounted files to upload and create tasks,Then it failed,here is the console logs
`Could not create the task

Error: tus: failed to upload chunk at offset 2097152, caused by [object ProgressEvent], originated from request (method: PATCH, url: http://localhost:8080/api/tasks/87/data/56cf40b3-c51d-4cc7-bfb1-55b6b42a7038, response code: n/a, response text: n/a, request id: n/a).`
II used mounted files to upload and create tasks,it works!

@thad75
Copy link

thad75 commented May 27, 2024

Have the same issue but on the online website. Has it been solved ?

@baudneo
Copy link

baudneo commented May 28, 2024

Have the same issue but on the online website. Has it been solved ?

Doubt it, if any of the CVAT maintainers do answer, they usually say 'it works on my machine' and that's about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants