Live preview doesn't work on private projects

preview

#1

I can’t get live preview working for private projects, even though it works for public projects.

To reproduce:

  1. Create a private project using the HTML5 template
  2. Open the hello-world.html file.
  3. Click Preview > Live Preview File (hello-world.html)

If I press Run and then “Preview Running Application” I get the same error. However if I open the URL in a new tab it works.

The same exact steps on public projects do work.

I’m running Chrome Version 51.0.2704.103 (64-bit) on a Chromebook. I have uBlock and ZenMate running. Disabling those extensions has no effect.


#2

Could you check what errors are displayed in the developer console?


#3

I get a ERR_TOO_MANY_REDIRECTS:

workspace-html5.js:17827
GET https://c9users.io/_user_content/authorize?redirect=https%3A%2F%2Fpreview.c…lo-world.html%3F_c9_id%3Dlivepreview0%26_c9_host%3Dhttps%3A%2F%2Fide.c9.io 
net::ERR_TOO_MANY_REDIRECTS
loadPreviewSession @ workspace-html5.js:17827
iframe.contentWindow.onclick @ workspace-html5.js:17897


#4

This can happen when third party cookies are not allowed.
SInce preview is served from c9users.io domain and the ide is on c9.io domain, Cloud9 needs to set login cookie from the latter to the former
Adding [*.]c9users.io to the exception list would fix this issue https://support.google.com/chrome/answer/3123708?p=settings_manage_exceptions&rd=1


#5

Yes, that worked! I do in fact block third-party cookies. Adding [*.]c9users.io to the exception list fixed the issue.

Awesome!


#6

[*.]c9users.io Not working in my case , ERR_TOO_MANY_REDIRECTS: in both chrome and c9 browser , unable to run preivew,