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

Failed to load opencv.js when using Segment Everything #6237

Closed
2 tasks done
FrankUSC opened this issue Jun 4, 2023 · 2 comments · Fixed by #6799
Closed
2 tasks done

Failed to load opencv.js when using Segment Everything #6237

FrankUSC opened this issue Jun 4, 2023 · 2 comments · Fixed by #6799
Assignees
Labels
bug Something isn't working

Comments

@FrankUSC
Copy link

FrankUSC commented Jun 4, 2023

My actions before raising this issue

Steps to Reproduce (for bugs)

  1. For the version v2.4.5, deploy the Segment Everything model
  2. Go to annotation page
  3. Interact with the AI Tools and choose Segment Everything, click Interact
  4. Console prints error: GET http://localhost:8/opencv/opencv.js net::ERR_CONNECTION_REFUSED opencv-wrapper.ts:68
  5. Added console.log and rebuild cvat/ui image, it shows baseURL= http://localhost:8 at opencv-wrapper.ts:68

Expected Behaviour

Expect the opencv.js loaded successfully,
the baseURL should be http://localhost:8080/api instead of http://localhost:8

Current Behaviour

opencv.js load failure, baseUrl is wrong at here:
https://github.com/opencv/cvat/blob/release-2.4.5/cvat-ui/src/utils/opencv-wrapper/opencv-wrapper.ts#L13
const baseURL = core.config.backendAPI.slice(0, -7);

image

Possible Solution

const baseURL = core.config.backendAPI.replace("/api","");

Context

Your Environment

  • Git hash commit (git log -1):
  • Docker version docker version (e.g. Docker 17.0.05):
  • Are you using Docker Swarm or Kubernetes?
  • Operating System and version (e.g. Linux, Windows, MacOS):
  • Code example or link to GitHub repo or gist to reproduce problem:
  • Other diagnostic information / logs:
    Logs from `cvat` container
@adnan-earthsense
Copy link

I had this randomly occur as well. I restarting my computer and the containers a few times and it went away, but it was quite weird... Hopefully it doesn't come back

@bsekachev
Copy link
Member

@FrankUSC

Why slice does not work for you? Are you using not default configuration?

@bsekachev bsekachev added the bug Something isn't working label Jun 7, 2023
@bsekachev bsekachev self-assigned this Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants