vscode-ibmi icon indicating copy to clipboard operation
vscode-ibmi copied to clipboard

All IBM i connections disappeared

Open JonFP opened this issue 1 year ago • 9 comments

Last week my settings json got corrupted somehow and as a result (and under guidance from Liam) I removed the offending item that was causing the json to be invalid. The file is now valid json. After the edit all was working.

Today I opened up VS code to do some work and all of my IBM i connections have disappeared.

settings.json is attached.

P.S. At one point last week just prior to the corruption issue, when I tried to view settings.json VS Code kept showing me an empty file. But the real file was there in the usual spot.


Context Version
Code for IBM i version 2.8.0
Visual Studio Code version 1.87.2
Operating System darwin_x64
Active extensions
[settings.json](https://github.com/codefori/vscode-ibmi/files/14747160/settings.json)

COBOL (cobol): 10.3.10
Code Coverage for IBM i (code-coverage-ibmi): 0.1.7
Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.4.0
Db2 for IBM i (vscode-db2i): 0.8.2
Emmet (emmet): 1.0.0
Error Lens (errorlens): 3.16.0
Git (git): 1.0.0
Git Base (git-base): 1.0.0
GitHub (github): 0.0.1
HTML CSS Support (vscode-html-css): 2.0.9
IBM i Notebooks (vscode-ibmi-notebooks): 0.0.6
Merge Conflict (merge-conflict): 1.0.0
Microsoft Edge Tools for VS Code (vscode-edge-devtools): 2.1.5
Node Debug Auto-attach (debug-auto-launch): 1.0.0
Overtype (overtype): 0.5.0
Prettier SQL VSCode (prettier-sql-vscode): 1.6.0
RPGLE (vscode-rpgle): 0.26.3
TODO Highlight (vscode-todo-highlight): 1.0.5
ftp-simple (ftp-simple): 0.7.6

Not connected 🔌 settings.json

JonFP avatar Mar 25 '24 17:03 JonFP

@JonFP What changes happen if you try and make a new connection?

worksofliam avatar Mar 25 '24 17:03 worksofliam

I hadn't dared try but here goes ...

OK - it connects just fine and adds the data to the settings.json (I had it open in the editor at the time). Connection works fine, I can add filters etc. BUT ...

As soon as I disconnect, the connection is not added to the list and I have to build a new one again. It did however add the config to the settings.json but not in the same place as the others.

Here's the relevant part of the file:

{
    "sshfs.configs": [
        {
            "host": "sidconf.idevcloud.com",
            "label": "SiD Conf SSH",
            "name": "sidconf",
            "username": "paris",
            "root": "/home/paris"
                   },
        {
            "host": "ideveloper",
            "name": "sid-p400",
            "root": "/www/partner400",
            "username": "paris",
            "privateKeyPath": "/Users/jonparis/.ssh/id_rsa"
        },
        {
            "name": "sidmainsite",
            "host": "ideveloper",
            "root": "/www/sidcss/htdocs",
            "privateKeyPath": "/Users/jonparis/.ssh/id_rsa"
        },
        {
            "name": "SIDMainWeb",
            "host": "ideveloper",
            "root": "/www/sidcss/htdocs",
            "username": "paris"
        },
        {
            "name": "jons_home_dir",
            "host": "ideveloper",
            "root": "/Home/Paris",
            "privateKeyPath": "/Users/jonparis/.ssh/id_rsa",
            "username": "paris"
        }
    ],
    "sshfs.configpaths": [],
    "editor.accessibilitySupport": "off",
    "code-for-ibmi.connections": [
        {
            "name": "Test",
            "host": "sidconf.idevcloud.com",
            "port": 22,
            "username": "paris"
        }
~~~
The new connection is called Test and is at the end in a new group.  The original connections are still at the top.

JonFP avatar Mar 25 '24 17:03 JonFP

@JonFP I believe there is some confusion here.

sshfs.configs is not used by Code for IBM i. That is used by another connection. We use code-for-ibmi.connections for the connections only. This might be why you see it 'appearing at the bottom'

worksofliam avatar Mar 25 '24 19:03 worksofliam

I don't have a "sshfs.configs" block. My connections are in "code-for-ibmi.connections" (as shown in Jon's excerpt above), with the actual nitty-gritty details in "code-for-ibmi.connectionSettings".

jkyeung avatar Mar 25 '24 19:03 jkyeung

@JonFP Since your setting.json show connections for me on Win 10, is this possibly something Mac related? Can the Mac cache files, or set sym-links, or something else? Know nothing about Macs...

SJLennon avatar Mar 25 '24 19:03 SJLennon

@JonFP maybe this has something to do with settings synchronization? You can check out the Sync Data using this command from the palette: image

Think in the Sync Activity panel, look out for a Settings change that may have erase your connections: image

You can click on settings.json to compare before and after sync: image

It's a least worth having a look at a sync that may have happened between yesterday and today 🤔

sebjulliand avatar Mar 25 '24 19:03 sebjulliand

Thanks @sebjulliand but that option does not appear for me. As far as I know I have never turned on sync and so all I see are these options: 2024-03-27_16-45-50

JonFP avatar Mar 27 '24 20:03 JonFP

Decided to give up and revert to a settings.json copy from 4 weeks ago. No difference - still no IBM i connections even though they are there in the file.

I really don't know what to try next - total reload and do everything over ??

JonFP avatar Mar 27 '24 21:03 JonFP

@JonFP Is it possible that you have some other extension that is now interfering? Maybe a long shot, but disable all other extensions and see if it makes any difference?

SJLennon avatar Mar 28 '24 14:03 SJLennon