Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Linux: live preview highlighting doesn't work in Sprint 30 #5050

Closed
blazindrop opened this issue Sep 4, 2013 · 23 comments
Closed

Linux: live preview highlighting doesn't work in Sprint 30 #5050

blazindrop opened this issue Sep 4, 2013 · 23 comments
Assignees

Comments

@blazindrop
Copy link

I see live preview highlighting is in the release notes for Sprint 30 with the caveat it's not stable. I'm reporting this issue because it does not work at all.

I'm using Google Chrome 29.0.1547.65 on Ubuntu 12.10. My uname string:

Linux ubuntu12 3.5.0-39-generic #60-Ubuntu SMP Tue Aug 13 18:33:05 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

I do have google chrome launched from the command line using:

google-chrome --remote-debugging-port=9222

Steps to reproduce:

  1. Open brackets
  2. Open an existing file. Click the live preview button in the top right (lightning bolt icon).
  3. Chrome opens a new tab with the file you're "live previewing" (no errors)
  4. Hover over an HTML element in the source view in Brackets; observe there's no highlighting in the corresponding Chrome window

What else can I do to help troubleshoot?

@jasonsanjose
Copy link
Member

@blazindrop do you have the Theseus extension installed? Theseus will override our default behavior and you will lose live preview highlighting. If it is installed, you can disable it from the menu File > Enable Theseus.

@blazindrop
Copy link
Author

@jasonsanjose I don't - here are the extensions I have enabled:

brackets-code-folding (thehogfather)
brackets-git-info (couzteau)
JSHint (cfjedimaster)

Is there any verbose option I can run Brackets with to get more details? Thanks!

@blazindrop
Copy link
Author

