{"action":"opened","issue":{"url":"https://api.github.com/repos/atom/electron/issues/3528","labels_url":"https://api.github.com/repos/atom/electron/issues/3528/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/3528/comments","events_url":"https://api.github.com/repos/atom/electron/issues/3528/events","html_url":"https://github.com/atom/electron/issues/3528","id":118091417,"number":3528,"title":"electron-prebuilt atom.asar/renderer/lib/init.js: Cannot find module","user":{"login":"szz-dvl","id":6824033,"avatar_url":"https://avatars.githubusercontent.com/u/6824033?v=3","gravatar_id":"","url":"https://api.github.com/users/szz-dvl","html_url":"https://github.com/szz-dvl","followers_url":"https://api.github.com/users/szz-dvl/followers","following_url":"https://api.github.com/users/szz-dvl/following{/other_user}","gists_url":"https://api.github.com/users/szz-dvl/gists{/gist_id}","starred_url":"https://api.github.com/users/szz-dvl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szz-dvl/subscriptions","organizations_url":"https://api.github.com/users/szz-dvl/orgs","repos_url":"https://api.github.com/users/szz-dvl/repos","events_url":"https://api.github.com/users/szz-dvl/events{/privacy}","received_events_url":"https://api.github.com/users/szz-dvl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-20T17:50:23Z","updated_at":"2015-11-20T17:50:23Z","closed_at":null,"body":"Hi!\r\n\r\nI'm trying to build an electron app on a Raspberry Pi. Since the last two days I've been facing the following error, when I start my app as usually, with the binary installed by electron-prebuilt, the following messages arises: \r\n\r\n[288:1119/171637:ERROR:browser_main_loop.cc(189)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.\r\n\r\n[485:1119/171645:ERROR:sandbox_linux.cc(345)] InitializeSandbox() called with multiple threads in process gpu-process\r\n\r\n[628:1119/171645:ERROR:renderer_main.cc(200)] Running without renderer sandbox\r\n\r\n**[288:1119/171707:INFO:CONSOLE(338)] \"Uncaught Error: Cannot find module '/home/alarm/app/node_modules/electron-prebuilt/dist/resources/atom.asar/renderer/lib/init.js'\", source: module.js (338)** [This is the annoying one to me ...]\r\n\r\n[288:1119/171707:INFO:CONSOLE(2)] \"Uncaught ReferenceError: require is not defined\", source: file:///home/some_file.html\r\n\r\n[288:1119/171707:INFO:CONSOLE(1)] \"Uncaught ReferenceError: require is not defined\", source: file:///home/some_file.html\r\n\r\n[288:1119/171707:INFO:CONSOLE(1)] \"Uncaught ReferenceError: require is not defined\", source: file:///home/some_file.html\r\n\r\n[288:1119/171707:INFO:CONSOLE(7)] \"Uncaught TypeError: Cannot read property 'run' of undefined\", source: file:///home/some_file.html\r\n\r\nThe first messages about SUID Sandbox are usual, at least the very first one, and if I'm not wrong normal since the app will share one context. The following message is the strange one to me. as it seems it arises when electron is showing the app window, in order to start electron will load atom/renderer/lib/init.js however this file is not found. At the beginning I thought that it was a problem with the electron 0.35.0 package released this morning however after several unsuccessful re-installations with different versions of electron I refused this idea. So after some googling I found that asar is a compression tool, and, as it seems node fs module is patched to be able to treat .asar files as directories, with this in mind I tried to remove the file atom.asar in **APP_ROOT/node_modules/electron-prebuilt/dist/resources/atom.asar** for a directory with the same name containing the .asar file information, however this didn't work since the patched fs module expect .asar files to be real .asar files. At this point I tried to compile electron by myself and obviate electron-prebuilt, at the same time I modified the file **electron/atom/common/node_bindings.cc** for it to search in the resources for the atom directory instead of the atom.asar file, to do this i changed the line 164 of the file from this:\r\n\r\n> resources_path.Append(FILE_PATH_LITERAL(\"atom.asar\"))\r\n\r\nto this:\r\n\r\n> resources_path.Append(FILE_PATH_LITERAL(\"atom\"))\r\n \r\nAnd then recompile electron for arm arch. Once I did this I transfered the modified electron build to the Raspberry and tried to run my app with the new electron binary and the atom.asar file unpackaged in **/electron/dist/resources/atom** and I expected electron to be able to fetch my files, however when I run the app the message about atom.asar was:\r\n\r\n**[267:1120/165440:INFO:CONSOLE(338)] \"Uncaught Error: Cannot find module '/home/alarm/electron/dist/resources/atom/renderer/lib/init.js'\", source: module.js (338)** \r\n\r\nThe file in question exists and is readable so right now I don't now what is the next step to take. If i run the app in a Linux 64 machine no error arise, however in the Raspberry Pi the error is thrown independently of the node and electron versions. So at this point any help will be really appreciated. If you are missing information in the post please let me know.\r\n\r\nNode versions tested:\r\n* node 5.0.0 arm >> error\r\n* node 5.1.0 arm >> error\r\n* node 0.12.7 arm >> error\r\n* node 5.1.0 x64 >> ok\r\n* node 0.12.7 x64 >> ok\r\n* node 5.0.0 x64 >> ok\r\n* node 0.10.25 >> ok\r\n\r\nElectron versions tested:\r\n* 0.33.0\r\n* 0.33.7\r\n* 0.34.3\r\n* 0.35.0\r\n* 0.35.1\r\n\r\nThanks in advance!\r\n"}}