Code Monkey home page Code Monkey logo

existdb-langserver's Issues

Sync error: exit code 1

I've been trying to set up a connection to my eXist-db instance, but receive the following terminal message when I try to run the sync task:

 *  Executing task: node /Users/Joshua/.vscode/extensions/exist-db.existdb-vscode-1.7.2/sync/dist/sync.js -s http://localhost:8080/exist -u admin -p  -c /db/apps/my-app "/Users/Joshua/Documents/digital-anon" -i ".existdb.json" ".git/**" "node_modules/**" "bower_components/**" 

/Users/Joshua/.vscode/extensions/exist-db.existdb-vscode-1.7.2/sync/dist/sync.js:3
(()=>{var e={5862:e=>{var t=1e3,i=60*t,a=60*i,n=24*a;function s(e,t,i,a){var n=t>=1.5*i;return Math.round(e/i)+" "+a+(n?"s":"")}e.exports=function(e,o){o=o||{};var r,c,p=typeof e;if("string"===p&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(s){var o=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*n;case"hours":case"hour":case"hrs":case"hr":case"h":return o*a;case"minutes":case"minute":case"mins":case"min":case"m":return o*i;case"seconds":case"second":case"secs":case"sec":case"s":return o*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(e);if("number"===p&&isFin

SyntaxError: Unexpected token ...
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:533:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3

 *  The terminal process "/bin/zsh '-c', 'node /Users/Joshua/.vscode/extensions/exist-db.existdb-vscode-1.7.2/sync/dist/sync.js -s http://localhost:8080/exist -u admin -p  -c /db/apps/my-app "/Users/Joshua/Documents/digital-anon" -i ".existdb.json" ".git/**" "node_modules/**" "bower_components/**"'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Can you give me any insight into what might be causing this?

Thanks,
Joshua

only syncing / uploading files in app root directory

If I make a change to a file in the app root collection, the changes are synced
If I make a change to say /modules/app.xql, the changes do not sync

  • eXist-db 4.7.1
  • Microsoft Windows 10
  • Visual Studio Code - running in WSL environment
  • existdb-vscode tasks seem to run no problem
  • .existdb.json file in root of workspace
{
    "servers": {
        "localhost": {
            "server": "http://localhost:8080/exist",
            "user": "admin",
            "password": "",
            "root": "/db/apps/my-app"    
        }
    },
    "sync": {
        "server": "localhost",
        "ignore": [
            ".existdb.json",
            ".git/**"
        ]
    }
}

Extension requires IPv6?

I have been trying to get syncing set up with an instance on Kubernetes. It doesn't work, while I can sync with a local docker deployment. The error

Query failed: Error: connect ETIMEDOUT xxxx:xxxx:0:xxxx::2:80
Communication with the server failed. Either it is not running or the helper package was not installed. Giving up.

seems to indicate that the connection over IPv6 doesn't work (as I said: The helper package has been installed and I have been able to get syncing work). This could more be an issue with kubernetes not supporting IPv6 than an issue with the extension. Still I am looking for a workaround.

Is it true that the extension only works with IPv6 - or is there a way to make it use IPv4?

existdb-sync task breaks if workspace path contains a space

When testing the vscode extension, I noticed that the existdb-sync task would fail if the path to the workspace contains a space.

The error:

Executing task in folder air table: node /Users/joe/.vscode/extensions/exist-db.existdb-vscode-1.0.2/sync/dist/sync.js -s http://localhost:8080/exist -u admin -p -c /db/apps/airtable /Users/joe/Downloads/air table -i ".existdb.json" ".git/" "node_modules/" "bower_components/**" <

directory /Users/joe/Downloads/air not found
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.

The path in question is /Users/joe/Downloads/air table.

If I wrap the path in quotes or escape the space (e.g., "/Users/joe/Downloads/air table" or /Users/joe/Downloads/air\ table) and run the command again, it succeeds. However, I can't figure out how to get vscode to add quotes or escape the space.

Could anyone suggest a method that might work? I think the relevant code is here:

const argv = yargs.options({
s: { alias: 'server', type: 'string', default: 'http://localhost:8080/exist' },
u: { alias: 'user', type: 'string', default: 'admin' },
p: { alias: 'password', type: 'string', default: '' },
c: { alias: 'collection', type: 'string', demandOption: true },
i: { alias: 'ignore', type: 'string', array: true, default: [] }
}).argv;
if (argv._.length == 0) {
console.log('please specify a directory to watch');
process.exit(1);
}
const dir = path.resolve(argv._[0]);
if (!fs.existsSync(dir)) {
console.log(`directory ${argv._[0]} not found`);
process.exit(1);
}

Onboarding quirk

When installing doing a fresh install of extension in VS-Code it only triggers the connection to exist-db after opening an xquery file. If doesn't matter if everything is configured properly many times over. It makes it look like the extension isn't working properly. So either we should put something on the readme, or make sure that the connection can be triggered even when its not an xquery file on wishes to work upon.

couldn't connect to exist-db from VsCode

hi,

Unable to connect to db from Visual studio code. I can't the db icons in status bar. My workspace configuration file .existdb.json contains

{
"servers": {
"localhost": {
"server": "http://localhost:8080/exist",
"user": "admin",
"password": "rama",
"root": "/apps/SrikoshNew"
}
}
}

please let me know what I am doing wrong.

Connect to server via https

I am trying to connect to a https server I use for development. The certificate is expired, but since the updating process is quite cumbersome, I got used to add an exception and get on with it. This works with oXygen XML and a browser. Now I am evaluating working with VS Code, but can't get the extension talk to the dev server because of the certificate issue.
Is there a way to make the extension ignore the exception and proceed with connecting?

Cannot read properties of undefined (reading 'sendRequest')

Can't for the life of me connect to the server. The error reported in the VSCode extension host log is:

2023-04-27 13:16:17.656 [error] TypeError: Cannot read properties of undefined (reading 'sendRequest') at /Users/anthony/.vscode/extensions/exist-db.existdb-vscode-1.7.2/client/dist/extension.js:1:266419 at m.h (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:98:125797) at m.$executeContributedCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:98:126701) at c.N (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:108:11655) at c.M (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:108:11373) at c.H (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:108:10454) at c.G (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:108:9432) at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:108:8220 at E.invoke (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:145) at h.deliver (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:2121) at n.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:1729) at p.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:72:14916) at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:124:16654 at E.invoke (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:145) at h.deliver (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:2121) at n.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:1729) at p.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:72:14916) at MessagePortMain.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:124:14780) at MessagePortMain.emit (node:events:526:28) at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:5:364) existdb.reconnect {"value":"eXist-db.existdb-vscode","c":"exist-db.existdb-vscode"}

Extension version is 1.7.2 and my server connection settings are standard out of the box settings:

{
"servers": {
"localhost": {
"server": "http://localhost:8080/exist",
"user": "admin",
"password": "exist",
"root": "/db/apps"
}
}
}

No existdb-sync tasks found

Hi,

I'm trying to set this extension up but can't seem to link to my existdb instance: when I try to run task I see existdb-sync in the task list but then when I click through, the command palette says No existdb-sync tasks found. Pressing the little sync status icon takes me to an empty command palette prompt with no suggestions. My .existdb.json config is as follows:

{
    "servers": {
        "localhost": {
            "server": "http://localhost:8080/exist",
            "user": "admin",
            "password": "",
            "root": "/db/apps/my-app"
        }
    },
    "sync": {
      "server": "localhost",
      "dir": ".",
      "polling": false,
      "interval": 100,
      "ignore": [
          ".existdb.json",
          ".git/**",
          "node_modules/**",
          "bower_components/**"
      ]
  }
}

It seems like I'm not connecting to my the instance correctly. I might be missing something very obvious here, and would appreciate your input.

Thanks,
Joshua

VSCode objects to "request:" namespace prefix

Following up on my posting of 2020-10-06 to exist-open:

When using eXist 5.3.0-SNAPSHOT 587dde5f72791201512956125d4d8d0f6cc0a319 20201002114117 inside VSCode, if I create an XQuery file that reads, in its entirety:

xquery version "3.1";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare option output:method "xhtml";
declare option output:media-type "application/xhtml+xml";
declare option output:omit-xml-declaration "no";
declare option output:doctype-system "about:legacy-compat";
declare option exist:serialize "method=xhtml enforce-xhtml=yes";
declare variable $input as xs:string := request:get-parameter('in', 'xyz');
<html><head><title>Title</title></head><body>Here is my default input: {$input}</body></html>

a "problem" is reported on the request: prefix:

[XPST0081] "request": can not expand prefix of lexical QName to namespace URI

I have installed the Atom server-side library for eXist-db (version 1.0.1). Otherwise VSCode is communicating with eXist-db, real-time synchronization from the file system is working correctly, and I can run the query on my eXist-db instance without error.

Typo: "Disonnected"

just a typo: I see in the bottom right corner "Disonnected" instead of "Disconnected".

My version is 1.10.0.

thanks for this extension!

sync only seems to work if exist context is se to `/exist`

When trying to get the sync to work with a dockerized eXist-db with context set to / installation of the support XAR failed and so did synchronzation. After rebooting the container with context set to /exist it started working.

Would another solution be to modify the server in .existdb.json, i.e. not "server": "http://localhost:8088/exist" but `"server": "http://localhost:8088/"?

Random attempts to create a collection

Since the last few days the plugin is randomly trying to create collections. I am syncing with an eXist-db collection named „wuehr-soeinefreiheit“ and after starting the synchronization the plugin tries to create collections inside eXist, which are already there. For example the following is logged to the terminal:

> Executing task: node /Users/bastian/.vscode/extensions/exist-db.existdb-vscode-1.5.0/sync/dist/sync.js -s http://localhost:8080/exist -u admin -p   -c /db/apps/wuehr-soeinefreiheit "/Users/bastian/Documents/GitHub/wuehr-soeinefreiheit" -i ".existdb.json" ".git/**" ".gitignore" "node_modules/**" "bower_components/**" "*/.DS_Store" <

Watching /Users/bastian/Documents/GitHub/wuehr-soeinefreiheit
Using fs events.
Creating collection  in /db/apps/wuehr-soeinefreiheit
Creating collection  in /db/apps/wuehr-soeinefreiheit
Creating collection  in /db/apps/wuehr-soeinefreiheit
Creating collection  in /db/apps/wuehr-soeinefreiheit
Creating collection  in /db/apps/wuehr-soeinefreiheit
Creating collection  in /db/apps/wuehr-soeinefreiheit
Creating collection  in /db/apps/wuehr-soeinefreiheit
Creating collection  in /db/apps/wuehr-soeinefreiheit
Creating collection  in /db/apps/wuehr-soeinefreiheit
Creating collection  in /db/apps/wuehr-soeinefreiheit

Everything is still working fine, but I'm curious, if there is going to be any problem in the future.

I am using the following setup:
MacBook Air (M1)
MacOS BigSur
VS-Code 1.5.2
eXist-db 5.2.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.