Live preview not working

I am getting the error while running npm run dev for nextjs project. The live host or local host for IDX is not opening and showing this error:

6 Likes

same here ,did it fix now ?

Same issue when opening the preview link on my phone browser, but it works just fine on my desktop browser. I think there’s something wrong with the url encoding

There’s something wrong with the cookies I guess, as far as I know, idx run the websites to browsers that enables third-party cookies (TPC).

Since chrome (if you will go to the console) said that it will run without TPC, it’ll really affect idx’s performance, hence from the url if you run it

/_workstation/forwardAuthCookie?redirectToken=SAMPLE_TOKEN_VALUE

Maybe we’ll just wait, but I hope they fix it soon

1 Like

Thank god I see this thread, I can view the preview on the IDX but when I click to Open in New Window I see the exact same phrase. I’ve attempted to fix such issue for about 30 mins, delete history, clear cache, create new workspace, reset environment, and try different ports, but nothing worked.

3 Likes

I’m also have this issue. Searching for the error message doesn’t bring this up, since the OP is in an image. Here is the actual error message to help the search results:

Unable to decode current host

2 Likes

Yes, I’ve also done this and I’m still getting the error also.

I can’t use the built-in web preview because I need to prompt the user and that automatically is failing in the built-in web preview tab.

2 Likes

Same here…

Unable to decode current host

2 Likes

Just got the same issue…

Unable to decode current host

on Node/express project

Same here,

  • Web View Extension
  • Gemini
  • npm run dev

all the same

Command ā€˜Gemini: Chat with Gemini’ resulted in an error

command ā€˜aichat.prompt’ not found


Command ā€˜Project IDX: Reload Web Preview’ resulted in an error

command ā€˜monospace.reloadWeb’ not found


Unable to decode current host

2 Likes

Same im getting

Unable to decode current host

1 Like

@all, this issue seems to be caused by cookies. Please try these two options:

  1. Open your IDX account in a different browser.
  2. Clear your cookies, log out of IDX, and then log back in.

Alternatively, you can make the live URL or port public. This will resolve the issue, as the preview site won’t need to validate the cookie.

Please share your updates on whether these solutions work.

2 Likes

i tried it on an incognito page, didn’t work

I am experiencing the same exact issue… tried incognito…different browser… nothing worked

1 Like

I tired that and it did not work

1 Like

Thank you for sharing and how to solve the problem

1 Like

Has anyone managed to solve this?
CC: @kirupac

1 Like

@Avijit_Pal

This worked when I moved to Firefox. However, I ā€œcleared my cookiesā€ for idx.google.com (EDIT: I’ve now tried clearing all google and cloudstation cookies) and all of the embedded sites, signed out (which signed out my entire Google account), restarted the browser (Vivaldi), logged back in and the error persists. Am I supposed to clear all of my google cookies in existence?

have you tried make PORT public? let me know if you face any issue while doing this. You need to click on the IDX icon on the side bar and at the bottom you’ll find the PORT forward settings

Make my port public solves the issue. just clicking on lock icon. :nerd_face:

2 Likes