AgregoreWeb / agregore-browser

A minimal browser for the distributed web (Desktop version)
https://www.youtube.com/watch?v=TnYKvOQB0ts&list=PL7sG5SCUNyeYx8wnfMOUpsh7rM_g0w_cu&index=14
GNU Affero General Public License v3.0
715 stars 66 forks source link

hyper URLs don't load, weird error code #233

Closed unmellow closed 1 year ago

unmellow commented 1 year ago

tried accessing hyper://blog.mauve.moe/

but get this code

Error: ENOENT: no such file or directory, mkdir 'C:\Users\Amazi\AppData\Local\C:\Users\Amazi\AppData\Roaming\agregore-browser\hyper-nodejs\Data'

seems like it thinks it's in the root folder when it's not.

This is the latest release, windows setup 2.0.0

RangerMauve commented 1 year ago

Ruh roh. :/ I don't currently have a Windows machine to test this on. Do you think you could try cloning https://github.com/RangerMauve/hypercore-fetch/ running, npm install, and then running npm test to see if the tests are passing for you?

unmellow commented 1 year ago

Passed on everything except this.

# Resolve DNS
not ok 100 SyntaxError: Unexpected token 'E', "Error: Una"... is not valid JSON
  ---
    operator: error
    stack: |-
      SyntaxError: Unexpected token 'E', "Error: Una"... is not valid JSON
          at JSON.parse (<anonymous>)
          at parseJSONFromBytes (node:internal/deps/undici/undici:6571:19)
          at successSteps (node:internal/deps/undici/undici:6545:27)
          at node:internal/deps/undici/undici:1211:60
          at node:internal/process/task_queues:140:7
          at AsyncResource.runInAsyncScope (node:async_hooks:203:9)
          at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
          at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  ...
# Error on invalid hostname
RangerMauve commented 1 year ago

Could you also check the tests in hyper-sdk?

RangerMauve commented 1 year ago

The DNS thing I'm not sure about, (might be your network blocking one of the DNS over HTTPs providers we're using). I'm guessing there might be some sort of problem in the filesystem detection code for the storageLocation in hyper-sdk though. 🤔

I'll try to make some time for this tonight.

unmellow commented 1 year ago
# Specify storage for sdk
not ok 1 Error: ENOENT: no such file or directory, mkdir 'C:\Users\Amazi\AppData\Local\C:\Users\Amazi\AppData\Local\Temp\tmp-20024-zF73LOjiaEye-nodejs\Data'
  ---
    operator: error
    stack: |-
      Error: ENOENT: no such file or directory, mkdir 'C:\Users\Amazi\AppData\Local\C:\Users\Amazi\AppData\Local\Temp\tmp-20024-zF73LOjiaEye-nodejs\Data'
  ...
# Load hypercores by names and urls

Would you look at that, the first test of hyper-sdk gives me the exact same error as in agregore.

Again this is the only fail

RangerMauve commented 1 year ago

looking into this now. I'm gonna try to add more tests to run on windows and mac and see if I can catch it there

RangerMauve commented 1 year ago

ah okay, I think I might have fixed it. just tagging a new release with the fix

RangerMauve commented 1 year ago

https://github.com/AgregoreWeb/agregore-browser/releases/tag/v2.2.1

try this version out