appy-one / acebase-client

Client to connect to remote AceBase NoSQL database server
MIT License
21 stars 8 forks source link

fix: Cannot set property 'acebase_origin' of null #14

Closed KesleyDavid closed 2 years ago

KesleyDavid commented 2 years ago

I'm using the script importing via the link: <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/acebase-client@latest/dist/browser.min.js"></script>

since the last update yesterday (10/27/2021), when I do a db.query().get() query everything goes fine, but when I do a db.ref().get() query, I always get the same error

The data is returned if I query the packages in the google crhome "network", but an error appears when doing the query and I can't get the data through javascript.

image

My package:

{
  "scripts": {
    "start": "node server-database.js",
    "dev": "nodemon server-database.js",
    "database": "pm2 start server-database.js",
    "stop": "pm2 stop server-database && pm2 delete server-database"
  },
  "dependencies": {
    "acebase-server": "^1.4.0",
    "nodemon": "^2.0.12"
  }
}

I have a hospital client who uses the database, but the entire system is paralyzed, without being able to carry out requests for exams and consultations of reports and images.

I thank you and want to congratulate you on the great database, we are really enjoying using it.

I believe this is a simple bug to fix, and soon you will be able to :D

KesleyDavid commented 2 years ago

Update the error: image

Lines Errors: image

KesleyDavid commented 2 years ago

Updated acebase-server to 1.5.0

{
  "scripts": {
    "start": "node server-database.js",
    "dev": "nodemon server-database.js",
    "database": "pm2 start server-database.js",
    "stop": "pm2 stop server-database && pm2 delete server-database"
  },
  "dependencies": {
    "acebase-server": "^1.5.0",
    "nodemon": "^2.0.12"
  }
}

The same error still continues

appy-one commented 2 years ago

Hi Kesley, thanks for reporting this. I've managed to reproduce this and I will be working on it right away.

appy-one commented 2 years ago

Fixed, published in acebase-client 1.6.2

KesleyDavid commented 2 years ago

Very good thanks @appy-one.

Any predictions to publish on jsdelivr CDN ? https://cdn.jsdelivr.net/npm/acebase-client@latest/dist/browser.min.js

This would automatically solve the problems in mobile apps that are using CDN and would not have to wait for approval from stores to update the app.

Thank you very much in advance

KesleyDavid commented 2 years ago

Good morning @appy-one ,

I updated acebase-server to 1.5.1 I'm using CNN @lasted for acebase-client

For me the same error keeps appearing, follow the lines for the errors

image

Line Errors:

if (!useCache) {
        const { value, context } = await getServerValue();
        context.acebase_origin = 'server';
        return { value, context };
}
appy-one commented 2 years ago

Maybe you are using a cached version because of a proxy server in between? Try replacing @latest with @1.6.2, or @1.7.1 (latest)

appy-one commented 2 years ago

I see there is another issue that I need to fix, will do that first thing tomorrow.

appy-one commented 2 years ago

@KesleyDavid I published acebase-client version 1.7.2 just now, let me know if it all works

KesleyDavid commented 2 years ago

Perfect, everything working perfectly. Thank you very much @appy-one