-
Notifications
You must be signed in to change notification settings - Fork 22
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
Getting "Error: gundb failed to authenticate user: Unverified data." when trying to create a folder in UserStorage #72
Comments
Hi @talentlessguy , could you try this without the What we can maybe do is add a config flag called e.g., Another thing to note in your snippet is that before creating the folder, you would need to create a bucket called |
@jsonsivar thanks for responding! I've tried to switch to this: import { Users, UserStorage } from '@spacehq/sdk'
const users = new Users({ endpoint: 'wss://auth.space.storage' })
async function run() {
const identity = await users.createIdentity()
const user = await users.authenticate(identity)
const storage = new UserStorage(user)
await storage.createFolder({ bucket: 'bucket', path: 'pkg' })
console.log(await storage.listDirectory({ bucket: 'bucket', path: '.' }))
}
run() it returns a new error:
I've got a few questions:
|
Hi @talentlessguy , I wasn't able to replicate this in my node environment. I realized you are on Node 16 so I will try upgrading to that and see if I can replicate it. In the meantime re: your other questions:
You shouldn't need any API keys for this.
The default bucket called |
@talentlessguy. I was able to reproduce this. The confusion was that our integration tests actually simulate the browser environment and so the SDK has only been tested and supported in a browser environment. I think there is an underlying issue with using Gun directly in NodeJS when using the SEA authenticated as we are. Found this but is a bit outdated amark/gun#579. We will need to dig further and see if there is an issue with the library or if it's our code and will keep you posted. |
@jsonsivar thanks for investigation! Glad that you figured out the root of the problem by the way, I recommend to add integration tests for Nodejs as well because SDK should be usable with Node.js |
Thats a great idea. We will try to add that in the next few weeks. |
hey, gun just had an update that is up to date with master branch (0.2020.1232) this means all bugfixes (including amark/gun#579) are now in gun could you please update to latest and run it through integration tests? thanks in advance |
Hmm, that was closed in 2018, I don't think it is the issue. 2020 had some regressions when browser/nodejs are not using same version, so try to match same version as the peers you are connecting to. |
code:
error:
info:
@spacehq/sdk
: 0.0.30The text was updated successfully, but these errors were encountered: