codefori / vscode-ibmi

🌍 IBM i development extension for VS Code
https://codefori.github.io/docs/#/
MIT License
283 stars 93 forks source link

Connect to IBM i: Cannot read property 'startsWith' of undefined #214

Closed JDubbTX closed 3 years ago

JDubbTX commented 3 years ago

VSCODE Version: 1.57.1 Code for IBM i Version: v0.6.1

I just installed this extension and when trying to connect to my IBM i am getting "Not connected to host! Cannot read property 'startsWith' of undefined"

I am able to SSH to the IBM i host which is at 7.4.
Also have SSH FS extension and it connects to the IBM i host just fine.

worksofliam commented 3 years ago

Weird.

Are you leaving any of the fields blank?

SJLennon commented 3 years ago

If you haven't resolved this, then you might want to post your settings.json file. You do have PASE installed? Option 33 (5770-SS1 - Portable Application Solutions Environment). @JDubbTX

JDubbTX commented 3 years ago

Not yet resolved. Only field blank is the Private Key field - is it required? Yes, PASE was installed somewhat recently and we have installed some OSS packages through YUM, etc. I changed extension of settings.json to .txt since github doesn't like .json attachments. settings.json.txt

JDubbTX commented 3 years ago

Does attempting to install this create libraries on the IBM i? Asking because in my large organization developers (such as myself) do not have authority to create libraries. I see in settings.json "tempLibrary": "ILEDITOR".. Any crtlib command would fail for me due to lack of authority. I've run into this as being an issue with RDi plugins before, so I want to make it known as an issue.

SJLennon commented 3 years ago

A work library is needed on the IBM i. I use PUB400.COM where users cannot create libraries so I have to specify one of my two allocated libraries for tempLibrary. Specify an existing library you have authority to and that should solve the issue. (This probably needs more highlighting in the help.) @JDubbTX

SJLennon commented 3 years ago

@JDubbTX I tried recreating your problem by removing all references to code-for-ibmi from my settings.json, then creating a new connection. It connected. Under the OUTPUT tab with Code for IBM i selected I can see it trying to CRTLIB ILEDITOR and failing and then checking if it exists. when I go into settings.json I see it has set "tempLibrary": "LENNONS1". LENNONS1 is the first library in my library list and also my current library on the IBM i. I suspect that it defaulted tempLibrary to my "currentLibrary": "LENNONS1", which it probably picked up from my user profile on the IBM i.

Here's a bit of my settings.json which you might want to compare to yours:

            "libraryList": [
                "LENNONS1",
                "LENNONS2",
                "QTEMP",
                "QGPL"
            ],
            "libraryListProfiles": [],
            "homeDirectory": "/home/LENNONS",
            "tempLibrary": "LENNONS1",
            "currentLibrary": "LENNONS1",
            "sourceFileCCSID": "*FILE",
            "enableSQL": false,
            "hideCompileErrors": []
        }

Looking at yours, it seems that you have only QGPL and QTEMP in your IBM i library list. You might want to manually change your settings.json to include a tempLibrary and currentLibrary of something other than QGPL or QTEMP. See if that helps.

FWIW: As I understand it, the temporary library is used for the output of DSPFD commands. However, if db2UTIL is installed, then SQL is used instead of DSPFD. You have "enableSQL": false, which disables SQL. Extension checks for a compatible version on startup. On PUB400 db2Util is installed but apparently not the version required by the extension. However, if I set "enableSQL": true it works. Search the help for db2Util. There is a github repository and install instructions (yum install db2util).

FWIW: The OUTPUT tab shows some debugging information for the developers: image

JDubbTX commented 3 years ago

db2util has not been installed yet on our system - still shows in the list of available.

So, there isn't a place for me to input a library name on the 'IBM i Login' screen. When I give the connection a name, and hit connect, it does add an entry to code-for-ibmi.connectionSettings, and I can then go in and change the "tempLibrary" to a library name that I do have authority to, as well as add it in the other lists of libraries. However, if I then choose "Connect to previous IBM i", I get an untitled box at the top of the window - putting the name of the connection in the box and hitting enter does nothing.

image

JDubbTX commented 3 years ago

The output does point to the ILEDITOR library name when enter a new connection: image

SJLennon commented 3 years ago

