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

Live Preview with user-specified base url fails with Chrome 27 #3402

Closed
jasonsanjose opened this issue Apr 10, 2013 · 11 comments
Closed

Live Preview with user-specified base url fails with Chrome 27 #3402

jasonsanjose opened this issue Apr 10, 2013 · 11 comments
Assignees
Milestone

Comments

@jasonsanjose
Copy link
Member

Description TBD. Based on Joel's report here #3372 (comment)

@joelrbrandt
Copy link
Contributor

Steps to repro:

  1. Install Chrome Beta (reproed on 27.0.1453.15)
  2. Set up a local server to serve the contents of the "citrus completed" folder at http://localhost:8080/
  3. Open the "citrus completed" folder in Brackets, and set the Live Development base url to http://localhost:8080/
  4. Close Chrome
  5. Open "index.html" in Brackets and click the live dev button

Expected:

Live development works normally.

Actual:

The correct url (http://localhost:8080/index.html) does open in the browser. However, the live dev connection never fully connects. The lightning bolt stayed half-colored for awhile, then goes to grey. When I switch to a CSS file, the lightning bolt turns fully solid yellow. However, it doesn't seem to actually be connected (changes do not affect the browser).

Additionally, the following errors appear in the console:

Screen Shot 2013-04-10 at 5 29 47 AM

@jasonsanjose
Copy link
Member Author

Investigating now.

If I follow @joelrbrandt's 5 steps, then open dev tools, I see 2 Failed to load resource http://127.0.0.1:9222/json error messages. When I move focus from Chrome 27 to Brackets, I get 2 of the same message:

Inspected frame has gone 
Object
code: -32000
message: "Inspected frame has gone"
__proto__: Object
 /C:/Program%20Files%20(x86)/Brackets%20Sprint%2022/dev/src/LiveDevelopment/LiveDevelopment.js:478
_onError /C:/Program%20Files%20(x86)/Brackets%20Sprint%2022/dev/src/LiveDevelopment/LiveDevelopment.js:478
f.event.dispatch jquery-1.7.min.js:3
f.event.add.h.handle.i jquery-1.7.min.js:3
f.event.trigger jquery-1.7.min.js:3
f.fn.extend.triggerHandler jquery-1.7.min.js:3
_onMessage

@joelrbrandt do you have the experimental flag enabled for LiveDevelopment? I haven't been able to reliably reproduce the tail end of your error log with Runtime.callFunctionOn errors.

@pthiess
Copy link
Contributor

pthiess commented Apr 10, 2013

@jasonsanjose This is high priority, but we think the risk of a release before the end of next sprint is considerably low, see: http://www.chromium.org/getting-involved/dev-channel. "Beta channel: If you are interested in seeing what's next, with minimal risk, Beta channel is the place to be. It's updated every week roughly, with major updates coming every six weeks, more than a month before the Stable channel will get them."
Moving to Sprint 24.

@jasonsanjose
Copy link
Member Author

Sounds good.

I'll stop investigating for now. I did notice that in LiveDevelopment doLaunchAfterServerReady(), I only logged one retry for Inspector.connectToURL instead of the expected 6 retries. For some unknown reason, live development fails to connect and is left in an unstable state resulting unpredictable errors like the ones @joelrbrandt and I are seeing.

I've only been able to reproduce this bug by specifying a base URL. It seems odd that it doesn't reproduce with the static server. So far, I'm guessing this is a timing problem with the remote debugging connection and it shouldn't make a difference what URL we're requesting.

@njx
Copy link

njx commented Apr 12, 2013

On my Mac with Chrome 27.0.1453.47 beta, I can't get Live Development to work even with the static server whether Chrome is closed or open; the tab opens properly, but the lightning bolt stays stuck halfway, and eventually turns off. If I start it with Chrome closed, it looks like it can't read http://127.0.0.1:9222/json. If I try again, it seems to read that properly, but then I get similar errors as above (about objectId not being set).

@jasonsanjose
Copy link
Member Author

I've narrowed this down. The Live Preview connection doesn't complete because agents are failing to load. Investigating.

@jasonsanjose
Copy link
Member Author

@joelrbrandt Can you retest with my branch jasonsanjose/issue-3402?

@redmunds
Copy link
Contributor

I'm having a problem in Chrome Version 26.0.1410.64 m (not 27 beta). CSS updates correctly while typing and I can update (and save) HTML, but only once. After that non of my HTML edits are reflected in Chrome (but CSS still updates). This happens with both builtin node js server and Base Url (with local wamp server).

In console, I am seeing lots of errors: Failed to load resource http://127.0.0.1:9222/json and ConsoleAgent: Port error: Could not establish connection. Receiving end does not exist. in chromeHidden.Port.dispatchOnDisconnect:17

@jasonsanjose
Copy link
Member Author

@redmunds are you using my branch for pull request #3442? I wasn't sure if you meant to comment there or here in the issue.

@redmunds
Copy link
Contributor

@jasonsanjose Ooops. Yes, I'm running you branch. I meant to put this comment in the pull request.

@redmunds
Copy link
Contributor

@jasonsanjose reported and fixed it, and @joelrbrandt isn't around this sprint, so closing.

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

5 participants