bcgov / bcgov/alpine-node-libreoffice

[BUG] carbone:converter process Office of factory 0 died 1

Open
#7 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Shell
Stars
13
Forks
12
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

Trying to run with `convertTo: "pdf"` option.
The process fails with the following

```
bcgov-carbone_1 | 2022-06-10T14:51:12.973Z carbone:converter process Office of factory 0 died 1
bcgov-carbone_1 | 2022-06-10T14:51:12.979Z carbone:converter process Python of factory 0 died null
bcgov-carbone_1 | 2022-06-10T14:51:12.979Z carbone:converter factory 0 is completely off
```

**To Reproduce**

docker-compose service
```yml
image: bcgovimages/alpine-node-libreoffice
environment:
- LOCAL_STACK=1
- DEBUG=*
working_dir: /src
volumes:
- ./:/src
- ./.carbone/tmp:/tmp
command: [ "yarn", "test" ]
```

carbone.test.js
```js
const fs = require("fs")
const { render } = require("./carbone")

describe("carbone", () => {
it("should parse test.docx to test.docx", async () => {
const result = await render(__dirname + "/test.docx", {
options: {
reportName: "test.docx"
}
}, false);

fs.writeFileSync(__dirname + "/.carbone/test.docx", result);
}, 60000)

it("should convert test.docx to test.pdf", async () => {
const result = await render(__dirname + "/test.docx", {
options: {
reportName: "test.pdf",
convertTo: "pdf"
}
}, false);

fs.writeFileSync(__dirname + "/.carbone/test.pdf", result);
}, 60000)
})
```

**Expected behavior**

The DOCX document to be converted to PDF

**Desktop (please complete the following information):**

- Mac

**Additional context**

```
bcgov-carbone_1 | 2022-06-10T14:51:12.973Z carbone:converter process Office of factory 0 died 1
bcgov-carbone_1 | 2022-06-10T14:51:12.979Z carbone:converter process Python of factory 0 died null
bcgov-carbone_1 | 2022-06-10T14:51:12.979Z carbone:converter factory 0 is completely off
```

Contributor guide

Open the contributing guide

Research direction

Start with the docker-compose service and carbone.test.js, then run the convertTo: "pdf" test using the documented image. Inspect the Office and Python process logs to identify why the factory exits. Done means the DOCX-to-PDF test completes and writes test.pdf without the factory shutting down.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, javascript, node.js
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.