eraeco / joy

JOY is a JavaScript framework for building user interfaces and progressive applications.
121 stars 25 forks source link

Error when namespacing #4

Open datashaman opened 4 years ago

datashaman commented 4 years ago

Hi there, after changing to a namespaced root using the instructions on the readme, I get this error in the console:

TypeError: "input is undefined"
    from https://cdn.jsdelivr.net/npm/joydb/joy.min.js:2380
    fall_verify https://cdn.jsdelivr.net/npm/joydb/joy.min.js:2729
joy.min.js:2700:15
NO! Unverified data. 
Object { "~8VP0UwcvxBStPc30AQ_55RXzZpzth0rS1O8_4pUM91k.TRVWDuKOf5eXlb8y0u95cotB4f7SCJbjv3EuYHE5flc": {…} }
joy.min.js:3511:21
TypeError: "input is undefined"
    from https://cdn.jsdelivr.net/npm/joydb/joy.min.js:2380
    fall_verify https://cdn.jsdelivr.net/npm/joydb/joy.min.js:2729
joy.min.js:2700:15

It appears to be somehow tied to your account, and refuses to work with an unverified root? It works perfectly with name="app".

I've tried clearing local storage, removing my local peer's data files, setting up the page to only consult my local peer, used different user accounts. All the same result.

amark commented 4 years ago

Interesting, it sounds like you updated the user name space with your own key after creating an account? This error should mean you aren't logged into the name space you're attempting to write to. I'm gone during Christmas right now, will try to try this out when I'm at a laptop. In the meanwhile, tell me what you're trying to build!? :)

datashaman commented 4 years ago

Hi there, yeah it's quite possible I've done something bad in the early stages of using gun. :blush: I'm interested in creating a comments component using gun; this looks like a very simple way of data binding which I like - similar to transparency.js. I'd like to incorporate some sort of crowdsourced moderation element like ratings or scores to filter out spam. I've looked at iris-lib, but it's a little too much for what I want to do. So rolling my own. :)

It's quite likely I'll veer towards using Vue for the component - exploring options along the way...