Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript issues with the Coredata browser #140

Open
GabrielCartier opened this issue Feb 4, 2015 · 3 comments
Open

Javascript issues with the Coredata browser #140

GabrielCartier opened this issue Feb 4, 2015 · 3 comments
Labels
bug devtools Issues affecting the Chrome dev tools used by PonyDebugger

Comments

@GabrielCartier
Copy link

Not sure when this started exactly but I can't seem to be browsing my coredata entity as I'm getting javascript error. I didn't debug so much but I got to see that whenever I press and entity in the IndexedDB tree, I get these javascript errors:

Uncaught TypeError: undefined is not a function treeoutline.js:1120
TreeElement.isEventWithinDisclosureTriangle treeoutline.js:1120
TreeElement.treeElementMouseDown treeoutline.js:806
Uncaught TypeError: undefined is not a function treeoutline.js:1120 
TreeElement.isEventWithinDisclosureTriangle treeoutline.js:1120 
TreeElement.treeElementToggled treeoutline.js:819 

This actually prevents me from accessing any entities from Chrome. From Safari, I can get a bit further but I still can't access the entities. I didn't get the javascript error.

I inspected the javascript a bit and found out that treeoutline.js has a comment saying:
// FIXME: We should not use getComputedStyle(). For that we need to get rid of using ::before for disclosure triangle. (http://webk.it/74446)

Let me know if you need any more info or stack trace.

@bsidoti
Copy link

bsidoti commented Mar 31, 2015

I'm getting the same thing

@mark-anders
Copy link

Hi, I was just getting the same thing and had a giggle when the Chrome debugger stopped at the line below the fixme. :-) I have still not gotten Chrome working, but I did get Safari working. Note - I had not tried Safari prior to doing what I'm going to describe, so try that first. However, here's the complete set of things I did:

  1. First, I upgraded my Podfile to pull in 0.4.3 as I was still using 0.4.0.
  2. I then did an upgrade of my server by doing the following: (from PonyDebugger/README):
  # activate your virtualenv
  source ~/Library/PonyDebugger/bin/activate
  # update the ponyd source
  pip install -U -e git+https://github.com/square/PonyDebugger.git#egg=ponydebugger
  # updates chrome dev tools source
  ponyd update-devtools     

Note that upgrading the source via pip failed due to the pybonjour not being found. However the last line updating the dev tools worked.

After that, I tried it in Chrome, saw it didn't work, and found a note in the "Known Issues" that mentioned Chrome having a problem and recommending Safari.

@gfpacheco
Copy link

Open ~/Library/PonyDebugger/src/devtools/treeoutline.js and change the following lines:

// lines 1120 and 1121
var paddingLeftValue = window.getComputedStyle(this._listItemNode).getPropertyCSSValue("padding-left");
var computedLeftPadding = paddingLeftValue ? paddingLeftValue.getFloatValue(CSSPrimitiveValue.CSS_PX) : 0;

For these:

var paddingLeftValue = window.getComputedStyle(this._listItemNode).paddingLeft;
var computedLeftPadding = parseFloat(paddingLeftValue, 10);

Re-run ponyd

@asmallteapot asmallteapot added bug devtools Issues affecting the Chrome dev tools used by PonyDebugger labels Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug devtools Issues affecting the Chrome dev tools used by PonyDebugger
Projects
None yet
Development

No branches or pull requests

5 participants