I just reopened Chrome (didn't have remote debugging on) using the same command in my original post, opened test.html (can see the contents in the screenshot below) and clicked live development. The page loaded but then after about 10 seconds I got this error:

image

@ghost ghost assigned jasonsanjose Sep 4, 2013
@jasonsanjose
Copy link
Member

@blazindrop have you tried closing Chrome before launch live preview? There's a known issue with killing chrome if it's currently running.

@blazindrop
Copy link
Author

Yes that "Live Preview Error" dialog happens after live preview successfully connects (e.g. the lightning bolt is orange), which makes it interesting. I didn't try launching live preview with no chrome instance running, though, but I'll try that tomorrow when I'm back in Ubuntu. Thanks!

@ghost
Copy link

ghost commented Sep 5, 2013

It's working, but has to close the chrome

@blazindrop
Copy link
Author

Starting from scratch now..

  1. Opened brackets (Theseus disabled)
  2. Opened simple test HTML file, clicked live preview. At first when I did this it said chrome had to be relaunched with debugging enabled. The funny part is chrome wasn't running!
  3. At first chrome opened this URL file:///opt/brackets/www/LiveDevelopment/launch.html and was hanging for a long time. I closed/reopened brackets and chrome.
  4. Clicked live preview again, this time no hang like above item and my test HTML file was opened
  5. Hovered over P tag and contents and no highlighting.

@jasonsanjose
Copy link
Member

Hover? You need to move the cursor to the tag or tag contents. Hopefully that is the only issue. 😄

If you still have issues, try restarting from scratch and when you hit the error again open a new tab to http://localhost:9234 to open dev tools for Brackets.

@blazindrop
Copy link
Author

Sorry, not hover. When I put the cursor inside my P tags there's no highlighting. I can't get the live preview error to come up anymore but here's what's in http://localhost:9234 when I click the file that I'm live previewing:

brackets_console

@jasonsanjose
Copy link
Member

The Failed to load resource error definitely indicates that Chrome is not running (or could not be started) with --remote-debugging-port=9222.

I don't suppose you can record a video/screencast to make sure there isn't something else I may be missing?

@dalanmiller
Copy link

I'm also having this same issue. At first I was getting the same error as blazindrop above and then I killed all the Chrome processes and then restarted Brackets and then opened Chrome by clicking on the Live Preview menu option.

Everything seems to be fine until I edit and try to save the test index.html file.

screenshot from 2013-09-16 11 24 25

I also have no plugins installed.

@nayosx
Copy link

nayosx commented Sep 16, 2013

your have permission of write on this directory
(/opt/brakets/samples/root/Getting started)??, sorry for my english

2013/9/15 Daniel Alan Miller [email protected]

I'm also having this same issue. At first I was getting the same error as
blazindrop above and then I killed all the Chrome processes and then
restarted Brackets and then opened Chrome by clicking on the Live Preview
menu option.

Everything seems to be fine until I edit and try to save the test
index.html file.

[image: screenshot from 2013-09-16 11 24 25]https://f.cloud.github.com/assets/863286/1146603/f9aaaebe-1e72-11e3-88d1-0f51d70f3355.png

I also have no plugins installed.


Reply to this email directly or view it on GitHubhttps://github.com//issues/5050#issuecomment-24485573
.

@dalanmiller
Copy link

@nayosx Thank you! I'm quite ashamed I didn't think of that.

I then ask why the sample .html file is then auto installed to a location which isn't user writeable by default?

@nayosx
Copy link

nayosx commented Sep 16, 2013

I recommend you change the directory as shown in pictures

[image: Imágenes integradas 1]

2013/9/15 Daniel Alan Miller [email protected]

@nayosx https://github.com/nayosx Thank you! I'm quite ashamed I didn't
think of that.

I then ask why the sample .html file is then auto installed to a location
which isn't user writeable by default?


Reply to this email directly or view it on GitHubhttps://github.com//issues/5050#issuecomment-24488113
.

@ghost
Copy link

ghost commented Sep 16, 2013

@dalanmiller Open terminal, run ...

chmod 777 -R /path/to/directory/

Hug

@jasonsanjose
Copy link
Member

@dalanmiller Sounds like a different bug than the original post. I'll file a new bug about the permissions on the getting started page. Thanks!

@jasonsanjose
Copy link
Member

@dalanmiller filed your bug as #5225

@thefirstofthe300
Copy link
Contributor

@blazindrop

Can you try pkill chrome in your terminal (or chromium if you are using that instead) and then attempt to live preview with Chrome in the killed state. Chrome should launch and work. I am not sure if that will fix the live preview highlighting.

@thefirstofthe300
Copy link
Contributor

@jasonsanjose @blazindrop

I think I figured out what is wrong. There appears to be a quirk in Live Preview. When I launch LP for the first time, there is NO highlighting of the tag that my cursor is in. As soon as the cursor enters a new tag, highlighting kicks in and works just fine.

@blazindrop

Can you try the steps:

  1. In the terminal: pkill chrome.
  2. Launch Live Preview.
  3. Move cursor to any other tag than the one selected.

@jasonsanjose
Copy link
Member

Can anyone reproduce this with Sprint 33 or 34? We changed how Chrome/Chromium is launched on Linux to use a separate profile, details here adobe/brackets-shell#342.

@klbinns
Copy link

klbinns commented Dec 7, 2013

I am using Sprint 34.1 on Ubuntu 13.10.

When I run Live Preview on an HTML file from my Open Folder tree, I have not been able to reproduce any error messages described above, and things tend to be working as expected. Hover selection and real time updates are working. If I were to switch to a different HTML file within the Open Folder tree, the LP tab closes and immediately opens a LP tab for the HTML file I just switched to.

However, if I create a new HTML file and save it somewhere else on the file system, LP does not seem to work. The LP tab does come up and I can see the current state of my HTML file, but there is no highlighting and updates to the file are only shown in the LP tab after a save.

Let me know if you need me to capture any specific information from the developer tools.

@peterflynn
Copy link
Member

@klbinns That's currently the expected behavior, but we should probably improve the error message wording or otherwise tweak the UI to make that more obvious. Can you file a new bug on this so we can sort it out? Thanks!

@jasonsanjose
Copy link
Member

The original issue filed by @blazindrop sounds like #5975. Live preview only works for files in the current project (the open folder). Closing this as a duplicate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants