Uploaded image for project: 'Couchbase node.js Client Library'
  1. Couchbase node.js Client Library
  2. JSCBC-968

Segmentation fault (core dumped) - nodejs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • 3.2.3
    • library
    • 1
    • Critical

    Description

      Issue:

      Received below error and node express app crashed.

      Segmentation fault (core dumped)

       

      While checking scope name getting above error. 

       
       

      let uri = `couchbase://${connConfig.endPoint}/${connConfig.bucket}${advConnString}`                //console.log(uri)                
      const cbCluster = await couchbase.connect(uri, 
      { username: connConfig.user, password: connConfig.password });  
       
      const cbBucket = await cbCluster.bucket(connConfig.bucket); 
      const cbScopes = await cbBucket.collections().getAllScopes();
      let outputMessage = "Scope Name not present !"
                      
      for (let i = 0; i < cbScopes.length; i++) {
          if (connConfig.scopeName === cbScopes[i].name.trim()) { 
               outputMessage = "Success";                        
               break;                    
          }                
      }
       
      console.log(outputMessage)

       
       

      and while traversing collections also getting same error.

       

       

      const tablesList = []
      const couchbaseUri = `couchbase://${connConfig.endPoint}/${connConfig.bucket}${advConnString}`            
      //console.log(couchbaseUri)            
      const cbCluster = await couchbase.connect(couchbaseUri, 
         { username: connConfig.user, password: connConfig.password });            
       
      const cbBucket = await cbCluster.bucket(connConfig.bucket);            
      const cbScopes = await cbBucket.collections().getAllScopes();
       
      for (let i = 0; i < cbScopes.length; i++) {                
          if (connConfig.scopeName === cbScopes[i].name.trim()) {
               cbScopes[i].collections.forEach((table, idx) => {
                   let cbEntry = {}
                   cbEntry['collectionName'] = table.name;                        
                   cbEntry['id'] = idx + 1;                        
                   tablesList.push(cbEntry)                    
               })                    
               break;                
           }            
      } 
      console.log(tablesList)

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            brett19 Brett Lawson
            bruce Bruce Lee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty