Unable to import from json files

Jack Q Chen shared this problem 3 years ago
Cannot Reproduce

I got an error message when i import a json file data(size:1.1M),capture as follow:

f4f8ad1f175a92c07ebbffadfc0c9de3

do i need to change some parameter or settings?

Thanks a lot.

Comments (5)

photo
1

Could you please give me a sample JSON file to recall the issue?

photo
1

1. Open nosqlbooster4mongo-5.1.4.AppImage

2. File -> Import from json files...

No action performed! I'm unable to load my connections from json file


Log from terminal


./nosqlbooster4mongo-5.1.4.AppImage 
{ userDataDir: '/home/michael/.config/NoSQLBooster for MongoDB',
  oldUserDataDir: '/home/michael/.config/mongobooster' }
{ hasAppJson: true }
Checking for update
Update for version 5.1.4 is not available (latest version: 5.1.1, downgrade is disallowed).
checkForUpdatesAndNotify called, downloadPromise is null

photo
1

Of course!

[
  {
    "name": "example",
    "uri": {
      "hosts": [
        {
          "host": "example.com",
          "port": 12345
        }
      ],
      "options": {
        "appName": "michael",
        "authSource": "admin",
        "readPreference": "secondary",
        "ssl": true
      },
      "password": "passw",
      "scheme": "mongodb",
      "username": "michael"
    },
    "colorFlag": 3,
    "authMode": 1,
    "connectionType": "replica",
    "certRelated": {}
  },
  {
    "name": "example",
    "uri": {
      "hosts": [
        {
          "host": "example.com",
          "port": 12345
        },
        {
          "host": "example.com",
          "port": 12345
        },
        {
          "host": "example.com",
          "port": 12345
        }
      ],
      "options": {
        "appName": "michael",
        "authSource": "admin",
        "readPreference": "secondary",
        "ssl": true
      },
      "password": "passw",
      "scheme": "mongodb",
      "username": "michael"
    },
    "colorFlag": 3,
    "authMode": 1,
    "connectionType": "replica",
    "certRelated": {}
  },
  {
    "name": "example",
    "uri": {
      "hosts": [
        {
          "host": "example.com",
          "port": 12345
        }
      ],
      "options": {
        "appName": "michael",
        "authSource": "admin",
        "ssl": true
      },
      "password": "passw",
      "scheme": "mongodb",
      "username": "michael"
    },
    "colorFlag": 3,
    "authMode": 1,
    "connectionType": "direct",
    "certRelated": {}
  },
   {
    "name": "example",
    "uri": {
      "hosts": [
        {
          "host": "example.com",
          "port": 12345
        },
        {
          "host": "example.com",
          "port": 12345
        }
      ],
      "options": {
        "readPreference": "secondary",
        "replicaSet": "RepSet",
        "ssl": true,
        "appName": "michael",
        "authSource": "admin"
      },
      "password": "passw",
      "scheme": "mongodb",
      "username": "michael"
    },
    "colorFlag": 4,
    "authMode": 1,
    "connectionType": "replica",
    "certRelated": {}
  },
  {
    "name": "example",
    "uri": {
      "hosts": [
        {
          "host": "example.com",
          "port": 12345
        }
      ],
      "options": {
        "appName": "michael",
        "authSource": "admin",
        "ssl": true
      },
      "password": "passw",
      "scheme": "mongodb",
      "username": "michael"
    },
    "colorFlag": 5,
    "authMode": 1,
    "connectionType": "direct",
    "certRelated": {}
  },
  {
    "name": "example",
    "uri": {
      "hosts": [
        {
          "host": "example.com",
          "port": 12345
        },
        {
          "host": "example.com",
          "port": 12345
        }
      ],
      "options": {
        "appName": "michael",
        "authSource": "admin",
        "readPreference": "primary",
        "ssl": true
      },
      "password": "passw",
      "scheme": "mongodb",
      "username": "michael"
    },
    "colorFlag": 5,
    "authMode": 1,
    "connectionType": "replica",
    "certRelated": {}
  },
  {
    "name": "example",
    "uri": {
      "hosts": [
        {
          "host": "example.com",
          "port": 12345
        }
      ],
      "options": {
        "appName": "michael",
        "authSource": "admin",
        "ssl": true
      },
      "password": "passw",
      "scheme": "mongodb",
      "username": "michael"
    },
    "colorFlag": 5,
    "authMode": 1,
    "connectionType": "direct",
    "certRelated": {}
  },
  {
    "name": "example",
    "uri": {
      "hosts": [
        {
          "host": "example.com",
          "port": 12345
        }
      ],
      "options": {
        "appName": "michael",
        "authSource": "admin",
        "ssl": true
      },
      "password": "passw",
      "scheme": "mongodb",
      "username": "michael"
    },
    "colorFlag": 5,
    "authMode": 1,
    "connectionType": "direct",
    "certRelated": {}
  },
  {
    "name": "example",
    "uri": {
      "hosts": [
        {
          "host": "example.com",
          "port": 12345,
          "role": "primary"
        },
        {
          "host": "example.com",
          "port": 12345,
          "role": "secondary"
        },
        {
          "host": "example.com",
          "port": 12345,
          "role": "secondary"
        }
      ],
      "options": {
        "appName": "michael",
        "authSource": "admin",
        "readPreference": "secondary",
        "replicaSet": "RepSet",
        "ssl": true
      },
      "password": "passw",
      "scheme": "mongodb",
      "username": "michael"
    },
    "colorFlag": 3,
    "authMode": 1,
    "connectionType": "replica",
    "certRelated": {}
  }
]

photo
1

I tried your sample JSON. It works well. And, In order to import JSON, you need to open the target connection first.

/732fb4bbe898d52ac40ab4a4fced9252

There is indeed a defect here. We should add a little defense code when you click "import...". This should pop up the following error message. 'No active connection available, use "Connect" button to create one.

photo
photo
1

Can you tell me if you fixed this problem?

I have the same problem now. Thanks a lot!

photo
1

No, I can not reproduce the problem. Could you please give me a sample JSON file to recall the issue?

photo
1

When you open the app select File > import JSON > and watch it do nothing. There's no need to send a sample file because the functionality isn't working at all.


I'm using version 5.0.3 exe with W10

photo
1

I tried a few times, It works well with windows 10 and 5.0.3. I believe the problem is with the contents of the specific JSON file.

Could you please give me a sample JSON file and steps to recall the issue?