Getting " SES failed to lockdown, Node.js domains have been initialized (SES_NO_DOMAINS)" error after update to 4th version.



  • The title.
    After updating to the recent version from the 3rd, it started throwing this error on JSr initialization. The code is below (node, express)

        jsr = jsreport({
    		store: {
    			provider: 'fs'
    		},
    		blobStorage: {
    			provider: 'fs'
    		},
    		extensions: {
    			express: { app, server },
    			'version-control': { enabled: false },
    			'fs-store': {
    				dataDirectory: JSREPORT_STORE_PATH
    			}
    		},
    		appPath: '/reporting',
    		mountOnAppPath: true,
    		allowLocalFilesAccess: false
    	})


  • The jsreport v4 uses a different user code sandboxing strategy. The change was required because the v3 sandboxing has critical vulnerabilities. Read the full story here https://jsreport.net/blog/jsreport-400-release

    The v4 sandboxing strategy brings also some limitations as the tradeoff to the safe code evaluation. One of the limitations is the one you have hit - you can't use deprecated nodejs domains.

    What to do now...
    You can avoid using nodejs domains if it's possible.
    Consider if you need to use the safe code sandbox evaluation. Safe sandboxing is required only in case you run reports developed by external users. If you don't need to use sandboxing, simply disable it with config "trustUserCode:true".


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.