@JDubbTX Initially in the development I think the assumption on a new connection is that you would have CRTLIB authority and to to keep temporary files separate ILEDITOR library was the default. As development continued/improved allowance was made for not having CRTLIB authority and it was circumvented by using (I deduce from experimentation), the CURLIB from the user profile. I suspect you don't have a CURLIB set in your user profile, hence initial setup issues.

However, it now seems that you have a decent settings.json. Have you saved it and then restarted VS Code and it still doesn't work?

Connect to previous IBM i gives me this: image

And since I have only one connection defined it is asking for the password. (That fooled me a couple of times when I didn't read the screen.) Are you seeing a password prompt?

SJLennon commented 3 years ago

@JDubbTX
"db2util has not been installed yet on our system - still shows in the list of available." Extension improvements again. If it says available, but you don't see anything in the DATABASE BROWSER, then the extension has been clever and actually looked to see if it could find a db2Util on the system. (If you troll though the closed issues you will find quite a bit about db2Util and how it got to this stage.) That said, installing db2Util is a good thing. DATABASE BROWSER looks like this: image

JDubbTX commented 3 years ago

@JDubbTX "db2util has not been installed yet on our system - still shows in the list of available." Extension improvements again. If it says available, but you don't see anything in the DATABASE BROWSER, then the extension has been clever and actually looked to see if it could find a db2Util on the system. (If you troll though the closed issues you will find quite a bit about db2Util and how it got to this stage.) That said, installing db2Util is a good thing. DATABASE BROWSER looks like this: image

Sorry, I should have been more clear. db2util shows in the list of available (not installed) packages when I run 'yum list available' in a SSH terminal.

I will likely pursue getting db2util installed at a future date - we are just scratching the surface with OSS in our dev environment - which is used by dozens of devs and we adhere to strict seperation of duties. Due to regulations I can't install it myself until I come up with a justification and work with our change management team to run the commands to get it installed. We have traditionally been strictly RPG and COBOL and 2E in our organization, but I'm trying to get this going so that when I can present POC's of things like kafka and camel connections to the IBM i, it will be more familiar and accessible to the distributed devs in our organization.

JDubbTX commented 3 years ago

@JDubbTX Initially in the development I think the assumption on a new connection is that you would have CRTLIB authority and to to keep temporary files separate ILEDITOR library was the default. As development continued/improved allowance was made for not having CRTLIB authority and it was circumvented by using (I deduce from experimentation), the CURLIB from the user profile. I suspect you don't have a CURLIB set in your user profile, hence initial setup issues.

It is true - in our organization CURLIB is not set / was set to CRTDFT when developer profiles are created. I don't have authority or desire to change this setting on my own user profile - requires SECADM authority.

However, it now seems that you have a decent settings.json. Have you saved it and then restarted VS Code and it still doesn't work?

I have saved it and restarted. The same behavior persists.

And since I have only one connection defined it is asking for the password. (That fooled me a couple of times when I didn't read the screen.) Are you seeing a password prompt?

Its definitely not a password prompt.

SJLennon commented 3 years ago

@JDubbTX Well, I'm stumped. Probably have to wait for Liam (Barry) to get back from vacation.

Other thoughts:

/home/LENNONS: system "CRTLIB LENNONS2" { "code": 255, "signal": null, "stdout": "", "stderr": "CPD0032: Not authorized to command CRTLIB in library *LIBL.\nCPF0006: Errors occurred in command." }

/home/LENNONS: system "CHKOBJ OBJ(QSYS/LENNONS2) OBJTYPE(*LIB)" { "code": null, "signal": null, "stdout": "", "stderr": "" }

/home/LENNONS: ls -p /QOpenSys/pkgs/bin/ { "code": null, "signal": null, "stdout": "2to3\n2to3-3.6\n5250keys\n7z\n7za\n7zr\nR\nRscript\n[\npycache/\naclocal\naclocal-1.15\nacountry\nactivemq\nactivemq-admin\naddbuiltin\naddftinfo\nadig\nadjust-xcoff-header\nafmtodit\nahost\nalternatives\nanacron\nansible\nansible-config\nansible-connection\nansible-console\nansible-doc\nansible-galaxy\nansible-inventory\nansible-playbook\nansible-pull\nansible-test\nansible-vault\nant\nantRun\napplydeltaiso\napplydeltarpm\napropos\naria_chk\naria_dump_log\naria_ftdump\naria_pack\naria_read_log\nasn1Coding\nasn1Decoding\nasn1Parser\natob\nautoconf\nautoexpect\nautoheader\nautom4te\nautomake\nautomake-1.15\nautopoint\nautoreconf\nautoscan\nautossh\nautoupdate\nawk\nbaddbdir\nbase32\nbase64\nbasename\nbash\nbashbug\nbison\nbltest\nbottle.py\nbrotli\nbsdcat\nbsdcpio\nbsdtar\nbtoa\nbunzip2\nbzcat\nbzcmp\nbzdiff\nbzegrep\nbzfgrep\nbzgrep\nbzip2\nbzip2recover\nbzless\nbzmore\nc++\nc2ph\nc_rehash\ncal\ncaptoinfo\ncat\ncatman\ncc\nccache\nccmake\ncertcgi\ncertutil\nchcon\nchem\nchgrp\nchktest\nchmod\nchown\nchroot\nchroot_setup\nchsh\ncjpeg\ncksum\nclear\nclusterdb\ncmake\ncmp\ncmsutil\ncol\ncolcrt\ncolrm\ncolumn\ncombinedeltarpm\ncomm\nconflict\ncorelist\ncp\ncpack\ncpan\ncpio\ncpp\ncpp-6\ncpp-6.bin\ncreatedb\ncreaterepo\ncreateuser\ncrlutil\ncrmftest\ncrond\ncronnext\ncrontab\ncsplit\nctest\ncups-config\ncurl\ncurl-config\ncurve_keygen\ncut\ncwebp\ncxpm\ndate\ndb2util\ndb_archive\ndb_checkpoint\ndb_deadlock\ndb_dump\ndb_hotbackup\ndb_load\ndb_printlog\ndb_recover\ndb_sql\ndb_stat\ndb_upgrade\ndb_verify\ndbtest\ndd\ndebuginfo-install\nderdump\ndertimetest\ndf\ndiff\ndiff3\ndigest\ndir\ndircolors\ndirmngr\ndirmngr-client\ndirname\ndislocate\ndjpeg\ndltest\ndos2unix\ndropdb\ndropuser\ndrpmsync\ndu\ndumpsexp\ndvipdf\ndwebp\neasy_install-2.7\neasy_install-3.6\necho\necperf\necpg\negrep\nenc2xs\nencguess\nencodeinttest\nenv\nenvsubst\neps2eps\neqn\neqn2graph\nevent_rpcgen.py\nex\nexample\nexpand\nexpect\nexpr\nf2py3.6\nf95\nfactor\nfalse\nfax2ps\nfax2tiff\nfbectest\nfc-cache\nfc-cat\nfc-conflist\nfc-list\nfc-match\nfc-pattern\nfc-query\nfc-scan\nfc-validate\nfgrep\nfile\nfind\nfind-repos-of-install\nfipstest\nfix-rpath\nflex\nflex++\nfmt\nfold\nfragiso\nfunzip\ng++\ng++-6\ng++-6.bin\ngapplication\ngawk\ngcc\ngcc-6\ngcc-6.bin\ngcc-ar\ngcc-ar-6\ngcc-ar-6.bin\ngcc-nm\ngcc-nm-6\ngcc-nm-6.bin\ngcc-ranlib\ngcc-ranlib-6\ngcc-ranlib-6.bin\ngcov\ngcov-6\ngdb\ngdbm_dump\ngdbm_load\ngdbmtool\ngdbus\ngdbus-codegen\ngdiffmk\ngendiff\ngetopt\ngettext\ngettext.sh\ngettextize\ngfortran\ngfortran-6\ngfortran-6.bin\ngif2rgb\ngifbuild\ngifclrmp\ngifecho\ngiffix\ngifinto\ngiftext\ngiftool\ngio\ngio-querymodules\ngit\ngit-cvsserver\ngit-receive-pack\ngit-shell\ngit-upload-archive\ngit-upload-pack\nglib-compile-resources\nglib-compile-schemas\nglib-genmarshal\nglib-gettextize\nglib-mkenums\nglilypond\ngmake\ngobject-query\ngperf\ngperl\ngpg\ngpg-agent\ngpg-connect-agent\ngpg-error\ngpg-error-config\ngpg-wks-server\ngpgconf\ngpgparsemail\ngpgrt-config\ngpgscm\ngpgsm\ngpgtar\ngpgv\ngpinyin\ngrap2graph\ngrep\ngresource\ngrn\ngrodvi\ngroff\ngroffer\ngrog\ngrolbp\ngrolj4\ngropdf\ngrops\ngrotty\ngroups\ngs\ngsbj\ngsdj\ngsdj500\ngsed\ngsettings\ngslj\ngslp\ngsnd\ngtester\ngtester-report\ngunzip\ngzexe\ngzip\nh2ph\nh2xs\nhardlink\nhead\nhelp2man\nhexdump\nhmac256\nhostid\nhpftodit\nhttpserv\niconv\nid\nidle3\nidle3.6\nifnames\nigawk\nindxbib\ninfo\ninfocmp\ninfotocap\ninitdb\ninnochecksum\ninstall\ninstall-info\ninstmodsh\nipcmk\nisosize\nisql\niusql\njmacs\njoe\njoin\njpegtran\njpico\njq\njson_pp\njstar\nkbxutil\nkill\nksba-config\nless\nlessecho\nlesskey\nlexgrog\nlftp\nlftpget\nlibassuan-config\nlibgcrypt-config\nlibnetcfg\nlibpng-config\nlibpng16-config\nlibtool\nlibtoolize\nlink\nlistsuites\nlkbib\nln\nlocate\nlogname\nlook\nlookbib\nlp5250d\nlprsetup.sh\nls\nlua\nluac\nlzcat\nlzcmp\nlzdiff\nlzegrep\nlzfgrep\nlzgrep\nlzip\nlzless\nlzma\nlzmadec\nlzmainfo\nlzmore\nm4\nmac2unix\nmake\nmakedeltaiso\nmakedeltarpm\nmakeinfo\nmakepqg\nman\nman-recode\nmandb\nmangle\nmanpath\nmc\nmcdiff\nmcedit\nmcookie\nmcview\nmd5sum\nmergerepo\nmesg\nminigzip\nminisign\nmkdir\nmkfifo\nmknod\nmktemp\nmmroff\nmodifyrepo\nmodutil\nmpicalc\nmsgattrib\nmsgcat\nmsgcmp\nmsgcomm\nmsgconv\nmsgen\nmsgexec\nmsgfilter\nmsgfmt\nmsggrep\nmsginit\nmsgmerge\nmsgunfmt\nmsguniq\nmsql2mysql\nmultinit\nmv\nmvn\nmvnDebug\nmvnyjp\nmy_print_defaults\nmyisam_ftdump\nmyisamchk\nmyisamlog\nmyisampack\nmysql\nmysql_convert_table_format\nmysql_find_rows\nmysql_fix_extensions\nmysql_install_db\nmysql_plugin\nmysql_secure_installation\nmysql_setpermission\nmysql_tzinfo_to_sql\nmysql_upgrade\nmysql_waitpid\nmysqlaccess\nmysqladmin\nmysqlbinlog\nmysqlcheck\nmysqld\nmysqld_multi\nmysqld_safe\nmysqld_safe_helper\nmysqldump\nmysqldumpslow\nmysqlhotcopy\nmysqlimport\nmysqlshow\nmysqlslap\nmytop\nnamei\nnano\nncurses6-config\nncursesw6-config\nneeds-restarting\nneqn\nngettext\nnginx\nnice\nninja\nnl\nnode\nnodever\nnohup\nnologin\nnonspr10\nnpm\nnproc\nnpth-config\nnpx\nnroff\nnspr-config\nnss-config\nnumfmt\nocspclnt\nocspresp\nod\nodbc_config\nodbcinst\noid2name\noidcalc\nonig-config\nopenssl\np11-kit\np7content\np7env\np7sign\np7verify\npackage-cleanup\npal2rgb\npaste\npatch\npathchk\npcre-config\npcre2-config\npcre2grep\npcre2test\npcregrep\npcretest\npdf2dsc\npdf2ps\npdfmom\npdfroff\npdftexi2dvi\nperl\nperl5.24.1\nperlbug\nperldoc\nperlivp\nperlthanks\nperror\npf2afm\npfbtopfa\npfbtops\npg_archivecleanup\npg_basebackup\npg_checksums\npg_config\npg_controldata\npg_ctl\npg_dump\npg_dumpall\npg_isready\npg_receivewal\npg_recvlogical\npg_resetwal\npg_restore\npg_standby\npg_test_fsync\npg_test_timing\npg_upgrade\npg_waldump\npgbench\npic\npic2graph\npiconv\npigz\npinentry\npinentry-curses\npinky\npip2\npip2.7\npip3\npip3.6\npk11ectest\npk11gcmtest\npk11mode\npk12util\npk1sign\npkg-config\npkix-errcodes\npl2pm\npng-fix-itxt\npngfix\npod2html\npod2man\npod2texi\npod2text\npod2usage\npodchecker\npodselect\npost-grohtml\npostgres\npostmaster\npowerpc-ibm-os400-pkg-config\npp\npphs\nppm2tiff\npr\npre-grohtml\npreconv\nprintafm\nprintenv\nprintf\nprotoc\nprove\nps2ascii\nps2epsi\nps2pdf\nps2pdf12\nps2pdf13\nps2pdf14\nps2pdfwr\nps2ps\nps2ps2\npsql\npstruct\nptar\nptardiff\nptargrep\nptx\npv\npwd\npwdecrypt\npydoc\npydoc3\npydoc3.6\npython\npython2\npython2-config\npython2.7\npython2.7-config\npython3\npython3-config\npython3.6\npython3.6-config\npython3.6m\npython3.6m-config\npyvenv\npyvenv-3.6\nraw2tiff\nrdjpgcom\nreadlink\nrealpath\nrecode-sr-latin\nredis-benchmark\nredis-check-aof\nredis-check-rdb\nredis-cli\nredis-sentinel\nredis-server\nrefer\nreindexdb\nremtest\nrename\nrenice\nreplace\nrepo-graph\nrepo-rss\nrepoclosure\nrepodiff\nrepomanage\nrepoquery\nreposync\nrepotrack\nreset\nresolve_stack_dump\nresolveip\nrev\nrftp\nrjoe\nrm\nrmdir\nrnano\nroff2dvi\nroff2html\nroff2pdf\nroff2ps\nroff2text\nroff2x\nrpm\nrpm2archive\nrpm2cpio\nrpmargs\nrpmbuild\nrpmdb\nrpmdev-bumpspec\nrpmdev-checksig\nrpmdev-cksum\nrpmdev-diff\nrpmdev-extract\nrpmdev-md5\nrpmdev-packager\nrpmdev-rmdevelrpms\nrpmdev-setuptree\nrpmdev-sha1\nrpmdev-sha224\nrpmdev-sha256\nrpmdev-sha384\nrpmdev-sha512\nrpmdev-sort\nrpmdev-sum\nrpmdev-vercmp\nrpmdev-wipetree\nrpmdumpheader\nrpmfile\nrpmgraph\nrpmkeys\nrpmls\nrpmpeek\nrpmquery\nrpmsign\nrpmspec\nrpmverify\nrsaperf\nrsync\nrsync-ssl\nrun-parts\nrunant.py\nruncon\nruntest\nrview\nrvim\nscp\nscs2ascii\nscs2pdf\nscs2ps\nsdiff\nsdrtest\nsecmodtest\nsed\nselfserv\nseq\nsetsid\nsftp\nsha1sum\nsha224sum\nsha256sum\nsha384sum\nsha512sum\nshasum\nshlibsign\nshow-changed-rco\nshow-installed\nshred\nshuf\nsigntool\nsignver\nsleep\nslencheck\nslsh\nsmtpd.py\nsoelim\nsort\nspectool\nsplain\nsplit\nsqlite3\nsqlite3_analyzer\nssh\nssh-add\nssh-agent\nssh-copy-id\nssh-keygen\nssh-keyscan\nssltap\nstat\nstatic-to-shared\nstdbuf\nstrsclnt\nstty\nsum\nsvr4-shrlib\nsxpm\nsymkeyutil\nsync\ntabs\ntac\ntail\ntar\ntbl\ntclsh8.6\ntee\ntest\ntexi2any\ntexi2dvi\ntexi2pdf\ntexindex\ntfmtodit\ntic\ntiff2bw\ntiff2pdf\ntiff2ps\ntiff2rgba\ntiffcmp\ntiffcp\ntiffcrop\ntiffdither\ntiffdump\ntiffinfo\ntiffmedian\ntiffset\ntiffsplit\ntimed-read\ntimed-run\ntimeout\ntjbench\ntmux\ntn5250\ntoe\ntouch\ntput\ntr\ntree\ntroff\ntrue\ntruncate\ntrust\ntset\ntsort\ntstclnt\ntty\nuname\nunbuffer\nuncompress\nunexpand\nuniq\nunix-lpr.sh\nunix2dos\nunix2mac\nunlink\nunlzma\nunpigz\nunxz\nunzip\nunzipsfx\nunzstd\nupdate-alternatives\nupdate-ca-certificates\nupdatedb\nuptime\nurlgrabber\nusers\nuuidgen\nuuidparse\nvacuumdb\nvacuumlo\nvdir\nverifytree\nvfychain\nvfyserv\nview\nvim\nvimdiff\nvimtutor\nwatchgnupg\nwc\nwget\nwhatis\nwheel\nwhereis\nwho\nwhoami\nwish8.6\nwrjpgcom\nxargs\nxgettext\nxml2-config\nxmlcatalog\nxmllint\nxmlservice-cli\nxmlwf\nxslt-config\nxsltproc\nxsubpp\nxt5250\nxxd\nxz\nxzcat\nxzcmp\nxzdec\nxzdiff\nxzegrep\nxzfgrep\nxzgrep\nxzless\nxzmore\nyacc\nyat2m\nyes\nyum\nyum-builddep\nyum-config-manager\nyum-debug-dump\nyum-debug-restore\nyum-groups-manager\nyumdownloader\nzcat\nzcmp\nzdiff\nzegrep\nzfgrep\nzforce\nzgrep\nzip\nzipcloak\nzipcmp\nzipdetails\nzipgrep\nzipinfo\nzipmerge\nzipnote\nzipsplit\nziptool\nzless\nzmore\nznew\nzstd\nzstdcat\nzstdgrep\nzstdless\nzstdmt", "stderr": "" }

/home/LENNONS: DB2UTIL_JSON_CONTAINER=array /QOpenSys/pkgs/bin/db2util -o json "SELECT * FROM QSYS2.ASP_INFO" { "code": null, "signal": null, "stdout": "[\n{\"DEVICE_DESCRIPTION_NAME\":\"null\",\"ASP_NUMBER\":1,\"ASP_STATE\":\"NONE\",\"ASP_TYPE\":\"SYSTEM\",\"RDB_NAME\":\"PUB400\",\"NUMBER_OF_DISK_UNITS\":8,\"DISK_UNITS_PRESENT\":\"ALL\",\"TOTAL_CAPACITY\":801728,\"TOTAL_CAPACITY_AVAILABLE\":374196,\"PROTECTED_CAPACITY\":0,\"PROTECTED_CAPACITY_AVAILABLE\":0,\"UNPROTECTED_CAPACITY\":801728,\"UNPROTECTED_CAPACITY_AVAILABLE\":374196,\"SYSTEM_STORAGE\":361,\"OVERFLOW_STORAGE\":0,\"STORAGE_THRESHOLD_PERCENTAGE\":90,\"OVERFLOW_RECOVERY_RESULT\":\"SUCCESS\",\"ERROR_LOG_SPACE\":2,\"MACHINE_LOG_SPACE\":1288,\"MACHINE_TRACE_SPACE\":1,\"MAIN_STORAGE_DUMP_SPACE\":1620,\"MICROCODE_SPACE\":6295,\"END_IMMEDIATE\":\"YES\",\"COMPRESSION_RECOVERY_POLICY\":\"OVERFLOW DELAY\",\"COMPRESSED_DISK_UNITS\":\"NONE\",\"CHANGES_WRITTEN_TO_DISK\":\"YES\",\"MULTIPLE_CONNECTION_DISK_UNITS\":\"NO\",\"BALANCE_STATUS\":\"COMPLETE\",\"BALANCE_TYPE\":\"NONE\",\"BALANCE_DATA_MOVED\":null,\"BALANCE_DATA_REMAINING\":null,\"BALANCE_TIMESTAMP\":\"null\",\"TRACE_STATUS\":\"NONE\",\"TRACE_DURATION\":null,\"TRACE_TIMESTAMP\":\"null\",\"RESOURCE_NAME\":\"null\",\"PRIMARY_ASP_RESOURCE_NAME\":\"null\"}\n]", "stderr": "" }

JDubbTX commented 3 years ago

@JDubbTX Well, I'm stumped. Probably have to wait for Liam (Barry) to get back from vacation.

Other thoughts:

  • Your machine isn't running CCSID 65535 is it? (Don't know if this makes any difference but it has turned up in some other issues.)

Yes, my machine has 65535 for QCCSID sysvalue.

  • Consider deleting all code-for-ibmi.* sections from your settings.json and start again. I'd been experimenting with more than one connection and eventually managed to mess up/duplicate some code-for-ibmi stuff. (You may not be as clumbsy as I am.)
  • And maybe after trying to connect you might want to post (or review) the contents of the OUTPUT tab to see where it stops/how far it gets. After a successful connect, mine looks like this (some of the lines are quite long):

I actually did that before my post 3 days ago, and posted the output.  My OUTPUT tab contents are much less verbose.  Either it is stopping early in the process, or there is a setting somewhere I need to change to make it more verbose.  

Here it is again for continuity:
image

SJLennon commented 3 years ago

@JDubbTX Been trolling through the extension code, though I'm not a Javascript expert. It appears that the current library cannot start with a "Q" , which precludes QTEMP and QGPL. (Though I'm not clear how this stops the connection from proceeding.) I said:

