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

Error running updating drive with hyperdrive import #7

Open
paul90 opened this issue Feb 9, 2021 · 5 comments
Open

Error running updating drive with hyperdrive import #7

paul90 opened this issue Feb 9, 2021 · 5 comments

Comments

@paul90
Copy link

paul90 commented Feb 9, 2021

Just trying to update a drive with some updated a hyperdrive that was created with the original hyperdrive daemon, and getting the following error:

drive name shortened, as it's a development drive

Importing /Users/Paul/Projects/FederatedWiki/development/client/client into ad8cb16...ca (Ctrl+c to exit)...

Importing | ======================================== | 100% | 25/25 Files(node:9183) UnhandledPromiseRejectionWarning: PathAlreadyExists: Path /plugins already exists.
    at /Users/Paul/.nvm/versions/node/v14.15.1/lib/node_modules/@hyperspace/hyperdrive/node_modules/hyperdrive/index.js:636:45
    at Get._callback (/Users/Paul/.nvm/versions/node/v14.15.1/lib/node_modules/@hyperspace/hyperdrive/node_modules/mountable-hypertrie/index.js:308:16)
    at Get._update (/Users/Paul/.nvm/versions/node/v14.15.1/lib/node_modules/@hyperspace/hyperdrive/node_modules/hypertrie/lib/get.js:75:8)
    at onnode (/Users/Paul/.nvm/versions/node/v14.15.1/lib/node_modules/@hyperspace/hyperdrive/node_modules/hypertrie/lib/get.js:113:10)
    at onnode (/Users/Paul/.nvm/versions/node/v14.15.1/lib/node_modules/@hyperspace/hyperdrive/node_modules/hypertrie/index.js:334:5)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:9183) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node proc)
(node:9183) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Importing | ======================================== | 100% | 55/55 Files

The /plugins directory was part of the original import when the drive was created, and the contents have not changes since the last update back in August. And the drive contains a lot more than 55 files!

Running with --trace-warnings gives a little extra information, if that helps.

Importing /Users/Paul/Projects/FederatedWiki/development/client/client into ad8cb16...ca (Ctrl+c to exit)...

Importing | ======================================== | 100% | 21/21 Files(node:9162) UnhandledPromiseRejectionWarning: PathAlreadyExists: Path /plugins already exists.
    at /Users/Paul/.nvm/versions/node/v14.15.1/lib/node_modules/@hyperspace/hyperdrive/node_modules/hyperdrive/index.js:636:45
    at Get._callback (/Users/Paul/.nvm/versions/node/v14.15.1/lib/node_modules/@hyperspace/hyperdrive/node_modules/mountable-hypertrie/index.js:308:16)
    at Get._update (/Users/Paul/.nvm/versions/node/v14.15.1/lib/node_modules/@hyperspace/hyperdrive/node_modules/hypertrie/lib/get.js:75:8)
    at onnode (/Users/Paul/.nvm/versions/node/v14.15.1/lib/node_modules/@hyperspace/hyperdrive/node_modules/hypertrie/lib/get.js:113:10)
    at onnode (/Users/Paul/.nvm/versions/node/v14.15.1/lib/node_modules/@hyperspace/hyperdrive/node_modules/hypertrie/index.js:334:5)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
    at emitUnhandledRejectionWarning (internal/process/promises.js:168:15)
    at processPromiseRejections (internal/process/promises.js:247:11)
    at processTicksAndRejections (internal/process/task_queues.js:94:32)
(node:9162) PathAlreadyExists: Path /plugins already exists.
    at /Users/Paul/.nvm/versions/node/v14.15.1/lib/node_modules/@hyperspace/hyperdrive/node_modules/hyperdrive/index.js:636:45
    at Get._callback (/Users/Paul/.nvm/versions/node/v14.15.1/lib/node_modules/@hyperspace/hyperdrive/node_modules/mountable-hypertrie/index.js:308:16)
    at Get._update (/Users/Paul/.nvm/versions/node/v14.15.1/lib/node_modules/@hyperspace/hyperdrive/node_modules/hypertrie/lib/get.js:75:8)
    at onnode (/Users/Paul/.nvm/versions/node/v14.15.1/lib/node_modules/@hyperspace/hyperdrive/node_modules/hypertrie/lib/get.js:113:10)
    at onnode (/Users/Paul/.nvm/versions/node/v14.15.1/lib/node_modules/@hyperspace/hyperdrive/node_modules/hypertrie/index.js:334:5)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
(node:9162) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    at emitDeprecationWarning (internal/process/promises.js:180:11)
    at processPromiseRejections (internal/process/promises.js:249:13)
    at processTicksAndRejections (internal/process/task_queues.js:94:32)
Importing | ======================================== | 100% | 55/55 Files
@paul90
Copy link
Author

paul90 commented Feb 10, 2021

I wonder, in the readme...

This module replaces the functionality of the hyperdrive-daemon. If you've previously used that daemon, running Hyperspace for the first time will migrate your content in ~/.hyperdrive to be compatible with this service.

But, running hyperspace hasn't migrated the storage over to ~/.hyperspace

I notice that beaker starts hyperspace with the no-migrate option, is this interfering with hyperspace performing the migration, even when Beaker and its associated hyperspace service are not running?

@andrewosh
Copy link
Collaborator

@paul90 Thanks for reporting this -- definitely looks like a bug.

Hyperspace actually isn't moving any cores that were previously in ~/.hyperdrive into ~/.hyperspace right now. That part of the migration's being skipped in Hyperspace, so I doubt that's the culprit.

Have you tried the new hyp CLI tool? There's a hyp sync command in there that's more recent (the import/export features in this module are a bit more dated).

Mind letting me know if hyp sync does the import correctly?

@paul90
Copy link
Author

paul90 commented Feb 13, 2021

I had wondered about using hyp sync as a replacement.

But, when I used hyp diff it reported that every file in the archive had changed - when in reality only a single file has been changed since the last import. I also notice that hyp diff appears to be ignoring .datignore, and is wanting to add .hyperdrive-import-key, and other files that should be ignored.

It also looks as if hyp doesn't play nicely with mounted drives (a mounted .ui folder in this case), with hyp diff reported in that contents of the mounted /.ui/ folder will be deleted.

So, it doesn't look as if hyp sync will work correctly. I will try cloning the drive later to see if hyp sync does something different from what hyp diff is reporting it will do.

@paul90
Copy link
Author

paul90 commented Feb 13, 2021

No, hyp sync does not work, at least not safely. Glad I used beaker to copy the drives, and change the mounted drive, before testing this.

For the drive with the mount, the contents of the mounted drive were deleted as well as the mount point. I will create an issue against the cli for this, and for there being no ignore file support.

It also appears to have updated all the files - though this might be due to an issue with original hyperdrive daemon import with files showing, in beaker at least, the date of the import rather than their creation date from the file system.

@paul90
Copy link
Author

paul90 commented May 11, 2021

Any progress to report on getting this fixed?

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