ever-traduora icon indicating copy to clipboard operation
ever-traduora copied to clipboard

YAML import not working?

Open stijnb1234 opened this issue 1 year ago • 5 comments

Describe the bug I'm trying to import a yaml file, but I get: "Error, resource not found"

To Reproduce

  1. Create a new project
  2. Go to Import and upload a YAML file.
  3. Select a language and choose Import
  4. See the error

Expected behavior It should just import

Screenshots image

Environment (please complete the following information):

  • Device: Desktop PC
  • OS: Windows
  • Browser: Brave (tried Firefox too)
  • Version: latest

Additional context My docker-compose.yaml file (created in Portainer):

version: '3.7'

services:
  traduora:
    image: everco/ever-traduora:latest
    container_name: traduora
    build:
      context: .
      dockerfile: Dockerfile
      args:
          NODE_ENV: ${NODE_ENV:-development}
    environment:
      TR_DB_TYPE: mysql
      TR_DB_USER: tr
      TR_DB_PASSWORD: removed_for_privacy
      TR_DB_DATABASE: tr_dev
      TR_DB_HOST: mysqldb
      TR_DB_PORT: 3306
      NODE_ENV: ${NODE_ENV:-development}    
    entrypoint: './docker-entrypoint.compose.sh'
    restart: on-failure
    depends_on:
      - mysqldb
    links:
      - mysqldb:${TR_DB_HOST:-mysqldb}      
    networks:
      - overlay

  mysqldb:
    image: mysql:5.7
    container_name: mysqldb
    restart: always
    environment:
      MYSQL_DATABASE: tr_dev
      MYSQL_USER: tr
      MYSQL_PASSWORD: removed_for_privacy
      MYSQL_ROOT_PASSWORD: root
      MYSQL_ALLOW_EMPTY_PASSWORD: 'true'
    networks:
      - overlay

networks:
  overlay:
      driver: bridge

(I've connected it to another network too, so that I can proxy it to my subdomain)

stijnb1234 avatar Mar 19 '23 13:03 stijnb1234

Looks like the API is not accessible in the Docker Compose build. I'm getting the same error with a CSV file. In the server logs it looks like this:

POST /api/v1/projects/168efedb-94c2-46b5-81a1-64695ce13703/imports?format=csv&locale=en_US HTTP/1.0 404

loleg avatar Apr 01 '23 23:04 loleg

@stijnb1234 I just tried to import some random YAML file with our standard docker-compose file (https://github.com/ever-co/ever-traduora/blob/develop/docker-compose.yaml), and it all worked for me. Please share what file you try to import in case there's something wrong with the file itself so I can test.

@loleg , not sure, for me, API request worked; see below:

Request URL: http://localhost:8080/api/v1/projects/b56a5a80-e8e2-4047-a650-ed909e28b42e/imports?format=yamlflat&locale=de_CH
Request Method: POST
Status Code: 200 OK

image

evereq avatar Apr 02 '23 20:04 evereq

:point_up: Thanks. I've opened a separate issue since my problem is a CSV and even more specifically, English.

loleg avatar Apr 04 '23 07:04 loleg

I have the same issue when I want to import a PO file. I tried hosting the Docker container on a Linux and on a Windows host, same error on both machines. The only change I made to the compose file is adding a database password and to add a volume for the mysql data. Is there any way to get more information what is happening? Log file, etc.?

Edit: I also tried to use the docker-compose file without any changes, same issue.

mmttim avatar May 06 '24 14:05 mmttim

@mmttim well, if you run it in docker, you can ssh to it, run API manually in console and see all output and most probably you should see why / where it failing and see error message etc. Not different to any other NodeJs app running inside Docker container honestly.

evereq avatar May 06 '24 16:05 evereq