Looking at yours, it seems that you have only QGPL and QTEMP in your IBM i library list. You might want to manually change your settings.json to include a tempLibrary and currentLibrary of something other than QGPL or QTEMP. See if that helps.

Have you tried this?

JDubbTX commented 3 years ago

Yes I tried that.

I noticed that there are code-for-ibmi.connections as well as code-for-ibmi.connectionSettings in the setting.json.

please provide example of code-for-ibmi.connections, as this is empty in my settings.json and I think this might be why nothing happens when I click 'connect to previous IBM i'.

worksofliam commented 3 years ago

@JDubbTX

as this is empty in my settings.json and I think this might be why nothing happens when I click 'connect to previous IBM i'.

That is correct. We should likely add a handler for this.

Does attempting to install this create libraries on the IBM i?

Yes, but will fall back and use your current library if it fails. You can override this, as you saw in the JSON.

Last note is that a list of connections and connection settings remain separate, which is why you see the settings for it, but not the system show you try to use the 'Connect to previous' option/

I am back from vacation and will be taking a look at this issue over the weekend.

worksofliam commented 3 years ago

@JDubbTX Please share the entire connection log after you try to connect to a new system.

JDubbTX commented 3 years ago

Update - I found an example in another post of code-for-ibmi.connections. I copied it in to my settings.json file and modified it to match my connection, and it now connects.

