fiddle icon indicating copy to clipboard operation
fiddle copied to clipboard

"Show Me" not working on Windows

Open neighthan opened this issue 6 years ago • 13 comments

I just downloaded the executable from here. Running it pops up the blank Electron Fiddle window. When I select any of the options from the "Show Me" menu, though, (e.g. Show Me > Electron APIs > App), nothing happens. I assumed this would pull up some simple demo project that showcases the named feature? Are there any other setup steps that I need to take besides just running the executable?

Actually, it might be more than just "Show Me" - I tried File > New Fiddle, and I'm still left with the same blank window (just the title bar with, e.g., the button to close the window and the tool bar with File, etc.).

This is on Windows 10. I'm happy to provide any additional information that might be helpful / test things.

neighthan avatar Aug 18 '18 17:08 neighthan

Reproducible in latest Win10.

I took a look at the respective source code and suspect this __Dirname call; I remember webpack having similar issues with production Electron applications.

However, building with npm run make on Windows with the latest code version works just fine (both the resulting executable as well as the squirrel installer), so I guess this might be a result of building the Win32 executable on a non Win32 machine?

TekSiDoT avatar Aug 21 '18 10:08 TekSiDoT

Interestingly enough, I spent a lot of time in Windows 10 and don't think I understand what could break. If you open the developer tools, do you see anything in the console?

felixrieseberg avatar Aug 22 '18 02:08 felixrieseberg

I took a closer look at the problem. While the dev console itself does not offer any hints on whats happening, getFile in templates.ts catches the following error:

"Error: ENOENT, static\templates\DesktopCapturer\renderer.js not found in C:\Users\hab\AppData\Local\electron-fiddle\app-0.1.0\resources\app.asar
    at notFoundError (ELECTRON_ASAR.js:115:19)
    at fs.readFile (ELECTRON_ASAR.js:518:16)
    at go$readFile (C:\Users\hab\AppData\Local\electron-fiddle\app-0.1.0\resources\app.asar\node_modules\graceful-fs\graceful-fs.js:73:14)
    at Object.readFile (C:\Users\hab\AppData\Local\electron-fiddle\app-0.1.0\resources\app.asar\node_modules\graceful-fs\graceful-fs.js:70:12)
    at Promise (C:\Users\hab\AppData\Local\electron-fiddle\app-0.1.0\resources\app.asar\node_modules\universalify\index.js:13:12)
    at new Promise (<anonymous>)
    at Object.readFile (C:\Users\hab\AppData\Local\electron-fiddle\app-0.1.0\resources\app.asar\node_modules\universalify\index.js:7:14)
    at s (file:///C:/Users/hab/AppData/Local/electron-fiddle/app-0.1.0/resources/app.asar/dist/app.0908156d.js:22:315)
    at Object.a [as getTemplateValues] (file:///C:/Users/hab/AppData/Local/electron-fiddle/app-0.1.0/resources/app.asar/dist/app.0908156d.js:22:377)
    at <anonymous>"

Additionally (and at least on my win machine), it looks as if the error is also related to specific templates:

⨯ doesn't work ✓ works

App: ⨯ AutoUpdate: ⨯ BrowserView: ✓ BrowserWindow: ✓ Clipboard: ⨯ ContentTracing: ⨯ Cookies: ✓ CrashReporter: ⨯ Debugger: ✓ DesktopCapturer: ⨯

This lead me extracting and comparing both .asar files contents. It looks like capitalization of the templates folders differs, the failing templates align perfectly with this pattern (installed left):

image

While this is probably the cause of the error, I don't really know the reason for the discrepancy, nor why it only happens to some of the folders. Are you building the Win version on a non-Win machine?

TekSiDoT avatar Aug 23 '18 06:08 TekSiDoT

Even the templates you've checked above, like BrowserView, aren't working for me - perhaps there are multiple issues at play? I don't get any new console output when I try to open a Show Me template, but upon loading electron-fiddle I get Fetch Types: Called too soon, deferring a few times (no problem) and then Fetch Types: Failed, dependencies do not exist (from src\renderer\fetch-types.ts:95); is that last message an issue? It's still a warning and not an error.

neighthan avatar Aug 23 '18 17:08 neighthan

I'll fix this today.

@neighthan For what it's worth, that's not an issue at all. That message shows up when we attempt to fetch types and you're offline, types do not exist for your version, or GitHub didn't give us proper types.

felixrieseberg avatar Dec 17 '18 17:12 felixrieseberg

still doesnt work on the latest release guys https://github.com/electron/fiddle/tree/v0.4.1

blurymind avatar Dec 28 '18 19:12 blurymind

Seeing this problem in v0.4.2 on macOS too

davidsharp avatar Jan 16 '19 10:01 davidsharp

It seems like the problem is because of the letter casing. Template folders in asar are camel cased for the most part, but there is toLower() somewhere along the way when creating the path. If they match all works.

chm-dev avatar Jan 18 '19 19:01 chm-dev

Issue persists, I have downloaded latest version but same issue, please advise. below are the log files from developer tools -1548240951258.log -1548240951260.log

iahmedani avatar Jan 23 '19 10:01 iahmedani

Alright, after having taken another look, I'm wondering if we've somehow failed to update or are dealing with another interesting bug.

I'll update the app with more logging to figure out what's actually happening.

felixrieseberg avatar Jan 27 '19 02:01 felixrieseberg

For each Show Me, there is error in console about template files missing. Few of them:

Could not get template file: Error: ENOENT, static\templates\app\index.html not found in C:\Users\fex\AppData\Local\electron-fiddle\app-0.5.0\resources\app.asar Could not get template file: Error: ENOENT, static\templates\app\main.js not found in C:\Users\fex\AppData\Local\electron-fiddle\app-0.5.0\resources\app.asar Could not get template file: Error: ENOENT, static\templates\app\renderer.js not found in C:\Users\fex\AppData\Local\electron-fiddle\app-0.5.0\resources\app.asar Could not get template file: Error: ENOENT, static\templates\browserwindow\index.html not found in C:\Users\fex\AppData\Local\electron-fiddle\app-0.5.0\resources\app.asar

neminovno avatar Feb 14 '19 07:02 neminovno

Issues also persist in macOS version 0.5.0

dalDevelo avatar Feb 16 '19 22:02 dalDevelo

Also appears to be fixed on macOS in v 0.5.1. Not sure why the release notes only refer to the issue being on Windows, it was stated here a couple of times that this was also an issue on macOS.

dalDevelo avatar Feb 25 '19 11:02 dalDevelo