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

doesn't work due to CORB now #80

Open
Tenari opened this issue Apr 4, 2023 · 10 comments
Open

doesn't work due to CORB now #80

Tenari opened this issue Apr 4, 2023 · 10 comments

Comments

@Tenari
Copy link

Tenari commented Apr 4, 2023

i tried to spin up a new project. To the best of my knowledge it is configured correctly.

I edited the +cors-registry as the README dictates. still get this (I am logged in to the ship locally as well)

image

relevant logs:

tenari@dzs-MacBook-Pro ui % npm run dev

> [email protected] dev
> vite

http://127.0.0.1

  VITE v4.2.1  ready in 188 ms

  ➜  Local:   http://localhost:5173/apps/tasks/
  ➜  Network: use --host to expose
  ➜  press h to show help

> +cors-registry
[ requests=[n=~~http~3a.~2f.~2f.localhost l={} r={~~http~3a.~2f.~2f.127~.0~.0~.1}]
  approved=[n=~~http~3a.~2f.~2f.localhost~3a.5173 l={~~http~3a.~2f.~2f.127.0.0.1~3a.5173 ~~http~3a.~2f.~2f.localhost~3a.3000} r={}]
  rejected=~
]

when I try running my browser with security turned off, I get a slightly different error:
image

it seems to me that something with how vite is passing along our urbauth cookie is not working

@Tenari
Copy link
Author

Tenari commented Apr 4, 2023

also appears to be a vite version thing, since I don't have this issue on an older project using vite version v2.9.15

@matildepark
Copy link
Contributor

What happens if you go direct to localhost:5173?

@Tenari
Copy link
Author

Tenari commented Apr 4, 2023

takes me to the grid of urbit apps, since I am logged in.

@matildepark
Copy link
Contributor

Sorry, I was on a plane. Okay, so presently, I can't replicate the issue described. I will write exactly what I did.

This is on an M1 MacBook Pro. Version 111.0.5563.146 of Chrome (latest), urbit 2.1, and create-landscape-app 8.1.0.

  1. I made sure my urbit was the latest, redownloading it from urbit.org. It's currently 2.1.
  2. I ran ./urbit -F zod.
  3. I let it compile and continued.
  4. I ran npx clear-npx-cache just in case I had old copies of the create-landscape-app wizard lying around. Then I ran npx @urbit/create-landscape-app.
  5. For the wizard, I set my app to tasks and my ship location to http://localhost:80.
  6. I saw the ship was finished, so I went to the generated folder, cd ui and npm i && npm run dev. It pointed me to http://127.0.0.1:5173/apps/tasks/. I went there, and saw the page mounted, but no apps, since I hadn't signed in yet.
  7. I went direct to http://127.0.0.1:5173/ and signed in.
  8. I went back to http://127.0.0.1:5173/apps/tasks/ and the apps were there, no CORB issue.

@ajlamarc
Copy link

ajlamarc commented Apr 5, 2023

Sorry, I was on a plane. Okay, so presently, I can't replicate the issue described. I will write exactly what I did.

This is on an M1 MacBook Pro. Version 111.0.5563.146 of Chrome (latest), urbit 2.1, and create-landscape-app 8.1.0.

1. I made sure my urbit was the latest, redownloading it from urbit.org. It's currently 2.1.

2. I ran `./urbit -F zod`.

3. I let it compile and continued.

4. I ran `npx clear-npx-cache` just in case I had old copies of the create-landscape-app wizard lying around. Then I ran `npx @urbit/create-landscape-app`.

5. For the wizard, I set my app to `tasks` and my ship location to `http://localhost:80`.

6. I saw the ship was finished, so I went to the generated folder, `cd ui` and `npm i && npm run dev`. It pointed me to `http://127.0.0.1:5173/apps/tasks/`. I went there, and saw the page mounted, but no apps, since I hadn't signed in yet.

7. I went direct to `http://127.0.0.1:5173/` and signed in.

8. I went back to `http://127.0.0.1:5173/apps/tasks/` and the apps were there, no CORB issue.

Just ran through these instructions and got the same result (no issues).

@elizasviel
Copy link

Ran through these steps and on step 6 I get stuck

12:12:25 AM [vite] http proxy error at /~/scry/docket/charges.json:
Error: connect ECONNREFUSED ::1:80
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16)

http://localhost:5173/ gives me a 500 error

@matildepark
Copy link
Contributor

Are you running your ship on localhost:80? It is often :8080 on Linux.

@elizasviel
Copy link

Yes, confirmed, when I boot ship, it prints: http: web interface live on http://localhost:80

@elizasviel
Copy link

quick update: solved the issue; for some reason changing the .env to http://127.0.0.1:80 instead of http://localhost:80 did the trick. I thought these were the same thing but apparently not

@gmcz
Copy link

gmcz commented May 7, 2023

I can confirm that I also ran into this issue on Linux, starting from a complete blank-slate.

for some reason changing the .env to http://127.0.0.1:80 instead of http://localhost:80 did the trick

Being on linux, I had http://localhost:8080 and can confirm that switching to http://127.0.0.1:8080 resolved the issue for me as well.

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

5 participants