View Full Version : Error enabling Sencha Inspector

7 Jan 2017, 3:40 PM
First time I enable the 'Sencha Inspector' checkbox in Fiddle, and the result is that the Fiddle won't run and this error is presented:

"msg": "Cannot read property 'replace' of undefined",
"stack": [
"TypeError: Cannot read property 'replace' of undefined",
" at assets.forEach.asset (/usr/src/app/node_modules/sencha-fiddle/Fiddle.js:204:44)",
" at Array.forEach (native)",
" at Fiddle.parseAssets (/usr/src/app/node_modules/sencha-fiddle/Fiddle.js:202:20)",
" at Fiddle._run (/usr/src/app/node_modules/sencha-fiddle/Fiddle.js:156:12)",
" at process._tickCallback (internal/process/next_tick.js:103:7)"
"success": false
Any idea?

9 Jan 2017, 5:42 AM
This should be fixed now.

9 Jan 2017, 12:46 PM
Yes it has been fixed, thanks!

By the way, thanks for Fiddle and the recent upgrade. I like it very much!

9 Jan 2017, 12:50 PM
Thanks Richard. If you have any ideas to make it better, I'm all ears! (course when I have time to implement :D )

9 Jan 2017, 1:28 PM
Well, here are the first three things I can think of:

1. I still miss the View My Fiddles shortcut in the top right dropdown. I know how to find them using the Search option, but that shortcut was just so convenient.

2. Search is too slow, up to the point where it gives up and only a blank result is shown due to a timeout. Especially for common single word search terms like 'store'.

3. When running a Fiddle in a new tab/window, I prefer to see a permanent URL like https://fiddle.sencha.com/fiddle/1nsu/preview instead of https://fiddle.sencha.com/run?_dc=1483997000492

9 Jan 2017, 4:36 PM
2) currently (and the way Fiddle 1 was) we use db full text searching which is why it's slow. I search for my stuff all the time so searching for my username and something in the title is lightening fast because the username narrowed it down.

We do have a search project in the pipelines but no ETA. There are a couple steps to this and am awaiting on IT to solve their bit first before I can add fiddle as a facet.

3) the way Fiddle runs is it collects the code in the editor tabs and tree panel and then does a form submit into the iframe or new window. Since you can run code without saving it, using the /fiddle/abc/preview route then isn't usable for all cases so having a permanent URL isn't possible then. I also don't see the benefit of one URL vs the other when running code?

10 Jan 2017, 9:45 AM
3) Again, convenience. For example, to preview a specific Fiddle on a phone or iPad. In Safari it takes just one gesture and a single tap to open on my iPad a URL that is already open on my iMac/MacBook. I prefer that to hand typing the URL, and having to remember the exact syntax of the preview URL.
But I also understand the issue of unsaved changes. Maybe the saved preview link can be put somewhere inside Fiddle to get the same result.

It's like you said in your Fiddle 2 presentation at SenchaCon: "a small change can make a world of a difference for a customer" (if I recall correctly). :-)

10 Jan 2017, 11:20 AM
It's like you said in your Fiddle 2 presentation at SenchaCon: "a small change can make a world of a difference for a customer" (if I recall correctly). :-)

Don't use my words against me! lol

So here is something I was thinking. The /fiddle/abc/preview will send a GET request to load the saved fiddle source that will run (it simply returns HTML with some <script>/<link>/etc). So if in the Fiddle app you are playing around with code and running the code, if it's a saved fiddle then instead of POSTing to /run I could POST to /fiddle/abc/preview and handle it the same way I POST to /run . I wouldn't see any reason a POST to /fiddle/abc/preview would mean to run the saved fiddle.

10 Jan 2017, 12:52 PM
Solid plan! That should do it and I can't think of any downsides there.