-
Notifications
You must be signed in to change notification settings - Fork 15
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
fatal crash related to gun.off() #48
Comments
Added it in https://github.com/LeonardPauli/gun-level/tree/48-no-key-crash (npm install gun-level-lptmp) |
@leonardpauli if you submit a pull request with this we'll accept it and get it merged :D |
@amark I ran into this same error. TL;DRThink it hasn't something to do with Gun user not existing on server node. Just a hunch Environment: Chrome Latest, Node 8.11.2, Mac OS X Repos
ReproductionHere's the rough step of steps to reproduce error:
Screenshots/GifAnd here's some screenshots and a gif. Code Snippets
|
@509dave16 your project looks really cool, I'd love to hear more? Thanks for a detailed report, it is exceptional!! This issue is specific to gun-level or GUN in general? Because If this is specific to gun-level, I can't guarantee gun-level staying up to date with main GUN (the localStorage version is officially maintained). We have a new thing called RAD for GUN that is intended to replace most storage systems (and will probably have its own indexedDB plugin that will have more official support, but that is a ways out), however it isn't quite stable/ready yet. So I don't want to slow down progress on your app just because of gun-level. Are you able to avoid it for now? |
@amark Really appreciate the reply. And that is good point you made regarding the scope. Should try to do some unauthenticated ops separately and compare results. I’ll probably stick with localStorage or IndexedDB adapters for the moment moving forward. I have been looking at syncing solutions because my consulting company is trying to get a custom Google Forms like product released that has syncing incorporated. So that we have some passive income. Currently the app has a php api with manual polling and the different client implementations have been using local storage. Which we have found is quite slow. Data would be sectioned off by companies. And then people given links to different forms would fill them out as an application(instance of the form data). The forms could be filled out offline and then be pushed to the server/peers when online. Likewise if there were any additions to the forms that needed to be filled out, those would be pushed up to device when back online. I investigated Realm.js but it is limited to React Native at the moment. Though it did have access control levels. I have investigated using PouchDB with Couch base or CouchDB as well. Doing little demos with them. Even wrote a relational orm around relational-pouch: https://github.com/509dave16/ranksdb. But then found about RxDB which does that better. Problem with those is the locked down single js function solution to write access. And read access is only scoped at a database level. Can’t go as fine grained as documents. And deployment is somewhat hairy. And I was using superlogin to handle one database per user which is no longer maintained. So then I found Gun.js, OrbitDB, and SyncedDB. I went with Gun.js because it’s smallest, actively maintained, most storage adapters, and it’s ACL/node level permissions are promising. I plan to write a NanoSQL adapter for gun. Then on the server or client where intensive reporting like logic needs to be done, complex queries could be performed. The sample app you see above is just an app for cycling through randomized selections of whatever you might want to randomize. Like those extreme sports you talked about in a talk you have ;) .Here’s a demo hosted site: https://random-that.firebaseapp.com/lists But I did run into problems where clearing cookies in the browser. Removed any users I can create a separate issue for that. |
There are a bunch of sync and performance concerns with our current api for the forms product. Hoping Gun could be an alternative for us. We’ll also be doing for client work a contact management app as well as a similar forms app for a heater company as a PWA. |
@amark Switching to another adapter completely avoided the issue I was encountering. Thanks for your input today. |
@509dave16 sounds awesome. Great work. Thanks for the deeper understanding/explanation! |
Not exactly sure what I did, but probably one of:
...when trying to figure out how to remove data.
I suspect context.get['#'] ("key") becomes null/undefined somehow which breaks it all, even after restart. Adding
if (!key) return _this.afterRead(context, null) // possibly warn? or is this correct?
at line 112 in /dist/Adapter/index.js should do....or just make it use the radix storage thing? :)
The text was updated successfully, but these errors were encountered: