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

"Show Me" not working on Windows #76

Open
neighthan opened this issue Aug 18, 2018 · 13 comments
Open

"Show Me" not working on Windows #76

neighthan opened this issue Aug 18, 2018 · 13 comments
Assignees
Labels

Comments

@neighthan
Copy link

@neighthan neighthan commented Aug 18, 2018

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.

@TekSiDoT
Copy link

@TekSiDoT TekSiDoT commented Aug 21, 2018

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?

@felixrieseberg
Copy link
Member

@felixrieseberg felixrieseberg commented Aug 22, 2018

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?

@TekSiDoT
Copy link

@TekSiDoT TekSiDoT commented Aug 23, 2018

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?

@neighthan
Copy link
Author

@neighthan neighthan commented Aug 23, 2018

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.

@felixrieseberg felixrieseberg self-assigned this Dec 17, 2018
@felixrieseberg
Copy link
Member

@felixrieseberg felixrieseberg commented Dec 17, 2018

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.

@blurymind
Copy link

@blurymind blurymind commented Dec 28, 2018

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

@davidsharp
Copy link

@davidsharp davidsharp commented Jan 16, 2019

Seeing this problem in v0.4.2 on macOS too

@chm-dev
Copy link

@chm-dev chm-dev commented Jan 18, 2019

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.

@iahmedani
Copy link

@iahmedani iahmedani commented Jan 23, 2019

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

@felixrieseberg
Copy link
Member

@felixrieseberg felixrieseberg commented Jan 27, 2019

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.

@neminovno
Copy link

@neminovno neminovno commented Feb 14, 2019

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

@dalDevelo
Copy link

@dalDevelo dalDevelo commented Feb 16, 2019

Issues also persist in macOS version 0.5.0

@dalDevelo
Copy link

@dalDevelo dalDevelo commented Feb 25, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

9 participants