Skip to main content
Announcements
Happy New Year! Cheers to another year of collaboration, connections and success.
cancel
Showing results for 
Search instead for 
Did you mean: 
TcnCunha_M
Creator III
Creator III

Socket closed

Hi I have this code:

import { auth, qix, users, items } from "@qlik/api";
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';

const appId = "XXXXXX";

(async () => {
  auth.setDefaultHostConfig({
    host: "XXXXXXXXXXXXXXXXXXx.eu.qlikcloud.com",
    authType: "oauth2",
    clientId: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    clientSecret: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    scope: "user_default admin.apps admin_classic",
  });

  const app = await qix.openAppSession(appId).getDoc();
  const sheets = await app.getSheetList();
  for(let sheet of sheets) {
    console.log(sheet.qMeta.title, sheet.qMeta.privileges, `Current publish status is:${sheet.qMeta.published}`);
  }
  process.exit();
})();
 
and now getting this error: 

return new EnigmaError(name, code, original);
^

EnigmaError: Socket closed


could someone give me some help what I did it wrong? I get this sample of Qlik dev portal

As you think, so shall you become.
Labels (3)
1 Solution

Accepted Solutions
TcnCunha_M
Creator III
Creator III
Author

Ok i find what was the issue

Someone Publish my Auth0 authentication and  the user so i was not able to use anymore, when create a new user still the auth0 user created remains in the user in QMC , after delete the user, work.

As you think, so shall you become.

View solution in original post

1 Reply
TcnCunha_M
Creator III
Creator III
Author

Ok i find what was the issue

Someone Publish my Auth0 authentication and  the user so i was not able to use anymore, when create a new user still the auth0 user created remains in the user in QMC , after delete the user, work.

As you think, so shall you become.