botpress / v12

Botpress OSS – v12
https://v12.botpress.com
GNU Affero General Public License v3.0
76 stars 87 forks source link

[BUG]: Error saving flow in Docker #1446

Closed m7mdcc closed 2 years ago

m7mdcc commented 3 years ago

Describe the bug Fresh install of botpress in docker , create bot with some flow , then after some steps its show error

To Reproduce Steps to reproduce the behavior:

  1. Do anything in Flow UI like dragging flow or do any thing .
  2. red popup say studio.errorWhileSaving, i found error in log

    
    08/29/2021 02:37:33.880 HTTP [Internal] [Error, SyntaxError in your JSON: main.flow.json:
                     Error: Parse error on line 1:
    
                    ^
                    Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'EOF']
    STACK TRACE
    Error: SyntaxError in your JSON: main.flow.json:
    Error: Parse error on line 1:

^ Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'EOF' at ScopedGhostService.readFileAsObject (/snapshot/build-linux/out/bp/core/bpfs/ghost-service.js) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:97:5) at async Object.onFlowChanged (/botpress/modules/.cache/module__010248cb74dc87061c0fbc9e82c9aa2d6f363d0572a0a0785406dbabdff257cc/dist/backend/index.js:86:19) at async ModuleLoader.onFlowChanged (/snapshot/build-linux/out/bp/core/modules/module-loader.js) at async /snapshot/build-linux/out/bp/core/app/internal-router.js 08/29/2021 02:37:33.889 [Studio] HTTP [wabot] [Error, Error saving flow: Error: Request failed with status code 400] STACK TRACE Error: Error saving flow: Error: Request failed with status code 400 at /snapshot/studio/packages/studio-be/out/studio/flows/flows-router.js>

3. i tried to restart botpress , popup disapear but there is error in log say 

Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'EOF' 08/29/2021 02:55:43.638 FlowService Error Invalidating flow cache: SyntaxError in your JSON: main.flow.json: Error: Parse error on line 1:



4. Restarting Container solve the issue . 

**Expected behavior**
I don't expect to get this error . 

- Botpress Version : latest docker image
charlescatta commented 2 years ago

Hello @m7mdcc, are you still experiencing this error? If so:

m7mdcc commented 2 years ago

Hello @m7mdcc, are you still experiencing this error? If so:

  • Can we get the exact version of Botpress this is occuring on? (latest is not very helpful to replicate the issue)
  • Are you running Botpress with Postgres connected?
  • If Postgres is not being used, can you make sure that the /data folder is read writable
  • Does this error occur often or did it just happen once?

Sorry it's was issue with WSL docker storage permission . I fixed that .

Closed