# Flowforge - Error loading settings file

**URL:** <https://discourse.nodered.org/t/flowforge-error-loading-settings-file/78674>\
**Category:** General\
**Tags:** flowforge\
**Created:** [24 May 2023 23:30 UTC](https://discourse.nodered.org/t/flowforge-error-loading-settings-file/78674 "2023-05-24T23:30:54Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![nohc](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@nohc](https://discourse.nodered.org/u/nohc)\
**Post date:** [24 May 2023 23:30 UTC](https://discourse.nodered.org/t/flowforge-error-loading-settings-file/78674/1 "2023-05-24T23:30:54Z")

</div>

Hey, I am having trouble getting any instance to start up in Flowforge. Its a local install on Amazon Linux 2. Any suggestions on how to troubleshoot? Thanks.

5/24/2023 7:21:34 PM  
[system]  
Starting Node-RED  
5/24/2023 7:21:34 PM  
[]  
Error loading settings file: /opt/flowforge/var/projects/3a9d7b65-b6d2-4016-b4f9-de4d570d24d6/settings.js  
5/24/2023 7:21:34 PM  
[system]  
Node-RED exited rc=0 signal=null

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [25 May 2023 08:42 UTC](https://discourse.nodered.org/t/flowforge-error-loading-settings-file/78674/2 "2023-05-25T08:42:40Z")

</div>

Hi @nohc

Do you have access to the settings file `/opt/flowforge/var/projects/3a9d7b65-b6d2-4016-b4f9-de4d570d24d6/settings.js` ?

If so, can you share it with me? The FlowForge launcher that generates the settings file shouldn't be able ot generate an invalid file - so it would be helpful to see what has gone wrong here.

---

<div class="post-metadata">

**Author:** ![nohc](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@nohc](https://discourse.nodered.org/u/nohc)\
**Post date:** [25 May 2023 10:11 UTC](https://discourse.nodered.org/t/flowforge-error-loading-settings-file/78674/3 "2023-05-25T10:11:18Z")

</div>

Hey, sure thing. This happens with every project and I had removed that one already. Here is a newly created one. I have reinstalled via the install script a couple times and checked what I could think of. Thanks

```auto
module.exports = {
    flowFile: 'flows.json',
    flowFilePretty: true,
    adminAuth: require('@flowforge/nr-launcher/adminAuth')({
        baseURL: 'http://REDACTED:12080',
        forgeURL: 'http://REDACTED:3000',
        clientID: 'ffp_wX6cMTieNfctxWQotrd9w76W1TDKFEXdM8LLiVs5OJc',
        clientSecret: 'f4RCbQ-HdNcIxtiuSFw1Ql0pSzg0AghmlUKvG9fgBkBc0JXcm25xs5_jwc05ESfj'
    }),
    credentialSecret: '2496af9faf1f0bda427a9a47d384e4d6db162c292e8110435521ca9c81594254',
    httpAdminRoot: '',
    ui: { path: '/ui'},
    disableEditor: false,
    
    
    tcpInAllowInboundConnections: true,
    udpInAllowInboundConnections: true,
    httpServerOptions: {
        "trust proxy": true
    },
    storageModule: require('@flowforge/nr-launcher/storage'),
    httpStorage: {
        projectID: '87bb59f8-f20a-4a13-9df7-2bfc77fcfdf2',
        baseURL: 'http://REDACTED:3000/storage',
        token: 'fft_CRUbaXKecJ4R0j2mY4yYjGhlfPvpr1DaIkXBxUwe8hs'
    },
    
    logging: {
        console: { level: 'info', metric: false, audit: false, handler: () => {
                const levelNames = {
                    10: "fatal",
                    20: "error",
                    30: "warn",
                    40: "info",
                    50: "debug",
                    60: "trace",
                    98: "audit",
                    99: "metric"
                }
                return (msg) => {
                    let message = msg.msg;
                    try {
                        if (typeof message === 'object' && message !== null && message.toString() === '[object Object]' && message.message) {
                            message = message.message;
                        }
                    } catch(e){
                        message = 'Exception trying to log: '+util.inspect(message);
                    }
                    console.log(JSON.stringify({
                        ts: Date.now(),
                        level: levelNames[msg.level],
                        type: msg.type,
                        name: msg.name,
                        id:msg.id,
                        msg: message
                    }))
                }
            }

        },
        auditLogger: {
            level: 'off', audit: true, handler: require('@flowforge/nr-launcher/auditLogger'),
            loggingURL: 'http://REDACTED:3000/logging',
            projectID: '87bb59f8-f20a-4a13-9df7-2bfc77fcfdf2',
            token: 'fft_CRUbaXKecJ4R0j2mY4yYjGhlfPvpr1DaIkXBxUwe8hs'
        }
    },
    nodesDir: ["/opt/flowforge/app/node_modules/@flowforge/nr-launcher/node_modules/@flowforge/nr-project-nodes","/opt/flowforge/app/node_modules/@flowforge/nr-project-nodes","/opt/flowforge/app/node_modules/@flowforge/nr-launcher/node_modules/@flowforge/nr-file-nodes","/opt/flowforge/app/node_modules/@flowforge/nr-file-nodes","/opt/flowforge/app/node_modules/@flowforge/nr-launcher"],
    "forge-light": {"launcherVersion":"1.7.0","forgeURL":"http://REDACTED:3000","projectURL":"http://REDACTED:3000/project/87bb59f8-f20a-4a13-9df7-2bfc77fcfdf2"},
    editorTheme: {
        theme: 'forge-light',
        page: {
            title: 'FlowForge',
            favicon: "/theme/css/favicon.ico",
        },
        header: {
            title: 'shiny-willow-warbler-1258',
            url: 'http://REDACTED:3000/project/87bb59f8-f20a-4a13-9df7-2bfc77fcfdf2'
        },
        logout: {
            redirect: 'http://REDACTED:3000/project/87bb59f8-f20a-4a13-9df7-2bfc77fcfdf2'
        },
        codeEditor: {
            lib: 'monaco'
        },
        
        tours: true
    },
    nodesExcludes: [],
    externalModules: {
        // autoInstall: true,
        palette: {
            allowInstall: true,
            allowUpload: false,
            denyList: [],
            allowList: ["*"]
        },
        modules: {
            allowInstall: true,
            denyList: [],
            allowList: ["*"]
        }
    },
    functionExternalModules: true,
    flowforge: {
        forgeURL: 'http://REDACTED:3000',
        teamID: 'Lx1zGx2DGP',
        projectID: '87bb59f8-f20a-4a13-9df7-2bfc77fcfdf2',
        launcherVersion: '1.7.0',
        fileStore: {"url":"http://localhost:3001","token":"fft_CRUbaXKecJ4R0j2mY4yYjGhlfPvpr1DaIkXBxUwe8hs"},
        
    },
    runtimeState: {
        enabled: true,
        ui: true
    }
}

```

---

<div class="post-metadata">

**Author:** ![nohc](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@nohc](https://discourse.nodered.org/u/nohc)\
**Post date:** [25 May 2023 10:40 UTC](https://discourse.nodered.org/t/flowforge-error-loading-settings-file/78674/4 "2023-05-25T10:40:09Z")

</div>

Looks like all permissions are consistent and set to ec2-user. I don't see any other errors that I can find in any logs.

.0K -rw-rw-r-- 1 ec2-user ec2-user 119 May 25 09:59 out.log  
4.0K -rw-rw-r-- 1 ec2-user ec2-user 115 May 25 09:59 package.json  
8.0K -rw-rw-r-- 1 ec2-user ec2-user 4.4K May 25 09:59 settings.js

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [25 May 2023 10:40 UTC](https://discourse.nodered.org/t/flowforge-error-loading-settings-file/78674/5 "2023-05-25T10:40:46Z")

</div>

That settings file is valid. Most odd.

What version Node-RED did you specify in the stack?

---

<div class="post-metadata">

**Author:** ![nohc](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@nohc](https://discourse.nodered.org/u/nohc)\
**Post date:** [25 May 2023 10:42 UTC](https://discourse.nodered.org/t/flowforge-error-loading-settings-file/78674/6 "2023-05-25T10:42:18Z")

</div>

| Type | Default / Node-RED 3.0.2 |
| --- | --- |
| Template | Default |
| Node-RED Version | 3.0.2 |
| Launcher Version | 1.7.0 |
| Node.js Version | 16.20.0 |

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [25 May 2023 10:42 UTC](https://discourse.nodered.org/t/flowforge-error-loading-settings-file/78674/7 "2023-05-25T10:42:34Z")

</div>

There are 3 `require`s in the file (that is normal)

- `require('@flowforge/nr-launcher/adminAuth')`
- `require('@flowforge/nr-launcher/storage')`
- `require('@flowforge/nr-launcher/auditLogger')`

Can you check they exist?

`npm list @flowforge/nr-launcher/adminAuth`  
`npm list @flowforge/nr-launcher/storage`  
`npm list @flowforge/nr-launcher/auditLogger`

---

<div class="post-metadata">

**Author:** ![nohc](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@nohc](https://discourse.nodered.org/u/nohc)\
**Post date:** [25 May 2023 10:45 UTC](https://discourse.nodered.org/t/flowforge-error-loading-settings-file/78674/8 "2023-05-25T10:45:32Z")

</div>

They don't show up, actually.

@flowforge/flowforge-localfs@1.7.1 /opt/flowforge/app  
└── (empty)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [25 May 2023 11:04 UTC](https://discourse.nodered.org/t/flowforge-error-loading-settings-file/78674/9 "2023-05-25T11:04:35Z")

</div>

I'll do a clean install myself so I can check the exact expected location of those modules. Will report back a bit later this afternoon

---

<div class="post-metadata">

**Author:** ![nohc](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@nohc](https://discourse.nodered.org/u/nohc)\
**Post date:** [25 May 2023 11:30 UTC](https://discourse.nodered.org/t/flowforge-error-loading-settings-file/78674/10 "2023-05-25T11:30:01Z")

</div>

Thanks, I sent a message through the Flowforge contact page as we are interested in using NR/FF to solve some use cases at my work. I have personally used NR for years in hobby life and was reluctant in getting our team to use it for solving enterprise problems (just out of pure caution) but have had moment after moment of "wow, I think this would totally work... and well," I was not even aware of the challenges Flowforge is addressing until a few days ago and had assumed it was more around commercial IoT/manufacturing, etc. I just wanted to connect the two messages in context for those discussions, independent of your gracious support here. Thanks!

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [25 May 2023 13:25 UTC](https://discourse.nodered.org/t/flowforge-error-loading-settings-file/78674/11 "2023-05-25T13:25:19Z")

</div>

Hi @nohc

I've done a clean install locally within an ubuntu vm and everything is working.

The commands @Steve-Mcl asked you to run were not quite right - so the `(empty)` result was expected.

In the `/opt/flowforge/app` directory, can you run:

```auto
npm list @flowforge/nr-launcher

```

(without the extra path part at the end)

---

<div class="post-metadata">

**Author:** ![nohc](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@nohc](https://discourse.nodered.org/u/nohc)\
**Post date:** [26 May 2023 01:43 UTC](https://discourse.nodered.org/t/flowforge-error-loading-settings-file/78674/12 "2023-05-26T01:43:18Z")

</div>

Here are the results of that command.

After I ran it, I just went ahead and removed the /opt/flowforge dir, recreated it, set permissions, copied the install folder over, ran the install script, etc. Same results when trying to start and instance.

@flowforge/flowforge-localfs@1.7.1 /opt/flowforge/app  
└─┬ @flowforge/flowforge@1.7.1  
└─┬ @flowforge/localfs@1.7.0  
└── @flowforge/nr-launcher@1.7.0

projects]$ ls -lsh  
total 0  
0 drwxrwxr-x 3 ec2-user ec2-user 61 May 26 01:15

[2023-05-26T01:30:58.334Z] INFO: Starting project d6dea67c-f3b0-465b-b693-b9db4fc62d55 on port 12080  
[2023-05-26T01:30:58.474Z] INFO: Set FORGE\_NR\_PATH to /opt/flowforge/var/stacks/3.0.2  
[2023-05-26T01:30:59.230Z] INFO: AUDIT: event: stopped, type: project, id: d6dea67c-f3b0-465b-b693-b9db4fc62d55  
[2023-05-26T01:31:53.603Z] INFO: AUDIT: event: project.started, type: project, id: d6dea67c-f3b0-465b-b693-b9db4fc62d55  
[2023-05-26T01:31:54.110Z] INFO: AUDIT: event: stopped, type: project, id: d6dea67c-f3b0-465b-b693-b9db4fc62d55

The settings.js file gets created and saved once I change a setting in the UI for the instance. I didn't see it initally in the projects folder and thought maybe that was something. Permissions are all consistent.

I will look at that launcher code some and see if there is anything I can think of to try on my end to continue chasing this down.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [25 July 2023 01:43 UTC](https://discourse.nodered.org/t/flowforge-error-loading-settings-file/78674/13 "2023-07-25T01:43:59Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
