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.

1 Like

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