出现“错误:检测到循环依赖性”并带有3个漏洞

时间:2019-01-12 17:12:45

标签: node.js mongoose

尝试将成员添加到MongoDB上的数组时出现以下错误:

// trying to connect to = \\host\foldera\folderb\folderc
// tried format = smb://host/foldera/folderb/folderc/

SMBClient client = new SMBClient();

String userName = "userA";
String password = "APassword";
String domain = "ABC_DOMAIN";
String serverName = "smb://host";
String shareName = "/foldera/";
String folderName = "/folderb/folderc";

try (Connection connection = client.connect(serverName)) {
    AuthenticationContext ac = new AuthenticationContext(userName, password.toCharArray(), domain);
    Session session = connection.authenticate(ac);

    // Connect to Share
    try (DiskShare share = (DiskShare) session.connectShare(shareName)) {
        for (FileIdBothDirectoryInformation f : share.list(folderName", "*.TXT")) {
            System.out.println("File : " + f.getFileName());
        }
    }
}

代码如下:

// trying to connect to = "\\MyHost\MyShareName\FolderA\FolderB"

SMBClient client = new SMBClient();

String userName = "userA";
String password = "APassword";
String domain = "ABC_DOMAIN";
String serverName = "MyHost";
String shareName = "MyShareName";
String folderName = "FolderA\FolderB";

try (Connection connection = client.connect(serverName)) {
    AuthenticationContext ac = new AuthenticationContext(userName, password.toCharArray(), domain);
    Session session = connection.authenticate(ac);

    // Connect to Share
    try (DiskShare share = (DiskShare) session.connectShare(shareName)) {
        for (FileIdBothDirectoryInformation f : share.list(folderName", "*.TXT")) {
            System.out.println("File : " + f.getFileName());
        }
    }
}

这里有人曾遇到过此问题吗?我已经更新到最新版本的猫鼬。但是我确实注意到的一件事是,在执行(node:13208) UnhandledPromiseRejectionWarning: Error: cyclic dependency detected at serializeObject (C:\Users\alfie\Desktop\Discord Bot\node_modules\bson\lib\bson\parser\serializer.js:334:34) at serializeInto (C:\Users\alfie\Desktop\Discord Bot\node_modules\bson\lib\bson\parser\serializer.js:938:17) at serializeObject (C:\Users\alfie\Desktop\Discord Bot\node_modules\bson\lib\bson\parser\serializer.js:348:18) at serializeInto (C:\Users\alfie\Desktop\Discord Bot\node_modules\bson\lib\bson\parser\serializer.js:836:17) at serializeObject (C:\Users\alfie\Desktop\Discord Bot\node_modules\bson\lib\bson\parser\serializer.js:348:18) at serializeInto (C:\Users\alfie\Desktop\Discord Bot\node_modules\bson\lib\bson\parser\serializer.js:938:17) at serializeObject (C:\Users\alfie\Desktop\Discord Bot\node_modules\bson\lib\bson\parser\serializer.js:348:18) at serializeInto (C:\Users\alfie\Desktop\Discord Bot\node_modules\bson\lib\bson\parser\serializer.js:938:17) at serializeObject (C:\Users\alfie\Desktop\Discord Bot\node_modules\bson\lib\bson\parser\serializer.js:348:18) at serializeInto (C:\Users\alfie\Desktop\Discord Bot\node_modules\bson\lib\bson\parser\serializer.js:938:17) at serializeObject (C:\Users\alfie\Desktop\Discord Bot\node_modules\bson\lib\bson\parser\serializer.js:348:18) at serializeInto (C:\Users\alfie\Desktop\Discord Bot\node_modules\bson\lib\bson\parser\serializer.js:938:17) at serializeObject (C:\Users\alfie\Desktop\Discord Bot\node_modules\bson\lib\bson\parser\serializer.js:348:18) at serializeInto (C:\Users\alfie\Desktop\Discord Bot\node_modules\bson\lib\bson\parser\serializer.js:938:17) at BSON.serialize (C:\Users\alfie\Desktop\Discord Bot\node_modules\bson\lib\bson\bson.js:63:28) at Query.toBin (C:\Users\alfie\Desktop\Discord Bot\node_modules\mongodb-core\lib\connection\commands.js:146:25) 时,它发现了3个我无法修复的漏洞:

Screenshot with console

0 个答案:

没有答案