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

Problems developing on Windows #45

Closed
reflog opened this issue Jan 27, 2017 · 14 comments
Closed

Problems developing on Windows #45

reflog opened this issue Jan 27, 2017 · 14 comments
Labels

Comments

@reflog
Copy link

reflog commented Jan 27, 2017

Hi!
First of all - congrats on an awesome project!
I wanted to contribute a plugin to support results from Everthing by voidtools (a great file indexer on Windows) and wrote a plugin https://github.com/reflog/cerebro-plugin-everything
But I cannot test it well, since the instructions are very Mac oriented and don't work in Windows land.
Opening dev tools doesn't work, since they are shown like this:
image
And there is no way (that I could find) to see console output from my plugin.

What's your recommended way of debugging on Windows?
Also - how can I mark my plugin as 'windows only' so that other platform users would avoid it?

@Kageetai
Copy link
Contributor

Hey, to open dev tools properly, open the menu on the upper left and pop them out as a separate window.

@reflog
Copy link
Author

reflog commented Jan 28, 2017 via email

@Kageetai
Copy link
Contributor

Oh sorry I meant the upper-right and the men with the three dots there

@reflog
Copy link
Author

reflog commented Jan 28, 2017 via email

@KELiON
Copy link
Collaborator

KELiON commented Jan 30, 2017

@reflog yep, looks like it is a bug. To open dev-tools you can try to type something (to see some results in cerebro window), and open dev tools after that. In this window is bigger and you can resize it, so you can see dev tools (and try to detach dev tools windows from cerebro windows by clicking ... button).

Also, would be cool to fix it for other users. There is an option for openDevTools in Cerebro and we should always open it in detached window: openDevTools('detach'). There are only two calls for that function: one and two. Would be awesome if you or someone else can fix it in PR

@reflog
Copy link
Author

reflog commented Jan 30, 2017

@KELiON - thanks, that worked! Managed to undock the devtools and now able to see the problems.

To communicate with Everything, my plugin is using node-ffi, which is compiled natively and has problems starting under Electron. Here's the log:

Plugin: cerebro-plugin-everything
Path: C:\Users\reflog\AppData\Roaming\Cerebro\plugins\node_modules\cerebro-plugin-everything...
Error loading
Error: Could not locate the bindings file. Tried:
 → d:\dev\cerebro-plugin-everything\build\binding.node
 → d:\dev\cerebro-plugin-everything\build\Debug\binding.node
 → d:\dev\cerebro-plugin-everything\build\Release\binding.node
 → d:\dev\cerebro-plugin-everything\out\Debug\binding.node
 → d:\dev\cerebro-plugin-everything\Debug\binding.node
 → d:\dev\cerebro-plugin-everything\out\Release\binding.node
 → d:\dev\cerebro-plugin-everything\Release\binding.node
 → d:\dev\cerebro-plugin-everything\build\default\binding.node
 → d:\dev\cerebro-plugin-everything\compiled\6.5.0\win32\x64\binding.node
    at r (d:\dev\cerebro-plugin-everything\dist\index.js:1:16695)
    at Object.<anonymous> (d:\dev\cerebro-plugin-everything\dist\index.js:1:783)
    at r (d:\dev\cerebro-plugin-everything\dist\index.js:1:194)
    at Object.<anonymous> (d:\dev\cerebro-plugin-everything\dist\index.js:1:26444)
    at r (d:\dev\cerebro-plugin-everything\dist\index.js:1:194)
    at Object.<anonymous> (d:\dev\cerebro-plugin-everything\dist\index.js:1:36093)
    at r (d:\dev\cerebro-plugin-everything\dist\index.js:1:194)
    at d:\dev\cerebro-plugin-everything\dist\index.js:1:570
    at Object.<anonymous> (d:\dev\cerebro-plugin-everything\dist\index.js:1:580)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)

Do you have any tips on how to package my module correctly so it would work under Cerebro? This is my first attempt at Electron plugin, so it's a new territory for me...

Thanks in advance!

@KELiON
Copy link
Collaborator

KELiON commented Jan 30, 2017

@reflog can you check that this package installed and works? You can just run node from d:\dev\cerebro-plugin-everything\ and try to require it.

@reflog
Copy link
Author

reflog commented Jan 30, 2017 via email

@KELiON
Copy link
Collaborator

KELiON commented Jan 30, 2017

@reflog ok, another question: can you check that your local node/npm version are the same, that current electron version uses?

Also, you can try to rebuild your native extensions for electron's node/npm by command:

npm rebuild --runtime=electron --target=1.4.12 --disturl=https://atom.io/download/electron --abi=50

@reflog
Copy link
Author

reflog commented Jan 30, 2017

Yea, that's the path I'm on right now, tried doing the node-gyp rebuild, but after it's done the bindings are at:
c:\Users\reflog\AppData\Roaming\Cerebro\plugins\node_modules\cerebro-plugin-everything\node_modules\ffi\build\Release\ffi_bindings.node

And as you can see from the log I posted before, it's not where Electron is looking for them :(
Any ideas?

@KELiON
Copy link
Collaborator

KELiON commented Jan 30, 2017

@reflog hm, no idea. Maybe this can help?

@KELiON
Copy link
Collaborator

KELiON commented Feb 11, 2017

@reflog did you have any success with your plugin? Do you need any help?

@reflog
Copy link
Author

reflog commented Feb 12, 2017

Well, I've tried following all the steps in the guide that you've referenced with no luck, same result, cannot find the bindings.
If someone more experienced than me in the world of electron-win32-bindings would like to take a stab at it - that would be awesome, the repo is there and waiting :)

@ogustavo-pereira
Copy link
Member

I believe this problem has already been solved with the new version. @dubisdev

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

No branches or pull requests

4 participants