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

Colab script does not generate setup URI #527

Open
ikotamsl opened this issue Nov 2, 2024 · 9 comments
Open

Colab script does not generate setup URI #527

ikotamsl opened this issue Nov 2, 2024 · 9 comments

Comments

@ikotamsl
Copy link

ikotamsl commented Nov 2, 2024

Abstract

Colab script does not generate setup URI

Expected behaviour

  • Colab script execution is completed successfully
  • Colab script returns a Setup URI

Actually happened

Colab script [3] fails with

--- setup uri  ---
error: Could not find a matching package for 'npm:[email protected]' in the node_modules directory. Ensure you have all your JSR and npm dependencies listed in your deno.json or package.json, then run `deno install`. Alternatively, turn on auto-install by specifying `"nodeModulesDir": "auto"` in your deno.json file.
    at file:///content/obsidian-livesync/utils/flyio/generate_setupuri.ts:1:25

Failed to encrypt the setup URI

Reproducing procedure

  1. Execute each step of Colab Script
  2. Reach step [3]
  3. Run step

Report materials

Full log of step [3]

env: region=4444
[Errno 2] No such file or directory: 'obsidian-livesync/utils/flyio'
/content/obsidian-livesync/utils/flyio
-- YOUR CONFIGURATION --
URL     : 4444
username: 4444
password: 4444
region  : 4444

-- START DEPLOYING --> 
An existing fly.toml file was found
Using build strategies '[the "couchdb:latest" docker image]'. Remove [build] from fly.toml to force a rescan
Creating app in /content/obsidian-livesync/utils/flyio
We're about to launch your app on Fly.io. Here's what you're getting:

Organization: 4444                 (fly launch defaults to the personal org)
Name:         4444         (specified on the command line)
Region:       4444             (specified on the command line)
App Machines: shared-cpu-1x, 256MB RAM (from your fly.toml)
Postgres:     <none>                   (not requested)
Redis:        <none>                   (not requested)
Tigris:       <none>                   (not requested)

Created app '4444' in organization 'personal'
Admin URL: 4444
Hostname: 4444
Wrote config file fly.toml
Validating /content/obsidian-livesync/utils/flyio/fly.toml
✓ Configuration is valid
Your app is ready! Deploy with `flyctl deploy`
Secrets are staged for the first deployment
==> Verifying app config
--> Verified app config
Validating /content/obsidian-livesync/utils/flyio/fly.toml
✓ Configuration is valid
==> Building image
Searching for image 'couchdb:latest' remotely...
image found: img_ox20przww1q24j1z

Watch your deployment at 4444

Provisioning ips for 4444
  Dedicated ipv6: 4444
  Shared ipv4: 4444
  Add a dedicated ipv4 with: fly ips allocate-v4

Creating a 1 GB volume named 'couchdata' for process group 'app'. Use 'fly vol extend' to increase its size
This deployment will:
 * create 1 "app" machine

> Launching new machine
No machines in group app, launching a new machine
> Machine 4444 [app] was created
✔ Machine 4444 [app] update finished: success
Finished launching new machines

NOTE: The machines for [app] have services with 'auto_stop_machines = "stop"' that will be stopped when idling

Checking DNS configuration for 4444

Visit your newly deployed app at 4444
-- Configuring CouchDB by REST APIs... -->
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   158  100    12  100   146      6     77  0:00:02  0:00:01  0:00:01    84
{"ok":true}
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     9  100     3  100     6      3      7  0:00:01 --:--:--  0:00:01    11
""
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     9  100     3  100     6     11     22 --:--:-- --:--:-- --:--:--    34
""
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    28  100     3  100    25     11     97 --:--:-- --:--:-- --:--:--   109
""
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     9  100     3  100     6     11     23 --:--:-- --:--:-- --:--:--    34
""
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     9  100     3  100     6     11     23 --:--:-- --:--:-- --:--:--    34
""
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    15  100     3  100    12     11     46 --:--:-- --:--:-- --:--:--    58
""
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    13  100     3  100    10     11     38 --:--:-- --:--:-- --:--:--    49
""
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     9  100     3  100     6     11     23 --:--:-- --:--:-- --:--:--    34
""
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    61  100     3  100    58     11    225 --:--:-- --:--:-- --:--:--   237
""
<-- Configuring CouchDB by REST APIs Done!
OK!
Setup finished! Also, we can set up Self-hosted LiveSync instantly, by the following setup uri.
Passphrase of setup-uri will be printed only one time. Keep it safe!
--- configured ---
database       : 4444
E2EE passphrase: 4444
--- setup uri  ---
error: Could not find a matching package for 'npm:[email protected]' in the node_modules directory. Ensure you have all your JSR and npm dependencies listed in your deno.json or package.json, then run `deno install`. Alternatively, turn on auto-install by specifying `"nodeModulesDir": "auto"` in your deno.json file.
    at file:///content/obsidian-livesync/utils/flyio/generate_setupuri.ts:1:25

Failed to encrypt the setup URI

Report from the LiveSync

not applicable

Obsidian debug info

not applicable

Plug-in log

not applicable

Network log

not applicable

Screenshots

not applicable

Other information, insights and intuition.

The synchronization itself works fine and I can connect to the database. The instance is created and is in state "Active". It seems like a dependency problem, that causes this minor inconvenience.

Anyway, thank you very much for your work!

@vrtmrz
Copy link
Owner

vrtmrz commented Nov 4, 2024

Thank you for reporting this issue!
This seems to be caused by a major version update of Deno.
I will address it later!

@vrtmrz vrtmrz added bug Something isn't working addressed labels Nov 4, 2024
@quyda88
Copy link

quyda88 commented Nov 7, 2024

I also made it to this step! Please tell me how to copy the setup-uri into the Obsidian application. Thank you very much!

@timschonborn
Copy link

@ikotamsl did you manage to create the setup uri manually from the output? I don't seem to be able to get the encrypt() method working.

@ikotamsl
Copy link
Author

ikotamsl commented Nov 8, 2024

@ikotamsl did you manage to create the setup uri manually from the output? I don't seem to be able to get the encrypt() method working.

Hi @timschonborn
Didn't test that. I just saved my connection parameters and set up by pasting them on all my devices

@timschonborn
Copy link

timschonborn commented Nov 8, 2024

@ikotamsl thanks for the swift reply. I feel like an idiot but I did't manage to get it working. I've saved the output, which parameters from the output did you use?

I must have had a typo, it works now! Thanks

@vrtmrz
Copy link
Owner

vrtmrz commented Nov 9, 2024

Sorry for being late to address it!
I have added the deno.jsonc, and modified the output order.

Therefore, the script and Colan notebook work again!
Would you mind if I ask you to check the behaviour, please?

@vrtmrz
Copy link
Owner

vrtmrz commented Nov 9, 2024

Sorry! I noticed that I have to add several new configurations to the empty settings!
Wait for a while to fix it a bit more! Thank you for your patience!

@vrtmrz
Copy link
Owner

vrtmrz commented Nov 14, 2024

Sorry for being late to make the notification!
This has been fixed! Would you mind if I ask you to check again, please?

@vrtmrz vrtmrz added awaiting confirmation and removed bug Something isn't working addressed labels Nov 14, 2024
@ikotamsl
Copy link
Author

@vrtmrz

Works perfectly now)

Screenshot 2024-11-15 at 10 13 24

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants