f5devcentral / vscode-f5-chariot

Providing mobility from one tool to the other...
Apache License 2.0
8 stars 0 forks source link

conversion failing with - f5.chariot.convertAS3 failed with [TypeError: doc.getText is not a functio #7

Closed pmawan closed 2 years ago

pmawan commented 2 years ago

i am using F5 acc chariot 1.17 F5 toms version 16.1 - and when i try and convert a virtual server configuration i get the following error [2021-12-25T02:53:57.496Z] [ERROR]: f5.chariot.convertAS3 failed with [TypeError: doc.getText is not a function at getEditorText (c:\Users\awan_m.vscode\extensions\f5devcentral.vscode-f5-chariot-1.17.0\out\util.js:81:24) at c:\Users\awan_m.vscode\extensions\f5devcentral.vscode-f5-chariot-1.17.0\out\extension.js:73:51 at S._withProgress (c:\Users\awan_m\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:93:45568) at S.withProgress (c:\Users\awan_m\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:93:45322) at Object.withProgress (c:\Users\awan_m\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:104:30872) at c:\Users\awan_m.vscode\extensions\f5devcentral.vscode-f5-chariot-1.17.0\out\extension.js:69:38

pmawan commented 2 years ago

chariot_conversion

pmawan commented 2 years ago

error screenshot attached

DumpySquare commented 2 years ago

referencing https://github.com/f5devcentral/f5-automation-config-converter/issues/76

This seems to be an issue with the core command execution in vscode. The tests/functions were updated to pass the TextDocument object of the editor so the tests didn't have to wait/search for the newly opened editor (to show the converted doc). But by default, right click command execution gets the document URI, which was getting caught with no TextDocument from testing.

I added a bit more logic to filter the different scenarios.

just released v1.17.1 with the fix https://github.com/f5devcentral/vscode-f5-chariot/actions/runs/1624140301

Please confirm new version is working for you

pmawan commented 2 years ago

thanks for the update - i downloaded and installed it -- works great - Thanks