SAP / node-rfc

Asynchronous, non-blocking SAP NW RFC SDK bindings for Node.js
Apache License 2.0
249 stars 73 forks source link

device or resource busy #327

Open jcollineswitio opened 1 month ago

jcollineswitio commented 1 month ago

Describe the bug A clear and concise description of what the bug is. When chaining call I get error message Error: device or resource busy: device or resource busy {stack: 'Error: device or resource busy: device or resource busy', message: 'device or resource busy: device or resource busy'} To Reproduce Describe how the node-rfc is installed, like locally or globally and using npm install or build from source. Local Installation using npm install version 3.3.1 Describe steps to reproduce the behavior, including the test script. Execute node index.js content of the script: `const noderfc = require("node-rfc");

const client = new noderfc.Client({ dest: "DH4" });

(async () => { try {

    await client.open();

    let select = {
        WITH_USERNAME: 'X'
    }

    const users = await client.call("BAPI_USER_GETLIST", select);
    users.USERLIST.forEach(async user => {
        select = {
            USERNAME: user.USERNAME
        }
        try {
            let userDetails = await client.call("BAPI_USER_GET_DETAIL", select);

            console.log(user.USERNAME, userDetails);
        } catch (err) {
            console.log(err);
        }
    });

} catch (err) {

    console.error(err);
}

})(); ` Environment { platform: { name: 'win32', arch: 'x64', release: '10.0.22631' }, env: { SAPNWRFC_HOME: 'C:\nwrfcsdk', RFC_INI: '', nwrfcsdk_lib_on_path: true }, versions: { node: '21.1.0', acorn: '8.10.0', ada: '2.7.2', ares: '1.20.1', base64: '0.5.0', brotli: '1.0.9', cjs_module_lexer: '1.2.2', cldr: '43.1', icu: '73.2', llhttp: '9.1.2', modules: '120', napi: '9', nghttp2: '1.57.0', nghttp3: '0.7.0', ngtcp2: '0.8.1', openssl: '3.0.10+quic', simdutf: '3.2.18', tz: '2023c', undici: '5.26.4', unicode: '15.0', uv: '1.46.0', uvwasi: '0.0.19', v8: '11.8.172.15-node.14', zlib: '1.2.13.1-motley' }, noderfc: { version: '3.3.1', nwrfcsdk: { major: 7, minor: 53, patchLevel: 1116 } } }

Additional context communication with S/4HANA System