Closed theoparis closed 3 years ago
Which version of acebase-client are you using?
My first attempt at debugging this would be checking if all environment variables are correct.
What if you'd console.log
all those (including your https var), do they point to the right server?
If this is still an issue, please reply. I will be closing it otherwise
I'm also having the same issue. Im using client version 1.5.1,
If XHR polls fail, the server is either not running at the same address you configured in the client, or unreachable because of a misconfigured firewall or proxy server in between. Try connecting to your server in the browser to test your settings. Example: if your server is running with https on myserver.com port 8735, simply go to https://myserver.com:8735/ in your browser. If that doesn't work, check your server, firewall and/or (reverse) proxy server configurations
client actually works on vanilla js. It's just bundling problem on my end.
if anyone in the future encountering this and using typescript. You can directly import the built browser js from dist folder add this to your tsconfig.json
{
"compilerOptions": {
"paths": {
"acebase-client/dist/browser": ["node_modules/acebase-client/index.d.ts"]
},
}
so in your ts file
import {AceBaseClient} from "acebase-client/dist/browser"
const db = new AceBaseClient({
host: "localhost",
port: 5757,
dbname: "mydb",
https: false,
});
db.ready(() => {
console.log("Connected successfully");
});
this works for me
client actually works on vanilla js. It's just bundling problem on my end.
Which bundler do you use?
Hi, so I'm hosting a acebase-server instance on my VPS. I was able to navigate to the acebase server's web manager panel, which seems to be working fine. However, when I used it in a react application in the browser it kept giving me XHR poll errors. There are no errors besides the repeated xhr error. I'd think it would be due to connection issues but I don't know how to solve it...
Here is the output in the inspector console on my browser:
It also seems to be working fine in node.js in a CLI command that I created.
Here is the client connection code (excluding the ip address obviously)