# Error: Could not find a canister id to forward to

**URL:** <https://forum.dfinity.org/t/error-could-not-find-a-canister-id-to-forward-to/6302>\
**Category:** Language Support\
**Tags:** Education\
**Created:** [August 5, 2021, 2:24am UTC](https://forum.dfinity.org/t/error-could-not-find-a-canister-id-to-forward-to/6302 "2021-08-05T02:24:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shakespeare1212](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@shakespeare1212](https://forum.dfinity.org/u/shakespeare1212)\
**Post date:** [August 5, 2021, 2:24am UTC](https://forum.dfinity.org/t/error-could-not-find-a-canister-id-to-forward-to/6302/1 "2021-08-05T02:24:04Z")

</div>

When trying to follow the beginning examples from this youtube video:

[![](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/5/575f60ade3fcf32716a24d3c00b337fbaec00cc2.jpeg "Deploying Your First Dapp") ](https://www.youtube.com/watch?v=yqIoiyuGYNA)

I got as far as this time stamp in the video, and everything went as expected. But then when trying to run the web page I get "no such file or directory.

Admins-MacBook-Pro:hello admin$ [http://localhost:8000/?canisterId=ic:ryjl3-tyaaa-aaaaa-aaaba-cai](http://localhost:8000/?canisterId=ic:ryjl3-tyaaa-aaaaa-aaaba-cai)

-bash: [http://localhost:8000/?canisterId=ic:ryjl3-tyaaa-aaaaa-aaaba-cai:](http://localhost:8000/?canisterId=ic:ryjl3-tyaaa-aaaaa-aaaba-cai:) No such file or directory

I started chrome manually and put in my address but from the browser I get the error:

Could not find a canister id to forward to.

I tried to sub in each canister ID that was generated. It seems there is not a UI canister that does not appear the the video’s code, but I still get the same error:

Please help.  
shakespeare1212  
Family Game Night Forever

BTW: I just tried to invoke the greet function from the terminal and it works.

Admins-MacBook-Pro:hello admin$ sudo dfx canister call hello greet Jimbo

Password:

(“Hello, Jimbo!”)

---

<div class="post-metadata">

**Author:** ![GLdev](https://avatars.discourse-cdn.com/v4/letter/g/4bbf92/32.png) [@GLdev](https://forum.dfinity.org/u/GLdev)\
**Post date:** [August 5, 2021, 4:38am UTC](https://forum.dfinity.org/t/error-could-not-find-a-canister-id-to-forward-to/6302/2 "2021-08-05T04:38:29Z")

</div>

Hey there, welcome!

If you’d like to “run” the webpage from a terminal I’d assume you need to run the browser first.

```auto
chromium https://google.com

```

As for your link, try deleting the characters “ic:”. My links look like this:

```auto
http://localhost:8000/?canisterId=ryjl3-tyaaa-aaaaa-aaaba-cai

```

Also, make sure the ID of the canister is correct by running

```auto
dfx canister id hello

```

---

<div class="post-metadata">

**Author:** ![rbolog](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/rbolog/32/239_2.png) [@rbolog](https://forum.dfinity.org/u/rbolog)\
**Post date:** [August 5, 2021, 7:44am UTC](https://forum.dfinity.org/t/error-could-not-find-a-canister-id-to-forward-to/6302/3 "2021-08-05T07:44:33Z")

</div>

Hi,  
In complement to the previous answer, I use the _./dfx/local/canister\_ids.json_ file to know the IDs of my canisters.

---

<div class="post-metadata">

**Author:** ![navalega0109](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/navalega0109/32/11700_2.png) [@navalega0109](https://forum.dfinity.org/u/navalega0109)\
**Post date:** [July 19, 2023, 10:40am UTC](https://forum.dfinity.org/t/error-could-not-find-a-canister-id-to-forward-to/6302/4 "2023-07-19T10:40:54Z")

</div>

@enzo After following your instruction every time I’m getting below the error.  
`open http://localhost:8080/?canisterId=rrkah-fqaaa-aaaaa-aaaaq-cai`

```auto
Warning: unknown mime-type for "http://localhost:8080/?canisterId=rrkah-fqaaa-aaaaa-aaaaq-cai" -- using "application/octet-stream"
Error: no such file "http://localhost:8080/?canisterId=rrkah-fqaaa-aaaaa-aaaaq-cai"

```

But if I do the `dfx start` `dfx deploy` `npm start` not getting any error but browser asking me username and password. I tried ubuntu username password but it did not worked.

Please check stack over flow link for my detailed issue with screen shot : - [Stack\_Question](https://stackoverflow.com/questions/76718920/issue-while-running-http-localhost8080-icp-application-but-it-asking-me-us)  
Please answer my question to get me started.  
I also referred to given link :- from @anon74414410  
[Hello\_World](https://forum.dfinity.org/t/coding-with-kyle-ic-avatar/6214)

---

<div class="post-metadata">

**Author:** ![anon74414410](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@anon74414410](https://forum.dfinity.org/u/anon74414410)\
**Post date:** [July 31, 2023, 10:41pm UTC](https://forum.dfinity.org/t/error-could-not-find-a-canister-id-to-forward-to/6302/5 "2023-07-31T22:41:15Z")

</div>

my guess would be that you’re following an example that uses the old port for `dfx`, with a newer version that uses port `4943` by default.

You can fix this by changing the code, or by configuring your `networks.json` file to use port `8080`.

```auto
{
  "local": {
    "bind": "127.0.0.1:8080",
    "type": "ephemeral",
    "replica": {
      "subnet_type": "application"
    }
  }
}

```

You can check the path for this file by running `dfx info networks-json-path`. You may need to create the file if it doesn’t already exist.

---

<div class="post-metadata">

**Author:** ![navalega0109](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/navalega0109/32/11700_2.png) [@navalega0109](https://forum.dfinity.org/u/navalega0109)\
**Post date:** [August 8, 2023, 1:31pm UTC](https://forum.dfinity.org/t/error-could-not-find-a-canister-id-to-forward-to/6302/6 "2023-08-08T13:31:40Z")

</div>

No Actually If I use the frontend url generated by dfx then no issue. I was using `[Preformatted text](http://localhost:8080/)` url which is not required.

Thanks anyways 🙂