I think the root of this is that something was preventing the information being added to code-for-ibmi.connections. I was never able to successfully connect the first time due to some issue (current library, or something else). Failed connections would add entries to code-for-ibmi.connectionSettings, but not ibmi.connections.

worksofliam commented 3 years ago

Thanks for the update @JDubbTX - I will look into the issue with setting the tempLibrary and report back here.

It's likely, as @SJLennon noted, that the current library is not getting set property and then the code errors on this line as your issue noted. I will get this fixed up.

SJLennon commented 3 years ago

FWIW: From what I can tell, this user has an unusual setup.:

You can't default the tempLibrary to QTEMP so the only library left is QGPL and I'm not sure using that is a good idea. Maybe you need to prompt for the temporary library in situations where you can't find a default.

@worksofliam

worksofliam commented 3 years ago

@SJLennon a great suggestion. I am going to work on this tonight.

worksofliam commented 3 years ago

@JDubbTX I pushed 0.6.2 which adds warnings and notices that the user needs to set the tempLibrary if it couldn't during the connect stage.

JDubbTX commented 3 years ago

OK, I am testing this by making a backup of my working settings.json, then deleted out all of code-for-ibmi-connections. Now I'm getting this: image and this has been added to code-for-ibmi-connections: image The connection was succesful and upon clicking the button to change the temp-library setting to something I can work with on my system, everything appears to be working correctly. THANKS!

worksofliam commented 3 years ago

@JDubbTX that is awesome.

Thanks for your help in raising this issue!