Beaker: Cannot pass {key:xxx, version:xx} object to beaker.hyperdrive.mount in webTerm

Created on 21 May 2020  路  2Comments  路  Source: beakerbrowser/beaker

Describe the bug
The api docs specify the arguments for target url can be a drive, object or string.
Passing a key and version as mount url in command script throws Error: Uncaught TypeError: mount.includes is not a function. Assuming it is from app/bg/web-apis/bg/hyperdrive.js, line 500, which doesn't check if it is a string, hyperdrive or object.

To Reproduce
Steps to reproduce the behavior:

  1. create a WebTerm command that calls beaker.hyperdrive.mount(this.env.resolve('.')+'/test',{key:'hyper://a8e9bd0f4df60ed5246a1b1f53d51a1feaeb1315266f769ac218436f12fda830/',version:50})**
  2. install and run command
  3. See error

Expected behavior
Expected that beaker.hyperdrive.mount parses the object and mounts the specified version - or throw a more user friendly error and?

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS: Linux
  • Beaker Browser

Electron: 9.0.0-beta.24
Chromium: 83.0.4103.45
Node: 12.14.1
Hyperdrive: 10.11.0
API: 0
Daemon: 1.13.8
Client: 1.14.7
Schema: 1.9.1
Fuse Native: 2.2.1
Fuse: 1.2.15

Additional context
Absolutely blown away by this new beaker. Not relevant, just wanted to mention it :)

bug

All 2 comments

Two things:

  1. Sorry about the bug and thanks for filing! On my immediate todo list. One thing you might try in the meantime is the versioned URL format: hyper://{key}+{version}/. Not 100% sure it'll work based on the fact that this bug exists, but worth trying.
  2. hpm heck yeah, I dig what you're doin

Oh, no reason to be sorry! This beta is amazing - there are sure to be a few kinks to work out!
I gave solving it a try, but couldn't quite figure it out. Not sure what was going on.
The key+version thing didn't seem to work either, it seemed to still mount the latest version, but it was getting kind of late, so it could have just been me, so I will give it another shot.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NicholasGWK picture NicholasGWK  路  4Comments

pfrazee picture pfrazee  路  3Comments

johanbove picture johanbove  路  3Comments

mundusnine picture mundusnine  路  3Comments

aaronshaf picture aaronshaf  路  3Comments