Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DPP doesn't work when running on website hosted on remote server, but works on 'localhost' website #3

Closed
hopeng opened this issue Aug 29, 2022 · 3 comments

Comments

@hopeng
Copy link

hopeng commented Aug 29, 2022

Hi,

I'm looking for help in troubleshooting. The browser code is very simple and it worked when I run my website hosted in localhost.

import {createDPP} from "dpp-db/node"

clientMapDpp = createDPP({
    storeName: 'clientMap',
    logging: true
  })

this.clientMap = await this.clientMapDpp.start()
this.clientMap["1660733927552"] = {"firstName":"May","lastName":"Ry","gender":"Male","phone":0}

I got these logs

1661774423157: proxy set called with prop = ["1660733927552"]
1661774423157: getProps called for ["1660733927552"]
1661774423158: obj={"firstName":"May","lastName":"Ry","gender":"Male","phone":0}

It worked and I could see IndexedDB got populated with the record.

But this doesn't work when the website runs on remote server and accessed through a custom domain name.

I got exactly the same logging output ('proxy set called with prop' ...) but the IndexedDB just didn't get populated at all. This is very strange. Is there any way to troubleshoot?

@robtweed
Copy link
Owner

Hi - let's eliminate one potential issue - can you make sure you're using the very latest versions of DPP (2.6.0) and QOper8-ww (2.6.2). There was a change I made to the "this" context when running a WebWorker message type handler script in QOper8-ww which has to be matched in DPP. Using a mismatched combination of DPP and QOper8 versions would certainly cause the kind of fault you've described. Let me know if you still have the issue after checking the versions (take a look in the package.json files for the version numbers)

@hopeng
Copy link
Author

hopeng commented Sep 1, 2022

works now! will you be able to enforce the expected version of qoper8-ww dependency? So other users will not have this issue:

change this in dpp-db/package.json:

  "dependencies": {
    "qoper8-ww": ""
  },

into

  "dependencies": {
    "qoper8-ww": "2.6.2" // or even "latest"
  },

@robtweed
Copy link
Owner

robtweed commented Sep 1, 2022

Will do! I'll close this now

@robtweed robtweed closed this as completed Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants